Model Context Protocol (MCP) Server for dify workflows

by YanxingLiu

278 stars
278 downloads
Not rated
GitHub

About

An MCP server for executing Dify workflows, configured via environment variables or a config file.

Details

Author
YanxingLiu
GitHub stars
278
Downloads
278
Categories
Developer Tools, Automation, AI, API, Other

- Exposes a tool antd-component-codegen-mcp-tool for code generation.
- Accepts text and optional image inputs.
- Handles image file uploads.
- Supports streaming responses from the Dify AI API.
- Built entirely with TypeScript.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Model Context Protocol (MCP) Server for dify workflows
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Prepare either environment variables (DIFY_BASE_URL and DIFY_APP_SKS) or a config.yaml file with the same data.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "model context protocol (mcp) server for dify workflows": {
            "dify-mcp-server": {
                "command": "uvx",
                "args": [
                    "--from",
                    "git+https://github.com/YanxingLiu/dify-mcp-server",
                    "dify_mcp_server"
                ],
                "env": {
                    "DIFY_BASE_URL": "",
                    "DIFY_APP_SKS": ""
                }
            }
        }
    }
}

McpServers

{
    "dify-mcp-server": {
        "command": "uvx",
        "args": [
            "--from",
            "git+https://github.com/YanxingLiu/dify-mcp-server",
            "dify_mcp_server"
        ],
        "env": {
            "DIFY_BASE_URL": "",
            "DIFY_APP_SKS": ""
        }
    }
}

Model Context Protocol (MCP) Server for dify workflows

A simple implementation of an MCP server for usingdify. It achieves the invocation of the Dify workflow by calling the tools of MCP.

- [2025/4/15] zNow supports directly using environment variables to passbase_urlandapp_sks, making it more convenient to use with cloud-hosted platforms.

The server can be installed viaSmitheryor manually.

Step1: prepare config.yaml or enviroments

You can configure the server using either environment variables or aconfig.yamlfile.

Method 1: Using Environment Variables (Recommended for Cloud Platforms)

Set the following environment variables:

export DIFY_BASE_URL="https://cloud.dify.ai/v1" export DIFY_APP_SKS="app-sk1,app-sk2" # Comma-separated list of your Dify App SKs

- 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.

Create aconfig.yamlfile to store your Dify base URL and App SKs.

dify_base_url: "https://cloud.dify.ai/v1" dify_app_sks: - "app-sk1" # SK for workflow 1 - "app-sk2" # SK for workflow 2 # Add more SKs as needed

- 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):

# Create a directory if it doesn't exist mkdir -p ~/.config/dify-mcp-server # Create the config file cat > ~/.config/dify-mcp-server/config.yaml <<EOF dify_base_url: "https://cloud.dify.ai/v1" dify_app_sks: - "app-your-sk-1" - "app-your-sk-2" EOF echo "Configuration file created at ~/.config/dify-mcp-server/config.yaml"

When running the server (as shown in Step 2), you will need to provide the path to thisconfig.yamlfile via theCONFIG_PATHenvironment variable if you choose this method.

❓ If you haven't installed uv or uvx yet, you can do it quickly with the following command:

curl -Ls https://astral.sh/uv/install.sh | sh

✅ Method 1: Use uvx (no need to clone code, recommended)

{ "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", } } } }
{ "mcpServers": { "dify-mcp-server": { "command": "uvx", "args": [ "--from","git+https://github.com/YanxingLiu/dify-mcp-server","dify_mcp_server" ], "env": { "CONFIG_PATH": "/Users/lyx/Downloads/config.yaml" } } } }

✅ 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:

{ "mcpServers": { "mcp-server-rag-web-browser": { "command": "uv", "args": [ "--directory", "${DIFY_MCP_SERVER_PATH}", "run", "dify_mcp_server" ], "env": { "CONFIG_PATH": "$CONFIG_PATH" } } } }
{ "mcpServers": { "mcp-server-rag-web-browser": { "command": "uv", "args": [ "--directory", "${DIFY_MCP_SERVER_PATH}", "run", "dify_mcp_server" ], "env": { "CONFIG_PATH": "$CONFIG_PATH" } } } }
{ "mcpServers": { "dify-mcp-server": { "command": "uv", "args": [ "--directory", "/Users/lyx/Downloads/dify-mcp-server", "run", "dify_mcp_server" ], "env": { "DIFY_BASE_URL": "https://cloud.dify.ai/v1", "DIFY_APP_SKS": "app-sk1,app-sk2", } } } }

At last, you can use dify tools in any client who supports mcp.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Agent-native developer Q&A API with MCP + A2A endpoints for citations, job pickup, and answer submission.

Open-source, self-hosted AI gateway with built-in MCP client and server support for connecting MCP tools to AI applications.

A TypeScript-based server that integrates the Dify AI application platform with the MCP Client.

An agent that supports Function Calling and ReAct for the MCP protocol via HTTP with SSE or Streamable HTTP transport.

Integrate with the Flowise API to create predictions and manage chatflows and assistants.

Unified MCP gateway that gives AI agents access to 100+ tools, marketplace MCPs, and custom MCP servers through simple search and execute workflows.

a complete and intuitive SDK for building MCP Servers, MCP Agents, and LLM integrations (OpenAI, Claude, Gemini) with minimal effort. It abstracts all the complexity of the MCP protocol, provides an intelligent agent with automatic model routing, and includes a universal client for external APIs all through a single, simple, and powerful interface. Perfect for chatbots, enterprise automation, internal system integrations, and rapid development of MCP-based ecosystems.

Meta-MCP gateway: search ~75k MCP servers from the public registries via five meta-tools and call any of them on the fly — local-first, with SSRF guard and stdio allowlist.

A Node.js server for AI agents to discover, install, and manage new capabilities on demand via the MCP protocol.

Autonomous API discovery and subscription — agents browse APIs, get live keys, and make calls with no human involvement.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.