MCP Server
Overview
MCP Server is a Dify endpoint plugin that transforms a Dify app into a MCP server, allowing for seamless integration and communication with various clients.
To use MCP Server, create a simple workflow app in Dify, add an endpoint, and copy the endpoint URL to your MCP client. Follow the provided input schema to define the parameters for your app.
- Converts Dify apps into MCP servers - Supports custom input schemas for various applications - Easy integration with clients like cursor
- Building weather applications that fetch data based on user input.
- Creating interactive applications that require real-time data processing.
- Developing custom workflows that integrate with existing Dify apps.
Add to your AI client
Use these steps to connect MCP Server 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": {
"dify-plugin-mcp-server-hjlarry": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-dify-plugin-mcp-server-hjlarry"
]
}
}
}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": {
"dify-plugin-mcp-server-hjlarry": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-dify-plugin-mcp-server-hjlarry"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"dify-plugin-mcp-server-hjlarry": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-dify-plugin-mcp-server-hjlarry"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"dify-plugin-mcp-server-hjlarry": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-dify-plugin-mcp-server-hjlarry"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"dify-plugin-mcp-server-hjlarry": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-dify-plugin-mcp-server-hjlarry"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"dify-plugin-mcp-server-hjlarry": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-dify-plugin-mcp-server-hjlarry"
]
}
}
}FAQ
What is the purpose of MCP Server?
MCP Server allows developers to create applications that can communicate with various clients by transforming Dify apps into MCP servers.
Is there a specific programming language required?
MCP Server is built using Python, but it can be integrated with any client that supports HTTP requests.
How do I define input parameters for my app?
You can define input parameters using a JSON schema that describes the expected input format.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":3268,"uuid":"8a14705e-2541-430a-9a12-0e6b08d3b0ba","name":"dify-plugin-mcp_server","title":"MCP Server","description":"","avatar_url":"https://avatars.githubusercontent.com/u/25834719?v=4","created_at":"2025-03-18T12:13:40.559Z","updated_at":"2025-03-18T14:01:15.492Z","status":"created","author_name":"hjlarry","author_avatar_url":"https://avatars.githubusercontent.com/u/25834719?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/hjlarry/dify-plugin-mcp_server","target":"_self","content":"$29","summary":"$2a","img_url":"https://github.com/hjlarry/dify-plugin-mcp_server/raw/main/_assets/1.png","type":null,"metadata":"{\"star\":\"18\",\"license\":\"\",\"language\":\"Python\",\"is_official\":false,\"latest_commit_time\":\"2025-04-25 15:03:45\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]