- Explore MCP Servers
- dify-plugin-tools-mcp_config_during_use
Dify Plugin Tools Mcp Config During Use
What is Dify Plugin Tools Mcp Config During Use
dify-plugin-tools-mcp_config_during_use is a Dify plugin that allows users to configure Model Context Protocol (MCP) connections dynamically during runtime. It facilitates the discovery and invocation of tools via the MCP protocol using HTTP with Server-Sent Events (SSE) transport.
Use cases
Use cases include dynamically listing tools available on an MCP server for user selection, invoking specific tools based on user input or application logic, and configuring connection parameters at runtime for improved flexibility and control.
How to use
To use the plugin, you can call the mcp_list_tools to retrieve a list of available tools on an MCP server, or use mcp_call_tool to invoke a specific tool. You need to provide the server URL, optional HTTP headers, and timeout settings in JSON format.
Key features
Key features include the ability to configure MCP server connection information for each call, list available tools on MCP servers, call specific tools, support for HTTP headers for authorization, and configuration of different timeout parameters.
Where to use
This plugin can be used in various fields that require dynamic interaction with tools via the MCP protocol, such as software development, data processing, and real-time applications that need to leverage multiple services.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Dify Plugin Tools Mcp Config During Use
dify-plugin-tools-mcp_config_during_use is a Dify plugin that allows users to configure Model Context Protocol (MCP) connections dynamically during runtime. It facilitates the discovery and invocation of tools via the MCP protocol using HTTP with Server-Sent Events (SSE) transport.
Use cases
Use cases include dynamically listing tools available on an MCP server for user selection, invoking specific tools based on user input or application logic, and configuring connection parameters at runtime for improved flexibility and control.
How to use
To use the plugin, you can call the mcp_list_tools to retrieve a list of available tools on an MCP server, or use mcp_call_tool to invoke a specific tool. You need to provide the server URL, optional HTTP headers, and timeout settings in JSON format.
Key features
Key features include the ability to configure MCP server connection information for each call, list available tools on MCP servers, call specific tools, support for HTTP headers for authorization, and configuration of different timeout parameters.
Where to use
This plugin can be used in various fields that require dynamic interaction with tools via the MCP protocol, such as software development, data processing, and real-time applications that need to leverage multiple services.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
MCP Config During Use
A Dify plugin that allows configuring MCP (Model Context Protocol) connections during use. It enables discovering and calling tools via MCP protocol through HTTP with SSE transport, with configuration done at runtime.
Features
- Configure MCP server connection information for each call separately
- List available tools on MCP servers
- Call specific tools on MCP servers
- Support HTTP headers configuration for authorization and other features
- Configure different timeout parameters
Tool List
The plugin provides two main tools:
-
List MCP Tools (mcp_list_tools)
- Used to list all available tools on an MCP server
-
Call MCP Tool (mcp_call_tool)
- Used to call a specific tool on an MCP server
Usage
List MCP Tools
Use the mcp_list_tools tool to list all available tools on a specified MCP server.
Parameters:
server_url(required): The SSE endpoint URL of the MCP Serverheaders(optional): HTTP headers in JSON formattimeout(optional): HTTP request timeout in secondssse_read_timeout(optional): SSE read timeout in seconds
Example:
{
"server_url": "http://127.0.0.1:8000/sse",
"headers": "{\"Authorization\":\"Bearer your_token\"}",
"timeout": 60,
"sse_read_timeout": 300
}
Call MCP Tool
Use the mcp_call_tool tool to call a specific tool on an MCP server.
Parameters:
server_url(required): The SSE endpoint URL of the MCP Serverheaders(optional): HTTP headers in JSON formattimeout(optional): HTTP request timeout in secondssse_read_timeout(optional): SSE read timeout in secondstool_name(required): Name of the tool to executearguments(required): Tool arguments in JSON format
Example:
{
"server_url": "http://127.0.0.1:8000/sse",
"headers": "{\"Authorization\":\"Bearer your_token\"}",
"timeout": 60,
"sse_read_timeout": 300,
"tool_name": "example_tool",
"arguments": "{\"param1\":\"value1\",\"param2\":123}"
}
Differences from Pre-authorized MCP Tools
Compared to pre-authorized MCP tools, the main differences of this plugin are:
- Configuration Method: This plugin allows configuring connection information at call time, while pre-authorized MCP tools require configuration at the provider level
- Flexibility: Different tool calls can connect to different MCP servers
- Isolation: Each application can use its own MCP server configuration without affecting others
- Permission Management: No need for global authorization at the provider level, providing more flexible permission control
Requirements
- Python 3.12 or higher
- Dependencies:
- httpx >= 0.27.0
- httpx-sse >= 0.4.0
- dify_plugin = 0.0.1b76
Notes
- Ensure the provided MCP server URL is valid and supports SSE connections
- In the
headersandargumentsparameters, JSON objects need to be converted to strings with properly escaped double quotes - Adjust timeout parameters as needed, especially for long-running tool calls
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










