LABSCO SUMMARY
One key, one tool — which is how you expose several workflows at once.
The multi-key option is the useful detail: rather than a single generic "run a workflow" tool where the model has to name the right one, each key registers separately with its own parameters, so the model picks by capability. The trade-off is that keys live in the client config in plain text, and adding a workflow means adding a key and restarting.
What it is
A bridge that turns Dify Workflows into callable tools. It reads each workflow's parameters from Dify at startup rather than requiring you to declare them, so a workflow you change in Dify shows its new inputs after a restart.
What you get
- Your Dify Workflow available as a tool in the conversation
- Workflow parameters retrieved and displayed dynamically, not hard-coded in a schema
- Multiple keys supported: set
DIFY_API_KEYSto a comma-separated list and each key becomes its own tool, with a number appended to distinguish them - Configuration is environment variables only — no config file to maintain
Requirements
A Dify endpoint in DIFY_BASE_URL and access to the workflow via DIFY_API_KEY, or several in DIFY_API_KEYS. Run with npx @tonlab/dify-mcp-server on Node.js 16 or higher and npm 7 or higher. The npm package is @tonlab/dify-mcp-server, version 1.1.2.
Setup effort
One command plus a key — npx @tonlab/dify-mcp-server, then supply credentials
USE CASES
Calling a workflow you built in Dify
Invoke it from the conversation with the parameters it actually declares.
Offering several workflows at once
List multiple API keys so each workflow appears as its own tool.
Picking up a workflow change
Restart the server and the new parameters come through without editing a schema.
BEFORE YOU INSTALL
What to know first
Requires
- npx on PATH
- Node.js 16 or later
INSTALLATION
Connect your client
Server setup
npx @tonlab/dify-mcp-serverMCP Clients
Claude Desktop
{
"mcpServers": {
"dify-workflow": {
"command": "npx",
"args": [
"@tonlab/dify-mcp-server"
],
"env": {
"DIFY_BASE_URL": "https://<YOUR_DIFY_ENDPOINT>",
"DIFY_API_KEY": "<YOUR_DIFY_API_KEY>"
}
}
}
}