Execute a Dify workflow using the provided input parameters
The Dify Workflow Integration allows you to seamlessly connect to and execute workflows created in Dify, a popular LLM application development platform. This integration bridges the gap between AI assistants and your custom Dify workflows, enabling you to leverage your existing Dify applications directly through the Model Context Protocol. By connecting to your Dify workflows, this integration enables AI assistants to perform complex, multi-step operations that you've already defined in Dify. This creates a powerful combination where the conversational abilities of AI assistants are enhanced with the specific capabilities you've built into your Dify workflows.
The Dify Workflow Integration allows you to connect AI assistants to your Dify workflows. This integration enables AI assistants to execute workflows you've created in Dify, providing access to custom functionality you've already built.
You can install and configure the Dify Workflow Integration using one of the following methods:
This method doesn't require cloning the repository:
{
"mcpServers": {
"dify-mcp-server": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/YanxingLiu/dify-mcp-server",
"dify_mcp_server"
],
"env": {
"DIFY_BASE_URL": "https://cloud.dify.ai/v1",
"DIFY_APP_SKS": "app-sk1,app-sk2"
}
}
}
}
If you prefer to clone the repository locally:
git clone https://github.com/YanxingLiu/dify-mcp-server.git
{
"mcpServers": {
"dify-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/path/to/dify-mcp-server",
"run",
"dify_mcp_server"
],
"env": {
"DIFY_BASE_URL": "https://cloud.dify.ai/v1",
"DIFY_APP_SKS": "app-sk1,app-sk2"
}
}
}
}
You can configure the integration using either environment variables or a configuration file:
Set the following environment variables in your client configuration:
DIFY_BASE_URL
: The base URL for your Dify API (default: "https://cloud.dify.ai/v1")DIFY_APP_SKS
: A comma-separated list of your Dify App Secret Keys (SKs)Example:
"env": {
"DIFY_BASE_URL": "https://cloud.dify.ai/v1",
"DIFY_APP_SKS": "app-sk1,app-sk2"
}
config.yaml
file with the following structure:dify_base_url: "https://cloud.dify.ai/v1"
dify_app_sks:
- "app-sk1"
- "app-sk2"
"env": {
"CONFIG_PATH": "/path/to/config.yaml"
}
Once installed and configured, the Dify workflows associated with the App Secret Keys you provided will be available as tools to your AI assistant. The assistant can invoke these tools to execute the corresponding Dify workflows.
Each Dify workflow will appear as a separate tool with parameters matching the input variables defined in your Dify workflow.
If you encounter issues: