A Model Context Protocol (MCP) service for Dify API integration.
You can install the package globally using npm:
npm install -g @winstonsias/dify-api-mcp-service
Or use npx to run it directly:
npx @winstonsias/dify-api-mcp-service
After installation, you can start the service using:
dify-api-mcp-service --base-url "https://api.dify.ai" --chat-api-key "your-chat-api-key" --workflow-api-key "your-workflow-api-key"
The service accepts the following command line arguments:
-
--base-url
: The base URL of your Dify API instance -
--chat-api-key
: Your Dify chat API key (comma-separated for multiple keys) -
--workflow-api-key
: Your Dify workflow API key (optional, comma-separated for multiple keys)
Example:
dify-api-mcp-service \
--base-url "https://api.dify.ai" \
--chat-api-key "key1,key2,key3" \
--workflow-api-key "workflow-key1,workflow-key2"
- Chat message handling
- Workflow execution
- Dynamic tool registration based on app parameters
- Comprehensive logging
- 5-minute request timeout
Logs are written to daily files in the logs
directory with the format YYYYMMDD.log
.
MIT