Overview
Dify MCP Server is a TypeScript implementation of a Model Context Protocol (MCP) server that exposes Dify workflows as tools.
To use Dify MCP Server, install it via Smithery, configure it with your Dify API keys, and start the server to expose Dify workflows.
- Converts Dify applications into MCP tools - Supports streaming responses from Dify workflows - Configurable via YAML configuration file - Written in TypeScript for type safety
- Integrating Dify workflows into applications as tools
- Enabling real-time streaming responses for Dify applications
- Simplifying the configuration and deployment of Dify services
Add to your AI client
Use these steps to connect Dify MCP Server (TypeScript) 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": {
"faiz-gear-dify-mcp-server-ts-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-faiz-gear-dify-mcp-server-ts-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": {
"faiz-gear-dify-mcp-server-ts-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-faiz-gear-dify-mcp-server-ts-mcp-mirror"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"faiz-gear-dify-mcp-server-ts-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-faiz-gear-dify-mcp-server-ts-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": {
"faiz-gear-dify-mcp-server-ts-mcp-mirror": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-faiz-gear-dify-mcp-server-ts-mcp-mirror"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"faiz-gear-dify-mcp-server-ts-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-faiz-gear-dify-mcp-server-ts-mcp-mirror"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"faiz-gear-dify-mcp-server-ts-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-faiz-gear-dify-mcp-server-ts-mcp-mirror"
]
}
}
}FAQ
What are the prerequisites for using Dify MCP Server?
You need Node.js 18 or higher and npm 8 or higher, along with access to Dify API and application secret keys.
How do I install Dify MCP Server?
You can install it via Smithery or by cloning the repository and installing dependencies manually.
Can I configure the server?
Yes, the server can be configured using a YAML file to set the Dify base URL and application secret keys.