Dify
A server implementation that enables integration of Dify workflows with Model Context Protocol (MCP), allowing users to access Dify's capabilities through MCP-compatible clients.
What is Dify?
Dify is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to server implementation that enables integration of dify workflows with model context protocol (mcp), allowing users to access dify's capabilities through mcp-compatible clients.
A server implementation that enables integration of Dify workflows with Model Context Protocol (MCP), allowing users to access Dify's capabilities through MCP-compatible clients.
This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A server implementation that enables integration of Dify wor
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx dify-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Dify
The Dify MCP Server bridges Dify AI workflows with any MCP-compatible client, enabling you to trigger Dify applications and workflows from within Claude or other AI assistants through natural language. It connects to the Dify API using your personal API key and exposes a code generation tool powered by your configured Dify workflow — the included example generates Ant Design business component code by combining text prompts with optional image uploads. Developers who have built Dify workflows for content generation, data processing, or code assistance can surface those workflows as MCP tools without writing additional integration code.
Prerequisites
- Node.js 18 or later and npm installed on your system
- A Dify account with at least one published application or workflow
- A Dify API key from your application's API Access page
- Git to clone the repository
- An MCP-compatible client such as Claude Desktop, Cline, or Continue
Clone and install the server
Clone the dify-mcp-server repository and install its Node.js dependencies.
git clone https://github.com/AI-FE/dify-mcp-server.git
cd dify-mcp-server
npm installBuild the server
Compile the TypeScript source into JavaScript. The output lands in the build/ directory.
npm run buildObtain your Dify API key
Log in to your Dify workspace, open your target application, go to API Access, and copy your API key. This key authenticates all requests the MCP server makes to Dify.
Configure your MCP client
Add the server to your MCP client configuration, pointing to the built index.js and providing your Dify API key as an environment variable.
{
"mcpServers": {
"dify-server": {
"command": "node",
"args": ["/absolute/path/to/dify-mcp-server/build/index.js"],
"env": {
"DIFY_API_KEY": "your-dify-api-key-here"
}
}
}
}Restart your MCP client and verify
Quit and reopen Claude Desktop or your MCP client. The Dify workflow tools (such as antd-component-codegen-mcp-tool) should appear in the available tool list.
Dify Examples
Client configuration
claude_desktop_config.json entry for the Dify MCP Server using node to run the built output.
{
"mcpServers": {
"dify-server": {
"command": "node",
"args": ["/absolute/path/to/dify-mcp-server/build/index.js"],
"env": {
"DIFY_API_KEY": "your-dify-api-key-here"
}
}
}
}Prompts to try
Example queries to invoke your Dify workflows through the MCP server.
- "Generate an Ant Design form component for user registration with email, password, and username fields"
- "Create an Ant Design table component displaying order data with columns for ID, customer, amount, and status"
- "Build a dashboard card component using Ant Design that shows monthly revenue with a trend indicator"
- "Use my Dify workflow to generate a data filter panel with date range picker and dropdown filters"Troubleshooting Dify
All Dify API calls fail with 401 Unauthorized errors
Verify that DIFY_API_KEY is set correctly in the env block and that the key belongs to a published Dify application. Generate a new key from the Dify application's API Access page if the current one has been revoked.
The server starts but no tools appear in the MCP client
Ensure 'npm run build' completed without errors and that the path in 'args' points to the build/index.js file (not src/). Use an absolute path to avoid working directory resolution issues.
Tool calls time out or return empty responses
Dify workflows can be slow to respond if they involve multiple LLM calls or external API lookups. Check the workflow execution logs in your Dify dashboard to see if it is completing. The MCP server streams responses, so very long workflows may exceed client timeout limits.
Frequently Asked Questions about Dify
What is Dify?
Dify is a Model Context Protocol (MCP) server that server implementation that enables integration of dify workflows with model context protocol (mcp), allowing users to access dify's capabilities through mcp-compatible clients. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Dify?
Follow the installation instructions on the Dify GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Dify?
Dify works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Dify free to use?
Yes, Dify is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Dify Alternatives — Similar Coding Agents Servers
Looking for alternatives to Dify? Here are other popular coding agents servers you can use with Claude, Cursor, and VS Code.
Dify
★ 142.2kProduction-ready platform for agentic workflow development.
Ruflo
★ 54.0k🌊 The leading agent orchestration platform for Claude. Deploy intelligent multi-agent swarms, coordinate autonomous workflows, and build conversational AI systems. Features enterprise-grade architecture, self-learning swarm intelligence, RAG integrat
Goose
★ 45.7kan open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
Antigravity Awesome Skills
★ 38.3kInstallable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.
AgentScope
★ 25.5kBuild and run agents you can see, understand and trust.
Serena
★ 24.5kA coding agent toolkit that provides IDE-like semantic code retrieval and editing tools, enabling LLMs to efficiently navigate and modify codebases using symbol-level operations instead of basic file reading and string replacements.
Browse More Coding Agents MCP Servers
Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Dify in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Dify?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.