- Home
- MCP servers
- Dify Workflow
Dify Workflow
- go
0
GitHub Stars
go
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"mcp-mirror-gotoolkits_mcp-difyworkflow-server": {
"command": "mcp-difyworkflow-server",
"args": [
"-base-url",
"http://localhost/v1"
],
"env": {
"DIFY_API_KEYS": "appkey-xxxxxxxxxxxa,appkey-xxxxxxxxxxxb",
"DIFY_WORKFLOW_NAME": "workflow-translator“,workflow-genImag"
}
}
}
}You can query and invoke on-demand Dify workflows through an MCP server, enabling seamless integration of custom Dify workflows into your automated prompts and tools. This server exposes simple actions to list authorized workflows and execute a chosen workflow with a message payload.
How to use
Use an MCP client to interact with the server. You can list all workflows you are authorized to use and then execute a specific workflow by providing the input message. The input variable name inside the Dify workflow is expected to be defined as the default: message.
How to install
Prerequisites: you need a Go toolchain installed on your machine to build the server.
Clone the server repository and build the project.
git clone https://github.com/gotoolkis/mcp-difyworkflow-server.git
# build by go
cd mcp-difyworkflow-server
go build .
## or use make build
make build
Configuration details
Configure how the MCP server runs and which Dify workflows it can invoke.
{
"mcpServers": {
"mcp-difyworkflow-server": {
"command": "mcp-difyworkflow-server",
"args": ["-base-url", "http://localhost/v1"],
"env": {
"DIFY_WORKFLOW_NAME": "workflow-translator“,workflow-genImag",
"DIFY_API_KEYS": "appkey-xxxxxxxxxxxa,appkey-xxxxxxxxxxxb"
}
}
}
}
Usage examples
Examples of prompts you can use with the MCP client include asking for the list of available workflows or executing a specific workflow.
Notes on configuration and runtime
- The base URL must point to your Dify platform API server (as shown:
http://localhost/v1). - The command is the local binary you run to start the MCP server. You can place a symbolic link in a directory on your PATH for easier access, for example:
sudo ln -s <gitWorkPath>/mcp-difyworkflow-server /usr/local/bin/mcp-difyworkflow-server. - The DIFY workflow name and API keys must be provided in matching order. Generate the API keys for each workflow on the Dify platform.
Security and best practices
Keep API keys secure and limit access to the MCP client that can invoke workflows. Rotate keys regularly and avoid embedding credentials in publicly accessible configurations.
Available tools
list_workflows
List authorized Dify workflows available to be invoked by this MCP server.
execute_workflow
Execute a specified Dify workflow by providing the workflow name and input payload. The default input variable for the Dify workflow is expected to be named message.