LABSCO SUMMARY
The key list is the configuration — there is nothing else to maintain.
Because tool definitions are generated from each app's own parameter spec, changing an application's inputs in Dify changes the tool without a redeploy, and adding an app is one more entry in AGENT_API_KEYS. The flip side is that a wrong or revoked key surfaces as a missing tool rather than a clear error, so start with one key and confirm the tool appears before adding the rest. Pointing BASE_URL at a self-hosted Dify keeps everything inside your own network.
What it is
A bridge between an MCP client and Dify applications. Given a list of Dify API keys, it fetches each application's metadata and parameter specification and generates a matching MCP tool, so the tools an agent sees are whatever apps you pointed it at.
What you get
- One tool per Dify application, named
dify_app_info_{application_name} - Tool interfaces built from each app's own parameter specification, covering text, paragraph and select-dropdown inputs
- Support for both blocking and streaming response modes
- Automatic retries on failed requests, with configurable timeout
- JSON BigInt handling, so large numeric values survive the round trip
- Adding an application is adding its key — no tool definitions to write
Requirements
Node.js v16 or higher and npm. Published as dify-mcp-server version 0.1.0; the documented path is clone, npm install, npm run build, then point your client at build/index.js. Three environment variables: AGENT_API_KEYS is a comma-separated list of Dify API keys, BASE_URL defaults to https://api.dify.ai and can point at a self-hosted instance, TIMEOUT is in milliseconds and defaults to 60000.
Setup effort
Build from source — git clone https://github.com/zhuzhoulin/dify-mcp-server.git
USE CASES
Calling a Dify workflow from your coding assistant
Reach the app you built in Dify from the client you already work in, without a custom integration.
Making several Dify apps available at once
List their keys and each becomes its own tool, named after the application.
Using a self-hosted Dify instance
Point the base URL at your own deployment so requests never leave your network.
Keeping tool definitions in step with the app
Change the inputs in Dify and the generated tool interface follows.
BEFORE YOU INSTALL
What to know first
Requires
- Node.js
- AGENT_API_KEYS in your environment
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
git clone https://github.com/zhuzhoulin/dify-mcp-server.git
cd dify-mcp-server
npm install
npm run buildMCP Clients
Windsurf
{
"mcpServers": {
"dify-mcp-server": {
"command": "node",
"args": [
"<YOUR_PATH_TO_DIFY_MCP_SERVER>/build/index.js"
],
"env": {
"AGENT_API_KEYS": "key1,key2,key3",
"BASE_URL": "https://api.dify.ai",
"TIMEOUT": "60000"
}
}
}
}