用于 dify 工作流的模型上下文协议 (MCP) 服务器
一个使用dify 的MCP 服务器的简单实现,通过调用 MCP 的工具来实现对 Dify 工作流的调用。
📰 新闻
- [2025/4/15] zNow 支持直接使用环境变量传递
base_url
和app_sks
,更加方便与云托管平台一起使用。
🔨安装
该服务器可以通过Smithery或手动安装。
步骤1:准备config.yaml或环境
您可以使用环境变量或config.yaml
文件配置服务器。
方法一:使用环境变量(云平台推荐)
设置以下环境变量:
DIFY_BASE_URL
:您的 Dify API 的基本 URL。DIFY_APP_SKS
:以逗号分隔的 Dify 应用密钥 (SK) 列表。每个 SK 通常对应一个您希望通过 MCP 提供的 Dify 工作流程。
方法二:使用config.yaml
创建一个config.yaml
文件来存储您的 Dify 基本 URL 和 App SK。
示例config.yaml
:
dify_base_url
:Dify API 的基本 URL。dify_app_sks
:您的 Dify 应用密钥 (SK) 列表。每个 SK 通常对应不同的 Dify 工作流程。
您可以使用以下命令快速创建此文件(根据需要调整路径和值):
运行服务器时(如步骤 2 所示),如果选择此方法,则需要通过CONFIG_PATH
环境变量提供此config.yaml
文件的路径。
步骤2:在客户端上安装
❓ 如果您尚未安装 uv 或 uvx,则可以使用以下命令快速安装:
✅ 方法一:使用 uvx(无需 clone 代码,推荐)
或者
✅ 方法二:使用 uv(本地克隆+uv 启动)
您也可以在客户端手动运行 dify mcp 服务器。客户端的配置格式如下:
或者
示例配置:
好好享受
最后,您可以在任何支持 mcp 的客户端上使用 dify 工具。
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Dify使用服务器,通过调用 MCP 的工具实现 Dify 工作流的调用。
Related MCP Servers
- -securityFlicense-qualityA TypeScript implementation of a Model Context Protocol (MCP) server that exposes Dify workflows as tools for AI systems to interact with.Last updated -16TypeScript
- -securityFlicense-qualityA plugin that allows Dify to connect to multiple MCP (Model Control Protocol) servers using HTTP with Server-Sent Events transport, supporting custom configurations for URLs, headers, and timeouts.Last updated -124Python
- -securityFlicense-qualityExposes Dify applications (both Chatflow and Workflow) as MCP (Model Context Protocol) servers, allowing Claude and other MCP clients to directly interact with Dify apps through a standardized protocol.Last updated -18Python
- -securityFlicense-qualityA Dify endpoint plugin that transforms a Dify application into a Model Control Protocol server, allowing tools like Cursor to connect to and utilize your custom Dify workflows.Last updated -38Python