Dify MCP Server
by salted-butter-joshuaio.github.salted-butter-joshua/dify-mcpv0.1.0
MCP server exposing Dify knowledge base retrieval to Cursor and other MCP clients
context tax
queued
security
queued
cold start
queued
freshness
Slowing3mo ago
Install Dify MCP server
Install in Claude Code
claude mcp add dify -e DIFY_API_BASE='<dify-api-base>' -e DIFY_API_KEY='<dify-api-key>' -e DIFY_ALLOWED_DATASETS='<dify-allowed-datasets>' -- uvx dify-mcpInstall in Cursor
{
"mcpServers": {
"dify": {
"command": "uvx",
"args": [
"dify-mcp"
],
"env": {
"DIFY_API_BASE": "<dify-api-base>",
"DIFY_API_KEY": "<dify-api-key>",
"DIFY_ALLOWED_DATASETS": "<dify-allowed-datasets>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"dify": {
"command": "uvx",
"args": [
"dify-mcp"
],
"env": {
"DIFY_API_BASE": "<dify-api-base>",
"DIFY_API_KEY": "<dify-api-key>",
"DIFY_ALLOWED_DATASETS": "<dify-allowed-datasets>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"dify": {
"type": "stdio",
"command": "uvx",
"args": [
"dify-mcp"
],
"env": {
"DIFY_API_BASE": "<dify-api-base>",
"DIFY_API_KEY": "<dify-api-key>",
"DIFY_ALLOWED_DATASETS": "<dify-allowed-datasets>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"dify": {
"command": "uvx",
"args": [
"dify-mcp"
],
"env": {
"DIFY_API_BASE": "<dify-api-base>",
"DIFY_API_KEY": "<dify-api-key>",
"DIFY_ALLOWED_DATASETS": "<dify-allowed-datasets>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| DIFY_API_BASE | yes | — | Dify Knowledge API base URL, e.g. http://192.168.1.100/v1 |
| DIFY_API_KEY | yes | yes | Dify Knowledge Base API key |
| DIFY_ALLOWED_DATASETS | yes | — | Comma-separated dataset UUIDs to expose |
| DIFY_TIMEOUT | — | — | HTTP timeout in seconds (default: 30) |
| DIFY_VERIFY_SSL | — | — | Verify TLS certificates (default: false) |
Freshness
Slowing — last maintenance signal 3mo ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-07-05 · 3mo ago · GitHub
Latest release
no data · GitHub
Package published
no data · npm/PyPI
Registry entry updated
2026-07-05 · 3mo ago · official registry · v0.1.0
FAQ
›How do I install the Dify MCP server in Claude Code?
Run: claude mcp add dify -e DIFY_API_BASE='<dify-api-base>' -e DIFY_API_KEY='<dify-api-key>' -e DIFY_ALLOWED_DATASETS='<dify-allowed-datasets>' -- uvx dify-mcp. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does Dify require an API key?
Yes. It expects DIFY_API_BASE, DIFY_API_KEY, DIFY_ALLOWED_DATASETS, of which 1 is a secret.
›Can I use Dify as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is Dify in the official MCP registry?
Yes, as io.github.salted-butter-joshua/dify-mcp.
Alternatives to Dify
Other notes & knowledge MCP servers.