# dify-mcp-client

> MCP Server

This repository provides an MCP Client plugin for Dify, enabling ReAct Agent strategies to connect to MCP servers, convert tools, and utilize LLMs within a ReAct loop. This repository provides

## Overview

- **Category:** AI
- **Language:** Python
- **Stars:** 172
- **Forks:** 6
- **Owner:** 3dify-project
- **GitHub:** https://github.com/3dify-project/dify-mcp-client
- **Created:** 2025-03-10T11:36:37+00:00
- **Updated:** 2025-03-28T15:43:39+00:00
- **Source:** https://model-context-protocol.com/servers/dify-mcp-agent-strategy-client-plugin

## Setup

## Setup

1.  **Install the plugin from GitHub:** Enter the repository name `https://github.com/3dify-project/dify-mcp-client/` in Dify > PLUGINS > + Install plugin > INSTALL FROM > GitHub.
2.  **Install the plugin from .difypkg file:** Download a suitable version of `.difypkg` from Releases and install it via Dify > PLUGINS > + Install plugin > INSTALL FROM > Local Package File.
3.  **Handle plugin installation errors:** If you encounter a signature error, add `FORCE_VERIFYING_SIGNATURE=false` to `/docker/.env`, then restart Dify with `docker compose down` and `docker compose up -d`.
4.  **Source code plugin deploy:** Follow the instructions at [how-to-develop-and-deploy-plugin](https://github.com/3dify-project/dify-mcp-client?tab=readme-ov-file#how-to-develop-and-deploy-plugin).
5.  **Configure the MCP Agent Plugin node:** Provide a `config_json` with MCP server URLs, ensuring each server has a different port number.
6.  **Convert stdio MCP server into SSE MCP server:** Use option1 (Edit MCP server's code) or option2 (via mcp-proxy).
7.  **Develop and deploy plugin:** Follow the general plugin dev guide and Dify plugin SDK daemon instructions, including installing Python modules and packaging into `.difypkg`.


## Tools

## Available Tools

1.  **MCP Client as Agent Strategy Plugin:** Allows Dify to act as an MCP Host, connecting to MCP servers.
2.  **Dify Tools Conversion:** Converts `Tool`, `Resource`, `Prompt` lists into Dify Tools.
3.  **ReAct Agent Implementation:** Implements the ReAct loop (Reason -> Act -> Observe) for LLM tool calling.
4.  **SSE MCP Client:** Supports SSE for MCP communication.
5.  **Multi SSE Server Support:** Allows connection to multiple SSE servers.
6.  **mcp-proxy:** Converts stdio MCP server into SSE MCP server.

