Dify

v1.0.0Coding Agentsstable

Server for using Dify. It achieves the invocation of the Dify workflow by calling the tools of MCP.

dify-servermcpai-integration
Share:
275
Stars
0
Downloads
0
Weekly
0/5

What is Dify?

Dify is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to server for using dify. it achieves the invocation of the dify workflow by calling the tools of mcp.

Server for using Dify. It achieves the invocation of the Dify workflow by calling the tools of MCP.

This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Server for using Dify. It achieves the invocation of the Dif

Use Cases

Invoke Dify workflows through MCP tool calls.
Integrate Dify automation platform with AI agents.
YanxingLiu

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 13, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx dify-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Dify

The Dify MCP Server bridges Dify's AI workflow platform with any MCP-compatible client, letting you invoke Dify workflows and apps directly as MCP tool calls. It reads your Dify application secret keys and base URL from environment variables, then dynamically exposes each configured Dify app as a callable tool. This makes it straightforward to integrate sophisticated Dify-built AI pipelines into Claude, Cursor, or other agents without writing any glue code.

Prerequisites

  • Python 3.10+ and uv package manager installed (curl -Ls https://astral.sh/uv/install.sh | sh)
  • A Dify account with at least one published workflow or chatflow app
  • One or more Dify application secret keys (found in each app's API Access settings)
  • The Dify base URL for your instance (e.g. https://cloud.dify.ai/v1 or self-hosted endpoint)
  • An MCP-compatible client such as Claude Desktop or Cursor
1

Install uv

Install the uv Python package manager, which is required to run the Dify MCP server without cloning the repository.

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

Collect your Dify credentials

In your Dify dashboard, open each app you want to expose and copy the App Secret Key from the API Access section. Also note your base URL (https://cloud.dify.ai/v1 for Dify Cloud, or your self-hosted domain). Multiple app keys can be supplied as a comma-separated list.

3

Test the server manually

Run the server once from the command line to confirm your credentials work before adding it to your MCP client config.

DIFY_BASE_URL=https://cloud.dify.ai/v1 DIFY_APP_SKS=app-yourkey1,app-yourkey2 uvx --from git+https://github.com/YanxingLiu/dify-mcp-server dify_mcp_server
4

Add the server to your MCP client configuration

Open your MCP client's config file (e.g. claude_desktop_config.json for Claude Desktop) and add the dify-mcp-server entry with your credentials as environment variables.

{
  "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-yourkey1,app-yourkey2"
      }
    }
  }
}
5

Restart your MCP client

Restart Claude Desktop or your chosen MCP client so it picks up the new server configuration. Each configured Dify app will appear as a distinct tool in the client's tool list.

6

(Optional) Use a config.yaml file instead

Alternatively you can create a config.yaml file with your Dify credentials and point the server to it via the CONFIG_PATH environment variable.

# config.yaml
dify_base_url: "https://cloud.dify.ai/v1"
dify_app_sks:
  - "app-yourkey1"
  - "app-yourkey2"

Dify Examples

Client configuration

Complete claude_desktop_config.json entry using uvx to run the server directly from GitHub without cloning.

{
  "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-abc123,app-def456"
      }
    }
  }
}

Prompts to try

Example prompts you can use once the server is connected to your MCP client.

- "Run my Dify summarization workflow on this text: [paste text]"
- "Invoke my customer support Dify app with the question: How do I reset my password?"
- "Use my Dify translation workflow to translate this paragraph to Spanish"
- "List the tools available from Dify and describe what each one does"

Troubleshooting Dify

Server starts but no Dify tools appear in the client

Verify DIFY_APP_SKS contains valid, published app secret keys separated by commas and that DIFY_BASE_URL ends with /v1. Unpublished Dify apps do not expose an API and will be silently skipped.

uvx command not found after installing uv

Ensure uv's bin directory is in your PATH. Run `source $HOME/.local/bin/env` or restart your terminal session, then verify with `uvx --version`.

401 Unauthorized errors when calling Dify tools

Your app secret key is wrong or has been regenerated. Regenerate the key in Dify's API Access page and update the DIFY_APP_SKS value in your MCP config, then restart the client.

Frequently Asked Questions about Dify

What is Dify?

Dify is a Model Context Protocol (MCP) server that server for using dify. it achieves the invocation of the dify workflow by calling the tools of mcp. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Dify?

Follow the installation instructions on the Dify GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Dify?

Dify works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Dify free to use?

Yes, Dify is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Coding Agents MCP Servers

Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "dify-server": { "command": "npx", "args": ["-y", "dify-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Dify?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides