Model Context Protocol server for Dify AI enables seamless chat interactions and restaurant recommendations with streaming support
mcp-server-dify is an MCP (Model Context Protocol) server that integrates with Dify AI to enable a wide range of AI applications, such as Claude Desktop, Continue, and Cursor, to interact with Dify's chat completion API. This solution provides a standardized interface, allowing these applications to leverage Dify's advanced capabilities through a consistent protocol.
mcp-server-dify offers several key features that enhance the interaction between AI applications and Dify AI:
The architecture of mcp-server-dify is built around MCP (Model Context Protocol), which serves as a standardized interface between various AI applications and Dify AI's chat completion API. Below is an overview of the key elements in this setup:
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
{
"mcpServers": {
"dify": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-dify",
"https://your-dify-api-endpoint",
"your-dify-api-key"
]
}
}
}
To install and use mcp-server-dify, follow these steps:
npm install @modelcontextprotocol/server-dify
mcp-server-dify is designed to work seamlessly with popular MCP clients such as Claude Desktop and Continue. Below are detailed integration steps for each:
claude_desktop_config.json
:
Add the following configuration to your claude_desktop_config.json
:{
"mcpServers": {
"dify": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-dify",
"https://your-dify-api-endpoint",
"your-dify-api-key"
]
}
}
}
Replace https://your-dify-api-endpoint
and your-dify-api-key
with your actual Dify API credentials.
mcp-server-dify ensures high performance and compatibility across various AI applications. Here’s a breakdown of its performance and the tools it supports:
The tool support matrix highlights areas where full or partial support is available, ensuring developers can leverage mcp-server-dify effectively in their projects.
To ensure the security and robustness of your setup:
Contributions are welcome! You can contribute by submitting pull requests, adding new features, or improving existing ones:
Initial Setup:
make setup
Building the Project:
make build
Code Formatting:
make format
Running Linters:
make lint
How do I install the server?
npm install @modelcontextprotocol/server-dify
.Can I use this with Continue AI?
What if my API key gets compromised?
Does this server support context maintenance?
conversation_id
.Can I integrate multiple MCP servers into the same application?
Contributions are always welcome! To get started:
make format
to ensure code formatting.make lint
to check for any issues before committing.mcp-server-dify integrates into a broader ecosystem of tools and resources designed to enhance the capabilities of AI applications. Explore additional MCP servers, clients, and community resources at the official MCP GitHub repository:
By leveraging mcp-server-dify, developers can build more powerful and flexible AI applications that seamlessly integrate with Dify AI and other tools through a standardized protocol.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration