Dify
Production-ready platform for agentic workflow development.
What is Dify?
Dify is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to production-ready platform for agentic workflow development.
Production-ready platform for agentic workflow development.
This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Production-ready platform for agentic workflow development.
Use Cases
Maintainer
Works with
Installation
NPM
npx -y @tonlab/dify-mcp-serverManual Installation
npx -y @tonlab/dify-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Dify
Dify is an open-source LLM application development platform that combines visual AI workflow building, RAG pipeline management, agent creation, and LLMOps observability into a single self-hosted or cloud product. The Dify MCP server (@tonlab/dify-mcp-server) exposes your Dify instance's applications and workflows as callable tools, so an AI client like Claude can invoke Dify-hosted agents, chatflows, and text generation apps directly through natural language. This bridges Dify's no-code workflow builder with code-level AI clients, letting teams reuse production Dify apps inside any MCP-compatible environment.
Prerequisites
- A running Dify instance — either Dify Cloud (dify.ai) or self-hosted via Docker Compose
- A Dify API key for the application or workspace you want to expose
- Node.js 18 or higher installed
- An MCP-compatible client such as Claude Desktop or Claude Code CLI
Set up a Dify instance
If you do not already have Dify running, deploy it locally with Docker Compose. The minimum requirement is 2 CPU cores and 4 GiB RAM. After startup, open http://localhost/install to complete initialization.
git clone https://github.com/langgenius/dify.git
cd dify/docker
cp .env.example .env
docker compose up -dObtain a Dify API key
In the Dify dashboard, open the application you want to expose via MCP, go to API Access, and copy the API key. You will also need your Dify base URL (e.g., http://localhost or https://api.dify.ai/v1 for Dify Cloud).
Install the Dify MCP server
The server is published to npm as @tonlab/dify-mcp-server. You can run it directly with npx without a global install.
npx -y @tonlab/dify-mcp-serverAdd to your MCP client configuration
Register the server in your Claude Desktop config file, passing your Dify API key and base URL as environment variables.
{
"mcpServers": {
"dify": {
"command": "npx",
"args": ["-y", "@tonlab/dify-mcp-server"],
"env": {
"DIFY_API_KEY": "your-dify-api-key",
"DIFY_BASE_URL": "http://localhost/v1"
}
}
}
}Restart Claude Desktop and test
Restart your MCP client and ask it to invoke one of your Dify applications by name. The server will proxy the request to your Dify instance and return the response.
Dify Examples
Client configuration
Full Claude Desktop config for the Dify MCP server connecting to a local Dify instance.
{
"mcpServers": {
"dify": {
"command": "npx",
"args": ["-y", "@tonlab/dify-mcp-server"],
"env": {
"DIFY_API_KEY": "app-xxxxxxxxxxxxxxxxxxxxxxxx",
"DIFY_BASE_URL": "http://localhost/v1"
}
}
}
}Prompts to try
Example prompts that invoke Dify-hosted workflows and agents from your MCP client.
- "Run my 'Customer Support' Dify chatflow with this user message: 'How do I reset my password?'"
- "Use the 'Document Summarizer' Dify app to summarize this PDF text"
- "Invoke my 'Code Review' Dify agent on this Python function"
- "List the Dify applications available in my workspace"
- "Run the 'SEO Blog Writer' workflow with topic 'AI monitoring tools' and tone 'professional'"Troubleshooting Dify
Server starts but returns 'Unauthorized' when invoking a Dify app
Double-check that DIFY_API_KEY is the application-level API key, not a user password. In Dify, each app has its own API key found under API Access in the app settings panel.
DIFY_BASE_URL connection refused or timeout
For a local Docker Compose install, use http://localhost/v1 (not port 3000 or 8080). For Dify Cloud, the base URL is https://api.dify.ai/v1. Check that your Dify containers are running with 'docker compose ps' from the docker directory.
npx -y @tonlab/dify-mcp-server exits immediately with no output
The package requires DIFY_API_KEY to be set. Without it the server exits on startup. Make sure the env block in your MCP config file is correctly formatted JSON and the key name is exactly DIFY_API_KEY.
Frequently Asked Questions about Dify
What is Dify?
Dify is a Model Context Protocol (MCP) server that production-ready platform for agentic workflow development. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Dify?
Install via npm with the command: npx -y @tonlab/dify-mcp-server. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
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 NOASSERTION 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.
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.
Gemini
★ 11.6kEnables comprehensive codebase analysis using Google's Gemini CLI and its massive context window. Supports file/directory analysis, security audits, architecture analysis, feature verification, and complete project overviews for large codebases that
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.