dify-plugin _compat_dify_tools
Dify 1.0 Plugin Convert your Dify tools's API to MCP compatible API
claude mcp add --transport stdio junjiem-dify-plugin-mcp_compat_dify_tools node server.js \ --env PORT="3000 (port for MCP server to listen on)" \ --env LOG_LEVEL="info (optional)" \ --env DIFY_API_BASE_URL="URL base for Dify API (optional if the plugin auto-discovers from config)"
How to use
This MCP server acts as a bridge that converts your Dify tools API into an MCP compatible API. It supports two transport modes for MCP clients to consume the converted APIs: Streamable HTTP (recommended) and HTTP with SSE (legacy). After running, you will expose endpoints that list and manage your Dify tools, and MCP clients can subscribe to endpoints, receive tool data, and invoke tool actions through the MCP protocol. The server surfaces configuration options to add or modify endpoints and tool lists, and it propagates changes to connected MCP clients in real time when endpoints are re-enabled.
To get started, deploy the MCP server, point your MCP client at the provided endpoint URL, and follow the prompts in the client to add your Dify endpoint and tool list. If you choose the Streamable HTTP transport, you’ll get a continuous, event-driven URL that MCP clients can subscribe to for updates. If you need compatibility with older clients, you can opt for the HTTP with SSE transport, which uses server-sent events for updates. The server handles authentication and transport negotiation as configured, and it will translate Dify tool API responses into MCP-compatible payloads so your clients can interact with tools in a uniform MCP format.
How to install
Prerequisites:
- Node.js (16.x or newer) and npm installed on your system
- Git to clone the repository
- A compatible environment for running the MCP server (Linux/macOS or Windows with WSL)
Step 1: Install prerequisites
- Install Node.js from https://nodejs.org/
- Ensure npm is available by running: npm -v
Step 2: Clone the MCP server repository
- git clone https://github.com/junjiem/dify-plugin-mcp_compat_dify_tools.git
- cd dify-plugin-mcp_compat_dify_tools
Step 3: Install dependencies
- npm install
Step 4: Configure environment
- Create a .env file or export environment variables as needed. Example: PORT=3000 DIFY_API_BASE_URL=https://api.dify.example LOG_LEVEL=info
Step 5: Run the server
- npm run start or
- node server.js
Step 6: Verify the MCP endpoint
- Access http://localhost:3000/health or your configured port to verify the service is running.
- Point your MCP client to the generated MCP endpoint URL and begin adding endpoints/tools as described in the README.
Additional notes
Tips and common considerations:
- The server supports two transports: Streamable HTTP (recommended) and HTTP with SSE. Choose the transport in your MCP client configuration or via the server settings if supported.
- Keep DIFY API base URL and authentication details up to date to ensure the tool metadata and tool results are fetched correctly.
- When editing an endpoint's tool list, changes may require the endpoint to be disabled and re-enabled to take effect, as noted in the original tooling behavior.
- If you encounter signature or plugin verification errors in related ecosystems, use the environment variable configurations as described in the FAQ of the associated Dify plugin to bypass or adjust verification as needed (with caution).
- Monitor logs (LOG_LEVEL) to troubleshoot transport issues or API translation errors between Dify and MCP payloads.
Related MCP Servers
web-eval-agent
An MCP server that autonomously evaluates web applications.
mcp-neo4j
Neo4j Labs Model Context Protocol servers
dify-plugin-tools _sse
Dify 1.0 Plugin MCP HTTP with SSE or Streamable HTTP transport Tools
dify -client
MCP Client as an Agent Strategy Plugin. Support GUI operation via UI-TARS-SDK.
Gitingest
mcp server for gitingest
dify-plugin-agent _sse
Dify 1.0 Plugin Support MCP Tools Agent strategies