用于通过模型上下文协议(MCP)与Dify Workflow轻松集成的工具服务器。
要在Claude桌面应用中使用,请在Claude的配置文件中添加以下设置:
添加到 %AppData%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"dify-workflow": {
"command": "npx",
"args": ["@tonlab/dify-mcp-server"],
"env": {
"DIFY_BASE_URL": "https://your-dify-endpoint",
"DIFY_API_KEY": "your-api-key-here"
}
}
}
}
现在可以配置多个Dify API密钥,这将创建多个工具(每个API密钥一个):
{
"mcpServers": {
"dify": {
"command": "npx",
"args": ["@tonlab/dify-mcp-server"],
"env": {
"DIFY_BASE_URL": "https://api.dify.ai/v1",
"DIFY_API_KEYS": "app-FirstAPIKeyHere,app-SecondAPIKeyHere,app-ThirdAPIKeyHere"
}
}
}
}
每个API密钥将在Claude中作为单独的工具暴露,并且会在工具名称后追加一个不同的数字。
添加到 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"dify-workflow": {
"command": "npx",
"args": ["@tonlab/dify-mcp-server"],
"env": {
"DIFY_BASE_URL": "https://your-dify-endpoint",
"DIFY_API_KEY": "your-api-key-here"
}
}
}
}
如上所述的多API密钥配置同样适用于macOS/Linux。
MIT
</中文翻译>