home / mcp / dify mcp server

Dify MCP Server

Agent strategies for discovering and calling tools via MCP using Function Calling and ReAct over SSE or Streamable HTTP

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "junjiem-dify-plugin-agent-mcp_sse": {
      "url": "https://mcp.composio.dev/tavily/xxxx-xxxx-xxxx-xxxx"
    }
  }
}

You can use MCP-based agent strategies to enable your applications to discover and call tools through the MCP protocol via SSE or Streamable HTTP transports. This setup lets your agent perform actions and react to user input by coordinating with remote MCP servers that host and expose tools.

How to use

To use the MCP-enabled agent strategies, point your client at MCP servers that support Function Calling and ReAct. The agent will query available tools and invoke them through the MCP protocol over SSE or Streamable HTTP, allowing seamless tool orchestration across distributed services. You can enrich the agent’s capabilities by connecting to multiple MCP service instances that expose different tool sets.

How to install

Prerequisites: ensure you have a supported runtime environment and access to install or run the MCP plugin agent. Install the plugin via GitHub by following these steps.

1. Open your Dify platform plugin management page.
2. Choose to install via GitHub.
3. Enter the repository address: junjiem/dify-plugin-agent-mcp_sse
4. Select a version and package file to complete installation.

Additional setup and configuration

Configure connections to MCP servers by listing them under mcpServers. You can specify multiple servers, each with its transport and URL. The following examples show common configurations using SSE and Streamable HTTP transports.

{
  "server_name1": {
    "transport": "sse",
    "url": "http://127.0.0.1:8000/sse",
    "headers": {},
    "timeout": 50,
    "sse_read_timeout": 50
  },
  "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": 50
  },
  "server_name4": {
    "transport": "streamable_http",
    "url": "http://127.0.0.1:8003/mcp"
  }
}
```

```
{
  "mcpServers": {
      "server_name1": {
        "transport": "sse",
        "url": "http://127.0.0.1:8000/sse",
        "headers": {},
        "timeout": 50,
        "sse_read_timeout": 50
      },
      "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": 50
      },
      "server_name4": {
        "transport": "streamable_http",
        "url": "http://127.0.0.1:8003/mcp"
      }
    }
}

Managed MCP Servers and examples

You can connect to managed MCP servers hosted by various providers. Use the MCP URL or stream type shown in each example to configure your client.

Example 1: Composio Managed MCP Servers. The URL below is used to access Tavily’s MCP service.

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

Example 2: Zapier Managed MCP Servers. Copy the MCP Server URL for use in the plugin configuration.

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

Example 3: MCP.so Managed MCP Servers. Demonstrates both Streamable HTTP and SSE configurations.

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

```
{
  "tavily-mcp": {
    "url": "https://router.mcp.so/sse/xxxxxxxxxxx"
  }
}
Dify MCP Server - junjiem/dify-plugin-agent-mcp_sse