Model Context Protocol (MCP) Server for dify workflows
A simple implementation of an MCP server for using dify. It achieves the invocation of the Dify workflow by calling the tools of MCP.
📰 News
- [2025/4/15] zNow supports directly using environment variables to pass
base_url
andapp_sks
, making it more convenient to use with cloud-hosted platforms.
🔨Installation
The server can be installed via Smithery or manually.
Step1: prepare config.yaml or enviroments
You can configure the server using either environment variables or a config.yaml
file.
Method 1: Using Environment Variables (Recommended for Cloud Platforms)
Set the following environment variables:
DIFY_BASE_URL
: The base URL for your Dify API.DIFY_APP_SKS
: A comma-separated list of your Dify App Secret Keys (SKs). Each SK typically corresponds to a different Dify workflow you want to make available via MCP.
Method 2: Using config.yaml
Create a config.yaml
file to store your Dify base URL and App SKs.
Example config.yaml
:
dify_base_url
: The base URL for your Dify API.dify_app_sks
: A list of your Dify App Secret Keys (SKs). Each SK typically corresponds to a different Dify workflow.
You can create this file quickly using the following command (adjust the path and values as needed):
When running the server (as shown in Step 2), you will need to provide the path to this config.yaml
file via the CONFIG_PATH
environment variable if you choose this method.
Step2: Installation on your client
❓ If you haven't installed uv or uvx yet, you can do it quickly with the following command:
✅ Method 1: Use uvx (no need to clone code, recommended)
or
✅ Method 2: Use uv (local clone + uv start)
You can also run the dify mcp server manually in your clients. The config of client should like the following format:
or
Example config:
Enjoy it
At last, you can use dify tools in any client who supports mcp.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Server for using Dify. It achieves the invocation of the Dify workflow by calling the tools of MCP.
Related MCP Servers
- -securityFlicense-qualityA TypeScript implementation of a Model Context Protocol (MCP) server that exposes Dify workflows as tools for AI systems to interact with.Last updated -9TypeScript
- -securityFlicense-qualityA plugin that allows Dify to connect to multiple MCP (Model Control Protocol) servers using HTTP with Server-Sent Events transport, supporting custom configurations for URLs, headers, and timeouts.Last updated -95Python
- -securityFlicense-qualityExposes Dify applications (both Chatflow and Workflow) as MCP (Model Context Protocol) servers, allowing Claude and other MCP clients to directly interact with Dify apps through a standardized protocol.Last updated -18Python
- -securityFlicense-qualityA Dify endpoint plugin that transforms a Dify application into a Model Control Protocol server, allowing tools like Cursor to connect to and utilize your custom Dify workflows.Last updated -19Python