Get the FREE Ultimate OpenClaw Setup Guide →

mcp-difyworkflow

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.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio gotoolkits-mcp-difyworkflow-server mcp-difyworkflow-server -base-url http://localhost/v1 \
  --env DIFY_API_KEYS="appkey-xxxxxxxxxxxa,appkey-xxxxxxxxxxxb" \
  --env DIFY_WORKFLOW_NAME="workflow-translator,workflow-genImag"

How to use

mcp-difyworkflow-server is an MCP server that enables querying and invoking Dify workflows on demand. It exposes tools to list available workflows and execute a chosen workflow with a provided input payload. The input for a Dify workflow is typically passed under the default variable name message, so workflows should be designed to consume a field named message in their input.

To use it, configure the MCP server with the base URL of your Dify platform and provide API keys for each workflow you want to access. Once running, you can request list_workflows to see which workflows are authorized for this server, and use execute_workflow with the workflow name and an input payload to run a specific workflow and retrieve its results.

How to install

Prerequisites:

  • Go toolchain installed (go version 1.17+ recommended)
  • Git
  • Optional: Make (for make build convenience)

Install steps:

  1. Clone the repository git clone https://github.com/gotoolkis/mcp-difyworkflow-server.git

  2. Build the server (Go) cd mcp-difyworkflow-server go build .

  3. Alternatively, build via make (if a Makefile is provided) make build

  4. Prepare configuration Create or edit the configuration file to include your MCP server entry, specifying the command, base URL, and environment variables for Dify workflows.

  5. Run the server Ensure the compiled binary is in your PATH or reference the full path when starting as part of your MCP setup. Start your MCP orchestrator with the configured mcpServers section.

  6. Verify operation Use the MCP orchestrator's tooling to request list_workflows and execute_workflow, validating that responses come from the Dify platform.

Additional notes

Tips and caveats:

  • Ensure the Dify base URL is reachable from the MCP host and that API keys have the necessary permissions for the workflows you intend to invoke.
  • The input payload should provide a field named message unless your workflows are configured to consume a different variable name; keep this convention consistent across workflows.
  • If you add more workflows, extend the DIFY_WORKFLOW_NAME and DIFY_API_KEYS env values with comma-separated entries that correspond to each workflow in order.
  • If you encounter authentication issues, double-check that API keys are active and correctly scoped for the specific workflow resources.
  • When upgrading the server binary, ensure the environment variables and base URL remain aligned with the new build.

Related MCP Servers

Sponsor this space

Reach thousands of developers