Sponsored by Deepsite.site

Dify Agent Mcp Sse

Created By
junjiem8 months ago
Content

Dify 1.0 Plugin Support MCP Tools Agent strategies

Author: Junjie.M
Type: agent-strategy
Github Repo: https://github.com/junjiem/dify-plugin-agent-mcp_sse
Github Issues: issues


Description

Agent strategies collection that provide Function Calling and ReAct (Support fetch and call tools by MCP protocol through HTTP with SSE or Streamable HTTP transport).

提供 Function CallingReAct 的 Agent 策略集合 (支持通过 HTTP with SSEStreamable HTTP 传输方式使用 MCP 协议来发现和调用工具)。

mcp_sse_agent

mcp_sse_agent_strategies

mcp_sse_agent_react

MCP Servers config, support multiple MCP services. The following example:

MCP服务配置,支持多个MCP服务。 如下示例:

{
  "server_name1": {
    "transport": "sse",
    "url": "http://127.0.0.1:8000/sse",
    "headers": {},
    "timeout": 60,
    "sse_read_timeout": 300
  },
  "server_name2": {
    "transport": "sse",
    "url": "http://127.0.0.1:8001/sse"
  },
  "server_name3": {
    "transport": "streamable_http",
    "url": "http://127.0.0.1:8002/mcp",
    "headers": {},
    "timeout": 60
  },
  "server_name4": {
    "transport": "streamable_http",
    "url": "http://127.0.0.1:8003/mcp"
  }
}

OR

{
  "mcpServers": {
      "server_name1": {
        "transport": "sse",
        "url": "http://127.0.0.1:8000/sse",
        "headers": {},
        "timeout": 60,
        "sse_read_timeout": 300
      },
      "server_name2": {
        "transport": "sse",
        "url": "http://127.0.0.1:8001/sse"
      },
      "server_name3": {
        "transport": "streamable_http",
        "url": "http://127.0.0.1:8002/mcp",
        "headers": {},
        "timeout": 60
      },
      "server_name4": {
        "transport": "streamable_http",
        "url": "http://127.0.0.1:8003/mcp"
      }
    }
}

Note: "transport" parameter as sse or streamable_http, default sse.

注: "transport" 参数为 ssestreamable_http ,默认为 sse


Managed MCP Servers 托管的MCP服务器

If you want to try MCP but don't know how to deploy SSE transport's MCP Server, can you try connect to Managed MCP Servers.

如果你想尝试 MCP,但是不知道如何部署 SSE 传输的 MCP Server,可以尝试连接托管的 MCP 服务器。

Example 1 示例1

Composio Managed MCP Servers

Composio 托管的 MCP 服务器

composio_mcp_list

Reference Cursor Settings, shown below:

参考 Cursor 设置,如下图:

composio_mcp_cursor composio_mcp_cursor2

MCP Servers config, shown below:

MCP 服务配置,如下示例:

{
  "tavily": {
    "url": "https://mcp.composio.dev/tavily/xxxx-xxxx-xxxx-xxxx"
  }
}

Example 2 示例2

Zapier Managed MCP Servers

Zapier 托管的 MCP 服务器

Copy the MCP Server URL for use in the Dify plug-in configuration.

复制 MCP Server URL,在 Dify 插件配置中使用。

zapier_mcp_servers

MCP Servers config, shown below:

MCP 服务配置,如下示例:

{
  "zapier-mcp": {
    "url": "https://actions.zapier.com/mcp/sk-xxxxxxxxxx/sse"
  }
}

Click "Edit MCP Actions" to go to the page for adding tools and actions.

点击 “Edit MCP Actions” ,进入工具和操作的添加页面。

zapier_mcp_edit_actions

Click "Add a new action" to add the required MCP service instance.

点击 “Add a new action”,添加需要的MCP服务实例。

zapier_mcp_add_actions

You can also continue to add different actions to enrich the tool set available to the Agent.

你还可以继续添加不同的 Action,丰富 Agent 可用的工具集。

Example 3 示例3

MCP.so Managed MCP Servers

MCP.so 托管的 MCP 服务器

Streamable HTTP

mcpso_mcp_servers_streamable_http

MCP Servers config, shown below:

MCP 服务配置,如下示例:

{
  "tavily-mcp": {
    "transport": "streamable_http",
    "url": "https://router.mcp.so/mcp/xxxxxxxxxxx"
  }
}
SSE

mcpso_mcp_servers_sse

MCP Servers config, shown below:

MCP 服务配置,如下示例:

{
  "tavily-mcp": {
    "url": "https://router.mcp.so/sse/xxxxxxxxxxx"
  }
}

Installing Plugins via GitHub 通过 GitHub 安装插件

Can install the plugin using the GitHub repository address. Visit the Dify platform's plugin management page, choose to install via GitHub, enter the repository address, select version number and package file to complete installation.

可以通过 GitHub 仓库地址安装该插件。访问 Dify 平台的插件管理页,选择通过 GitHub 安装插件,输入仓库地址后,选择版本号和包文件完成安装。

install_plugin_via_github


FAQ

1. How to Handle Errors When Installing Plugins? 安装插件时遇到异常应如何处理?

Issue: If you encounter the error message: plugin verification has been enabled, and the plugin you want to install has a bad signature, how to handle the issue?

Solution: Add the following line to the end of your .env configuration file: FORCE_VERIFYING_SIGNATURE=false Once this field is added, the Dify platform will allow the installation of all plugins that are not listed (and thus not verified) in the Dify Marketplace.

问题描述:安装插件时遇到异常信息:plugin verification has been enabled, and the plugin you want to install has a bad signature,应该如何处理?

解决办法:在 .env 配置文件的末尾添加 FORCE_VERIFYING_SIGNATURE=false 字段即可解决该问题。 添加该字段后,Dify 平台将允许安装所有未在 Dify Marketplace 上架(审核)的插件,可能存在安全隐患。

2. How to install the offline version 如何安装离线版本

Scripting tool for downloading Dify plugin package from Dify Marketplace and Github and repackaging [true] offline package (contains dependencies, no need to be connected to the Internet).

从Dify市场和Github下载Dify插件包并重新打【真】离线包(包含依赖,不需要再联网)的脚本工具。

Github Repo: https://github.com/junjiem/dify-plugin-repackaging

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Tavily Mcp
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
CursorThe AI Code Editor
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
WindsurfThe new purpose-built IDE to harness magic
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Serper MCP ServerA Serper MCP Server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Playwright McpPlaywright MCP server
DeepChatYour AI Partner on Desktop
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
ChatWiseThe second fastest AI chatbot™
Amap Maps高德地图官方 MCP Server