drio
Open app

Model Context Protocol (MCP) Server for dify workflows

Source

Mirror of

Catalog onlyCatalog onlySTDIO

Overview

The Model Context Protocol (MCP) Server is a simple implementation designed to facilitate the invocation of Dify workflows by calling the tools of MCP.

To use the MCP Server, you need to prepare a config.yaml file with your Dify base URL and secret keys, then run the server in your client with the appropriate configuration.

  • Simple setup with a configuration file - Supports multiple Dify workflows through different secret keys - Easy integration with clients that support MCP
  1. Automating workflows in applications using Dify.
  2. Integrating Dify tools into web applications.
  3. Facilitating server-client communication for Dify workflows.

Add to your AI client

Use these steps to connect Model Context Protocol (MCP) Server for dify workflows in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "yanxingliu-dify-mcp-server-mcp-mirror": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-yanxingliu-dify-mcp-server-mcp-mirror"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "yanxingliu-dify-mcp-server-mcp-mirror": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-yanxingliu-dify-mcp-server-mcp-mirror"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "yanxingliu-dify-mcp-server-mcp-mirror": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-yanxingliu-dify-mcp-server-mcp-mirror"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "yanxingliu-dify-mcp-server-mcp-mirror": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-yanxingliu-dify-mcp-server-mcp-mirror"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "yanxingliu-dify-mcp-server-mcp-mirror": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-yanxingliu-dify-mcp-server-mcp-mirror"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "yanxingliu-dify-mcp-server-mcp-mirror": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-yanxingliu-dify-mcp-server-mcp-mirror"
      ]
    }
  }
}

FAQ

What is required to run the MCP Server?

You need a `config.yaml` file with your Dify base URL and secret keys.

Can I use multiple workflows with the MCP Server?

Yes! You can configure different secret keys for different workflows in your `config.yaml` file.

Is there any client compatibility requirement?

The MCP Server can be used with any client that supports the Model Context Protocol.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":1168,"uuid":"971b44d5-3c28-45df-9576-737897f956b3","name":"YanxingLiu_dify-mcp-server","title":"Model Context Protocol (MCP) Server for dify workflows","description":"Mirror of","avatar_url":"https://avatars.githubusercontent.com/u/192820360?v=4","created_at":"2025-01-28T02:35:58.829+00:00","updated_at":"2025-02-23T07:20:28.875+00:00","status":"created","author_name":"MCP-Mirror","author_avatar_url":"https://avatars.githubusercontent.com/u/192820360?v=4","tags":"mcp,dify,workflow,server","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/MCP-Mirror/YanxingLiu_dify-mcp-server","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":null,"user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]