Dify

v1.0.0Coding Agentsstable

A server implementation that enables integration of Dify workflows with Model Context Protocol (MCP), allowing users to access Dify's capabilities through MCP-compatible clients.

dify-mcp-servermcpai-integration
Share:
41
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 implementation that enables integration of dify workflows with model context protocol (mcp), allowing users to access dify's capabilities through mcp-compatible clients.

A server implementation that enables integration of Dify workflows with Model Context Protocol (MCP), allowing users to access Dify's capabilities through MCP-compatible clients.

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

Features

  • A server implementation that enables integration of Dify wor

Use Cases

Integrate Dify workflows with Model Context Protocol.
Access Dify capabilities through MCP-compatible clients.
AI-FE

Maintainer

LicenseMIT License
Languagejavascript
Versionv1.0.0
UpdatedJan 25, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx dify-mcp-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 AI workflows with any MCP-compatible client, enabling you to trigger Dify applications and workflows from within Claude or other AI assistants through natural language. It connects to the Dify API using your personal API key and exposes a code generation tool powered by your configured Dify workflow — the included example generates Ant Design business component code by combining text prompts with optional image uploads. Developers who have built Dify workflows for content generation, data processing, or code assistance can surface those workflows as MCP tools without writing additional integration code.

Prerequisites

  • Node.js 18 or later and npm installed on your system
  • A Dify account with at least one published application or workflow
  • A Dify API key from your application's API Access page
  • Git to clone the repository
  • An MCP-compatible client such as Claude Desktop, Cline, or Continue
1

Clone and install the server

Clone the dify-mcp-server repository and install its Node.js dependencies.

git clone https://github.com/AI-FE/dify-mcp-server.git
cd dify-mcp-server
npm install
2

Build the server

Compile the TypeScript source into JavaScript. The output lands in the build/ directory.

npm run build
3

Obtain your Dify API key

Log in to your Dify workspace, open your target application, go to API Access, and copy your API key. This key authenticates all requests the MCP server makes to Dify.

4

Configure your MCP client

Add the server to your MCP client configuration, pointing to the built index.js and providing your Dify API key as an environment variable.

{
  "mcpServers": {
    "dify-server": {
      "command": "node",
      "args": ["/absolute/path/to/dify-mcp-server/build/index.js"],
      "env": {
        "DIFY_API_KEY": "your-dify-api-key-here"
      }
    }
  }
}
5

Restart your MCP client and verify

Quit and reopen Claude Desktop or your MCP client. The Dify workflow tools (such as antd-component-codegen-mcp-tool) should appear in the available tool list.

Dify Examples

Client configuration

claude_desktop_config.json entry for the Dify MCP Server using node to run the built output.

{
  "mcpServers": {
    "dify-server": {
      "command": "node",
      "args": ["/absolute/path/to/dify-mcp-server/build/index.js"],
      "env": {
        "DIFY_API_KEY": "your-dify-api-key-here"
      }
    }
  }
}

Prompts to try

Example queries to invoke your Dify workflows through the MCP server.

- "Generate an Ant Design form component for user registration with email, password, and username fields"
- "Create an Ant Design table component displaying order data with columns for ID, customer, amount, and status"
- "Build a dashboard card component using Ant Design that shows monthly revenue with a trend indicator"
- "Use my Dify workflow to generate a data filter panel with date range picker and dropdown filters"

Troubleshooting Dify

All Dify API calls fail with 401 Unauthorized errors

Verify that DIFY_API_KEY is set correctly in the env block and that the key belongs to a published Dify application. Generate a new key from the Dify application's API Access page if the current one has been revoked.

The server starts but no tools appear in the MCP client

Ensure 'npm run build' completed without errors and that the path in 'args' points to the build/index.js file (not src/). Use an absolute path to avoid working directory resolution issues.

Tool calls time out or return empty responses

Dify workflows can be slow to respond if they involve multiple LLM calls or external API lookups. Check the workflow execution logs in your Dify dashboard to see if it is completing. The MCP server streams responses, so very long workflows may exceed client timeout limits.

Frequently Asked Questions about Dify

What is Dify?

Dify is a Model Context Protocol (MCP) server that server implementation that enables integration of dify workflows with model context protocol (mcp), allowing users to access dify's capabilities through mcp-compatible clients. 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 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-mcp-server": { "command": "npx", "args": ["-y", "dify-mcp-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