Back to MCP directory
publicPublicdnsLocal runtime

dify-plugin-mcp_server

Dify插件,将Dify应用转换为MCP服务器

article

README

🚀 Dify MCP 服务器插件

这是一个端点插件,可将 Dify 应用转变为 MCP 服务器,为相关应用提供强大的功能扩展。不过为保证数据安全,建议仅在私有网络中使用。

🚀 快速开始

1. 创建 Dify 工作流应用

创建一个简单的 Dify 工作流应用,参考示例图: 1

2. 添加端点并选择插件

添加一个端点,并选择此插件。需注意,该应用的输入 schema 必须定义其输入参数。对于聊天类 Dify 应用,请确保在输入 schema 中包含 query 字段,示例格式如下:

{
    "name": "get_weather",
    "description": "获取某个地点的天气状态。",
    "inputSchema": {
        "properties": {
            "place": {"title": "地点", "type": "字符串"}
        },
        "required": ["place"],
        "title": "get_weatherArguments",
        "type": "对象"
    }
}

参考示例图: 2

3. 复制端点 URL 到 MCP 客户端

将端点 URL 复制到您的 MCP 客户端,例如 Cherry Studio,有以下两种方案可供选择:

方案 1: 使用最新的流式 HTTP 协议(推荐)

6 7

方案 2: 使用旧版 SSE 协议

3 4

4. 开始使用

完成上述步骤后,即可享受使用啦! 5

📚 详细文档

插件信息

| 属性 | 详情 | |------|------| | 作者 | hjlarry | | 版本 | 0.0.2 | | 类型 | 扩展 | | 仓库 | https://github.com/hjlarry/dify-plugin-mcp_server | | 功能请求 | 问题 |

变更日志

0.0.2

  • 添加新的流式 HTTP 协议。
  • 更新 Dify 插件 SDK 版本。

⚠️ 重要提示

为了保证数据安全,请仅在私有网络中使用此插件。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client