gotoolkits/DifyWorkflow

CategoryGeneral
AuthorCommunity
Stars172
PricingFree

Overview

The DifyWorkflow MCP server bridges the gap between LLM interfaces and complex, multi-step automation pipelines hosted on Dify. Instead of relying on simple prompt-response cycles, this tool allows developers to trigger pre-defined Dify workflows as executable functions. This is particularly useful for offloading heavy logic, API orchestrations, or structured data processing to a dedicated backend while maintaining the LLM as the primary orchestrator. By integrating this into your MCP-compatible environment, you can move beyond basic chat and implement production-ready agentic workflows that leverage Dify's visual orchestration and state management without rewriting the business logic in your client application.

Highlights

  • Execute complex Dify workflows via direct MCP tool calls
  • Offload heavy orchestration logic to a managed backend
  • Seamlessly trigger multi-step pipelines from LLM interfaces
  • Reduces client-side complexity for structured automation tasks

Full Documentation

mcp-difyworkflow-server

mcp-difyworkflow-server is an mcp server Tools application that implements the query and invocation of Dify workflows, supporting the on-demand operation of multiple custom Dify workflows.

INSTALL

shell
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

json
{
  "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"
      }
    }
  }
}
  • "base-url":"http://localhost/v1"

The base URL of the Dify platform api server url.

  • "command":"mcp-difyworkflow-server"

You can specify the absolute path for the compiled binary, or create a symbolic link with:<br>
"sudo ln -s \<gitWorkPath\>/mcp-difyworkflow-server /usr/local/bin/mcp-difyworkflow-server"

  • DIFY_WORKFLOW_NAME、DIFY_API_KEYS

Need to correspond one by one in order.<br>
Workflow name can be self-defined by the user in the Prompt, and the Workflow API Key needs to be generated for the corresponding workflow created on the Dify platform (refer to the relevant Dify documentation for how to generate the API KEY).

Usage

  • list_workflows<br>
List authorized workflows
  • execute_workflow<br>
Execute a specified workflow,args: workflow_name, input Note: The input variable name of the dify workflow should be defined by default as: "message"

#### Samples

> prompt: 查看 mcp-difyworkflow-server 可使用的工具列表<br>
> prompt: 给我执行 dify 名为 workflow-translator 的工作流,输入的消息为“这是一条测试消息”

> prompt: View the list of tools available for mcp-difyworkflow-server.<br>
> prompt: Execute the workflow named 'workflow-translator' for me, the input message is "This is a test message".

Join our Telegram