Dify as MCP

v1.0.0APIsstable

Exposes Dify applications (both Chatflow and Workflow) as MCP (Model Context Protocol) servers, allowing Claude and other MCP clients to directly interact with Dify apps through a standardized protocol.

dify-as-mcp-servermcpai-integration
Share:
36
Stars
0
Downloads
0
Weekly
0/5

What is Dify as MCP?

Dify as MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to exposes dify applications (both chatflow and workflow) as mcp (model context protocol) servers, allowing claude and other mcp clients to directly interact with dify apps through a standardized protoco...

Exposes Dify applications (both Chatflow and Workflow) as MCP (Model Context Protocol) servers, allowing Claude and other MCP clients to directly interact with Dify apps through a standardized protocol.

This server falls under the APIs and Business Applications categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Exposes Dify applications (both Chatflow and Workflow) as MC

Use Cases

Expose Dify Chatflow and Workflow applications as standard MCP servers.
Allow Claude and other MCP clients to interact with Dify apps directly.
Integrate Dify workflows into AI assistant interactions via standardized protocol.
Yevanchen

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedOct 29, 2025
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx dify-as-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 as MCP

Dify as MCP Server is a Dify plugin that exposes your Dify Chatflow and Workflow applications as standard MCP (Model Context Protocol) servers, allowing Claude Desktop, Cursor, and other MCP clients to directly call your Dify apps as tools. It auto-generates tool definitions — including names, input schemas, and return types — from your existing Dify workflows, acting as a bridge between the Dify AI platform and the broader MCP ecosystem. Teams that have already built workflows in Dify can instantly make them available to any MCP-compatible AI assistant without rewriting integrations.

Prerequisites

  • A running Dify instance (self-hosted or Dify Cloud) with at least one Workflow or Chatflow application configured
  • The Dify as MCP Server plugin installed on your Dify instance via the Dify Plugin Marketplace
  • An MCP-compatible client such as Claude Desktop or Cursor
  • Network access from your MCP client to your Dify instance URL
1

Install the plugin on your Dify instance

Open your Dify instance, navigate to the Plugin Marketplace, and search for 'Dify as MCP Server'. Install the plugin to your workspace.

2

Create or verify a Dify Workflow or Chatflow

Ensure your Dify instance has at least one published Workflow or Chatflow application. The plugin will automatically discover these apps and expose them as MCP tools. Note your Dify instance base URL.

3

Identify your Dify MCP server endpoint

After installing the plugin, your Dify apps are accessible via a URL in the format: https://your-dify-instance/difyapp_as_mcp_server. Each app is exposed as a separate MCP tool with auto-generated input schemas.

4

Add the Dify MCP server to your client

Configure your MCP client (e.g., Claude Desktop) to connect to the Dify MCP server URL. The server operates in stateless HTTP mode using the MCP Streamable HTTP specification.

5

Test the integration by invoking a Dify workflow

Ask Claude to use one of your Dify workflows by name. Claude will discover and list available tools from the Dify MCP endpoint and call the appropriate workflow with the parameters you provide.

Dify as MCP Examples

Client configuration

Add this block to your claude_desktop_config.json. Replace the URL with your actual Dify instance address. The server uses HTTP transport (Streamable HTTP), not stdio.

{
  "mcpServers": {
    "dify-apps": {
      "type": "http",
      "url": "https://your-dify-instance/difyapp_as_mcp_server"
    }
  }
}

Prompts to try

Once connected, Claude can call your Dify workflows by their configured names and descriptions.

- "List all available Dify workflow tools you can access."
- "Run my document summarization workflow on this text: [paste text]"
- "Use the customer support chatflow to answer: how do I reset my password?"
- "Trigger my data extraction workflow with this input: [data]"
- "What Dify apps are available and what do they do?"

Troubleshooting Dify as MCP

No tools appear after adding the Dify MCP server to the client

Confirm that your Dify workflows or chatflows are published and not in draft state. The plugin only exposes published applications. Also verify the server URL is reachable from your MCP client by opening it in a browser.

Connection refused or timeout when connecting to the Dify MCP endpoint

Check that your Dify instance is running and accessible at the configured URL. For self-hosted Dify, ensure the plugin is enabled and the server is not behind a firewall blocking your MCP client. For HTTPS, verify the SSL certificate is valid.

Tool invocation returns an error about missing input parameters

Each Dify workflow exposes the input parameters you defined in the workflow editor. Make sure all required fields in your Dify workflow are properly named and described — the plugin uses these to generate the MCP tool schema that Claude reads.

Frequently Asked Questions about Dify as MCP

What is Dify as MCP?

Dify as MCP is a Model Context Protocol (MCP) server that exposes dify applications (both chatflow and workflow) as mcp (model context protocol) servers, allowing claude and other mcp clients to directly interact with dify apps through a standardized protocol. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Dify as MCP?

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

Which AI clients work with Dify as MCP?

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

Is Dify as MCP free to use?

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

Browse More APIs MCP Servers

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

Quick Config Preview

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

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

Read the full setup guide →

Ready to use Dify as MCP?

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