https://github.com/YanxingLiu/dify-mcp-server
Model Context Protocol (MCP) Server for dify workflows
https://github.com/YanxingLiu/dify-mcp-server
Last synced: 23 days ago
JSON representation
Model Context Protocol (MCP) Server for dify workflows
- Host: GitHub
- URL: https://github.com/YanxingLiu/dify-mcp-server
- Owner: YanxingLiu
- Created: 2024-12-25T15:00:49.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-03-13T07:19:52.000Z (about 1 month ago)
- Last Synced: 2025-03-13T08:26:28.220Z (about 1 month ago)
- Language: Python
- Size: 30.3 KB
- Stars: 79
- Watchers: 1
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- Awesome-MCP-Servers-directory - Dify - A simple implementation of an MCP server for dify workflows (Workflow Automation)
- awesome-mcp-servers - Dify - Model Context Protocol (MCP) Server for dify workflows (Table of Contents / Workflow Automation)
- awesome-mcp-servers - Dify - Model Context Protocol (MCP) Server for dify workflows (Table of Contents / Workflow Automation)
README
# Model Context Protocol (MCP) Server for dify workflows
A simple implementation of an MCP server for using [dify](https://github.com/langgenius/dify). It achieves the invocation of the Dify workflow by calling the tools of MCP.
## đŸ”¨Installation
The server can be installed via [Smithery](https://smithery.ai/server/dify-mcp-server) or manually. Config.yaml is required for both methods. Thus, we need to prepare it before installation.### Prepare config.yaml
Before using the mcp server, you should prepare a config.yaml to save your dify_base_url and dify_sks. The example config like this:
```yaml
dify_base_url: "https://cloud.dify.ai/v1"
dify_app_sks:
- "app-sk1"
- "app-sk2"
```
Different SKs correspond to different dify workflows.
### Installing via Smithery
[smithery](https://smithery.ai) is a tool to install the dify mcp server automatically.
To install Dify MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/dify-mcp-server):```bash
npx -y @smithery/cli install dify-mcp-server --client claude
```### Manual Installation
You can also run the dify mcp server manually in your clients. The config of client should like the following format:
```json
"mcpServers": {
"mcp-server-rag-web-browser": {
"command": "uv",
"args": [
"--directory", "${DIFY_MCP_SERVER_PATH}",
"run", "dify_mcp_server"
],
"env": {
"CONFIG_PATH": "$CONFIG_PATH"
}
}
}
```
Example config:
```json
"mcpServers": {
"dify-mcp-server": {
"command": "uv",
"args": [
"--directory", "/Users/lyx/Downloads/dify-mcp-server",
"run", "dify_mcp_server"
],
"env": {
"CONFIG_PATH": "/Users/lyx/Downloads/config.yaml"
}
}
}
```
or using uvx:
```json
"mcpServers": {
"dify-mcp-server": {
"command": "uvx",
"args": [
"--from","git+https://github.com/YanxingLiu/dify-mcp-server","dify_mcp_server"
],
"env": {
"CONFIG_PATH": "/Users/lyx/Downloads/config.yaml"
}
}
}
```
### Enjoy it
At last, you can use dify tools in any client who supports mcp.