Dify

v1.0.0Coding Agentsstable

Production-ready platform for agentic workflow development.

agentagentic-aiagentic-frameworkagentic-workflowai
Share:
142,215
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 production-ready platform for agentic workflow development.

Production-ready platform for agentic workflow development.

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

Features

  • Production-ready platform for agentic workflow development.

Use Cases

AI workflow orchestration
Application builder
langgenius

Maintainer

LicenseNOASSERTION
Languagetypescript
Versionv1.0.0
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y @tonlab/dify-mcp-server

Manual Installation

npx -y @tonlab/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

Dify is an open-source LLM application development platform that combines visual AI workflow building, RAG pipeline management, agent creation, and LLMOps observability into a single self-hosted or cloud product. The Dify MCP server (@tonlab/dify-mcp-server) exposes your Dify instance's applications and workflows as callable tools, so an AI client like Claude can invoke Dify-hosted agents, chatflows, and text generation apps directly through natural language. This bridges Dify's no-code workflow builder with code-level AI clients, letting teams reuse production Dify apps inside any MCP-compatible environment.

Prerequisites

  • A running Dify instance — either Dify Cloud (dify.ai) or self-hosted via Docker Compose
  • A Dify API key for the application or workspace you want to expose
  • Node.js 18 or higher installed
  • An MCP-compatible client such as Claude Desktop or Claude Code CLI
1

Set up a Dify instance

If you do not already have Dify running, deploy it locally with Docker Compose. The minimum requirement is 2 CPU cores and 4 GiB RAM. After startup, open http://localhost/install to complete initialization.

git clone https://github.com/langgenius/dify.git
cd dify/docker
cp .env.example .env
docker compose up -d
2

Obtain a Dify API key

In the Dify dashboard, open the application you want to expose via MCP, go to API Access, and copy the API key. You will also need your Dify base URL (e.g., http://localhost or https://api.dify.ai/v1 for Dify Cloud).

3

Install the Dify MCP server

The server is published to npm as @tonlab/dify-mcp-server. You can run it directly with npx without a global install.

npx -y @tonlab/dify-mcp-server
4

Add to your MCP client configuration

Register the server in your Claude Desktop config file, passing your Dify API key and base URL as environment variables.

{
  "mcpServers": {
    "dify": {
      "command": "npx",
      "args": ["-y", "@tonlab/dify-mcp-server"],
      "env": {
        "DIFY_API_KEY": "your-dify-api-key",
        "DIFY_BASE_URL": "http://localhost/v1"
      }
    }
  }
}
5

Restart Claude Desktop and test

Restart your MCP client and ask it to invoke one of your Dify applications by name. The server will proxy the request to your Dify instance and return the response.

Dify Examples

Client configuration

Full Claude Desktop config for the Dify MCP server connecting to a local Dify instance.

{
  "mcpServers": {
    "dify": {
      "command": "npx",
      "args": ["-y", "@tonlab/dify-mcp-server"],
      "env": {
        "DIFY_API_KEY": "app-xxxxxxxxxxxxxxxxxxxxxxxx",
        "DIFY_BASE_URL": "http://localhost/v1"
      }
    }
  }
}

Prompts to try

Example prompts that invoke Dify-hosted workflows and agents from your MCP client.

- "Run my 'Customer Support' Dify chatflow with this user message: 'How do I reset my password?'"
- "Use the 'Document Summarizer' Dify app to summarize this PDF text"
- "Invoke my 'Code Review' Dify agent on this Python function"
- "List the Dify applications available in my workspace"
- "Run the 'SEO Blog Writer' workflow with topic 'AI monitoring tools' and tone 'professional'"

Troubleshooting Dify

Server starts but returns 'Unauthorized' when invoking a Dify app

Double-check that DIFY_API_KEY is the application-level API key, not a user password. In Dify, each app has its own API key found under API Access in the app settings panel.

DIFY_BASE_URL connection refused or timeout

For a local Docker Compose install, use http://localhost/v1 (not port 3000 or 8080). For Dify Cloud, the base URL is https://api.dify.ai/v1. Check that your Dify containers are running with 'docker compose ps' from the docker directory.

npx -y @tonlab/dify-mcp-server exits immediately with no output

The package requires DIFY_API_KEY to be set. Without it the server exits on startup. Make sure the env block in your MCP config file is correctly formatted JSON and the key name is exactly DIFY_API_KEY.

Frequently Asked Questions about Dify

What is Dify?

Dify is a Model Context Protocol (MCP) server that production-ready platform for agentic workflow development. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Dify?

Install via npm with the command: npx -y @tonlab/dify-mcp-server. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

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 NOASSERTION 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": { "command": "npx", "args": ["-y", "@tonlab/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