
dify-mcp
by alexjiaguo
dify-mcp
The most complete MCP server + CLI for Dify
138 tools. 16 namespaces. One registry. Let any AI agent build, test, and ship Dify workflows autonomously — everything a human can do in the UI, now scriptable.
Works with Claude Code · Codex · Gemini CLI · Cursor · Cline · Windsurf · Roo Code · Continue · Aider · Zed — and any other MCP-compatible or shell-capable agent.
What is this?
Dify is a powerful open-source LLM app platform — but its workflow builder is a visual drag-and-drop editor. What if you want an AI agent to programmatically create workflows, wire up nodes, test them, iterate, and publish — without a browser?
dify-mcp is the bridge. It exposes the entire Dify console API as a unified tool registry with two surfaces: a CLI any shell-capable agent can drive, and an MCP server (stdio or Streamable HTTP) any MCP-compatible host can attach. Same 138 tools, same JSON contract, same safety guarantees.
┌──────────────────────────────────────────────────────────┐
│ dify-mcp │
│ │
│ ┌──────────┐ ┌────────────────────┐ ┌─────────┐ │
│ │ CLI │───▶│ 138-tool │───▶│ Dify │ │
│ │ difywf │ │ registry │ │ API │ │
│ └──────────┘ │ │ └─────────┘ │
│ ┌──────────┐ │ app · workflow │ ▲ │
│ │ MCP │───▶│ provider · rag │─────────┘ │
│ │ stdio │ │ agent · snippet │ │
│ └──────────┘ │ stats · audio ... │ │
│ └────────────────────┘ │
└──────────────────────────────────────────────────────────┘
Works with your favorite agents
dify-mcp is agent-agnostic by design — no SDK lock-in, no proprietary protocol. If your agent can run a shell command, it can use the CLI. If it speaks MCP, it can attach the server. Most popular agents do both:
| Agent | MCP | CLI | Quick setup |
|---|---|---|---|
| Claude Code | ✅ | ✅ | claude mcp add dify -- difywf mcp serve |
| Codex | ✅ | ✅ | [mcp_servers.dify] in ~/.codex/config.toml |
| Gemini CLI | ✅ | ✅ | mcpServers.dify in ~/.gemini/settings.json |
| Cursor | ✅ | ✅ | .cursor/mcp.json |
| Cline | ✅ | ✅ | Same JSON shape as Cursor |
| Windsurf | ✅ | ✅ | MCP server config in Windsurf settings |
| Roo Code | ✅ | ✅ | MCP server config in Roo Code settings |
| Continue | ✅ | ✅ | experimental.mcpServer in config.json |
| Zed | ✅ | ✅ | context_servers in ~/.config/zed/settings.json |
| Aider | - | ✅ | Run difywf commands directly in chat |
Don't see your agent? If it supports MCP or can run shell commands, it works. The connect section below has copy-paste configs for each host.
Why you'll star this
Related servers

n8n
Updated todayby n8n-io
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

mcp-server-git
OfficialUpdated todayA Model Context Protocol server providing tools to read, search, and manipulate Git repositories programmatically via LLMs

mcp-server-fetch
OfficialUpdated todayA Model Context Protocol server providing tools to fetch and convert web content for usage by LLMs