MCP Config During Use
[blocked]
A Dify plugin that enables dynamic MCP (Model Context Protocol) server configuration during runtime with advanced transport strategy support.
English | 中文简体 [blocked]
🚀 Features
🔄 Multiple Transport Strategies
- SSE (Server-Sent Events): Real-time bidirectional communication
- Streamable HTTP: HTTP-based streaming with session management
- Auto Detection: Automatically detects server-supported transport protocols
🔧 Advanced Capabilities
- ✅ Runtime Configuration: Configure MCP servers during each call
- ✅ Transport Auto-Detection: Smart protocol detection based on server capabilities
- ✅ HTTP Redirect Support: Seamless redirect handling
- ✅ Session Management: Persistent sessions for Streamable HTTP
- ✅ Flexible Headers: Custom HTTP headers for authentication
- ✅ Timeout Control: Configurable timeout parameters
🛠 Tool Arsenal
📖 Usage Guide
🔍 List MCP Tools
Discover all available tools on an MCP server:
Parameters:
- (required): MCP server endpoint URL
- (optional): HTTP headers in JSON format
- (optional): HTTP request timeout (seconds)
- (optional): SSE read timeout (seconds)
Example:
⚡ Call MCP Tool
Execute a specific tool on an MCP server:
Parameters:
- (required): MCP server endpoint URL
- (optional): HTTP headers in JSON format
- (optional): HTTP request timeout (seconds)
- (optional): SSE read timeout (seconds)
- (required): Name of the tool to execute
- (required): Tool arguments in JSON format
Example:
⚠️ Important Notes
Transport Configuration
- The plugin automatically detects server-supported transport protocols
- SSE is preferred for real-time communication
- Streamable HTTP is used as fallback or for specific requirements
JSON Parameter Handling
- All JSON objects in and must be string-encoded
- Ensure proper double-quote escaping in JSON strings
Timeout Considerations
- Adjust for connection establishment
- Configure for long-running operations
- Consider network latency in timeout settings
Session Management
- Streamable HTTP automatically manages session IDs
- Sessions are maintained across multiple requests
- Session cleanup is handled automatically
📄 License
This project is licensed under the MIT License - see the LICENSE [blocked] file for details.
Made with ❤️ for the Dify Community
⭐ Star this repo if you find it useful! ⭐