Model Context Protocol (MCP) Server for dify workflows
Model Context Protocol (MCP) Server for dify workflows
Overview
Dify MCP Server is a simple implementation of a Model Context Protocol (MCP) server designed for utilizing Dify workflows. It facilitates the invocation of Dify tools through the MCP framework.
To use the Dify MCP Server, you need to prepare a config.yaml file with your Dify base URL and secret keys. You can install the server either via Smithery for automatic setup or manually by configuring your client.
- Simple installation via Smithery or manual setup - Supports multiple Dify workflows through configuration - Enables invocation of Dify tools in various clients
- Integrating Dify workflows into web applications.
- Automating tasks using Dify tools in different environments.
- Facilitating communication between different components of a Dify-based system.
Add to your AI client
Use these steps to connect Model Context Protocol (MCP) Server for dify workflows in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"dify-mcp-server-yanxingliu": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-dify-mcp-server-yanxingliu"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"dify-mcp-server-yanxingliu": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-dify-mcp-server-yanxingliu"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"dify-mcp-server-yanxingliu": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-dify-mcp-server-yanxingliu"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"dify-mcp-server-yanxingliu": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-dify-mcp-server-yanxingliu"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"dify-mcp-server-yanxingliu": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-dify-mcp-server-yanxingliu"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"dify-mcp-server-yanxingliu": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-dify-mcp-server-yanxingliu"
]
}
}
}FAQ
What is required to install Dify MCP Server?
You need a `config.yaml` file with your Dify base URL and secret keys to install the server.
Can I install Dify MCP Server manually?
Yes, you can install it manually by configuring your client with the appropriate settings.
What programming language is Dify MCP Server written in?
Dify MCP Server is written in Python.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2803,"uuid":"52837604-340a-4c9a-8761-18fad30eb78a","name":"dify-mcp-server","title":"Model Context Protocol (MCP) Server for dify workflows","description":"Model Context Protocol (MCP) Server for dify workflows","avatar_url":"https://avatars.githubusercontent.com/u/42299757?v=4","created_at":"2025-03-14T02:15:01.062Z","updated_at":"2025-03-14T02:54:39.064Z","status":"created","author_name":"YanxingLiu","author_avatar_url":"https://avatars.githubusercontent.com/u/42299757?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/YanxingLiu/dify-mcp-server","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"194\",\"license\":\"\",\"language\":\"Python\",\"is_official\":false,\"latest_commit_time\":\"2025-04-20 23:08:09\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]