dify-mcp-client
by 3dify-project
The MCP Client acts as an Agent Strategy Plugin for Dify, enabling Dify to function as an MCP Host. It allows ReAct Agents to connect to MCP servers and utilize their tools and resources within the Dify environment.
Last updated: N/A
What is dify-mcp-client?
The dify-mcp-client is a plugin that allows Dify to interact with MCP (Model Context Protocol) servers. It enables Dify agents, specifically ReAct agents, to utilize tools, resources, and prompts from MCP servers within their reasoning and action loops.
How to use dify-mcp-client?
The plugin can be installed from GitHub or a .difypkg file through the Dify interface. After installation, it can be used as an Agent node in Dify workflows by selecting the 'mcpReAct' strategy. Configuration requires providing a JSON object specifying the URLs or commands to connect to MCP servers.
Key features of dify-mcp-client
Connects Dify agents to MCP servers
Converts MCP tools, resources, and prompts into Dify tools
Enables LLMs to call MCP tools based on the ReAct loop
Supports multiple SSE servers
Provides a GUI input field for configuration via JSON
Use cases of dify-mcp-client
Integrating external tools and resources into Dify workflows
Enabling LLMs to access real-time information and perform actions through MCP servers
Creating more powerful and versatile Dify agents
Connecting Dify to various MCP-compliant services and applications
FAQ from dify-mcp-client
How do I install the plugin?
How do I install the plugin?
You can install the plugin from GitHub by providing the repository URL or from a local .difypkg file through the Dify interface.
How do I configure the plugin?
How do I configure the plugin?
You need to provide a JSON configuration specifying the URLs or commands to connect to MCP servers. This configuration is entered in the 'config_json' field of the mcpReAct Agent node.
What is the purpose of the config_json?
What is the purpose of the config_json?
The config_json allows you to specify the connection details for the MCP servers that the Dify agent will interact with. It defines the URLs or commands needed to establish communication.
How do I handle plugin verification errors?
How do I handle plugin verification errors?
If you encounter a plugin verification error, you can disable plugin verification by setting FORCE_VERIFYING_SIGNATURE=false
in the /docker/.env
file and restarting the Dify service.
How do I convert a stdio MCP server into an SSE MCP server?
How do I convert a stdio MCP server into an SSE MCP server?
You can either edit the MCP server's code to use SSE transport or use mcp-proxy to convert the stdio server to SSE. Instructions for both methods are provided in the README.