how can i use mcp tool servers in the openwebui
- User
how can i use mcp tool servers in the openwebui
- Assistant
To integrate MCP (Model Context Protocol) servers into Open WebUI, you can utilize the MCP Connector, which facilitates seamless communication between Open WebUI and MCP-compatible AI models. Here's how to set it up:
1. Install the MCP Connector:
-
Method 1: Install from GitHub
Open your terminal and execute:
pip install git+https://github.com/ivanuser/open-webui-mcp-connector.git-
Method 2: Install through Open WebUI
Within Open WebUI:
- Navigate to
Workspace>Functions. - Click on "Import Function".
- Enter the GitHub URL:
https://github.com/ivanuser/open-webui-mcp-connector. - Click "Import".
- Navigate to
2. Configure MCP Servers:
After installation, configure your MCP servers:
-
In Open WebUI, go to
Workspace>Functions. -
Locate the "MCP Connector" function and click the edit (pencil) icon.
-
In the "MCP_SERVERS" field, input your MCP server details in JSON format:
[ { "name": "MyMCP Server 1", "url": "https://mcp.example.com", "api_key": "your_api_key_here" }, { "name": "MyMCP Server 2", "url": "https://another-mcp.example.com", "api_key": "another_api_key_here" } ] -
Click "Save".
-
Enable the function by toggling the switch.
Once configured, MCP server models will appear in the model selection dropdown within Open WebUI, prefixed with "MCP/" (this prefix can be customized in the settings).
Key Features of the MCP Connector:
- Connect to multiple MCP servers simultaneously.
- Support for API key authentication.
- Automatic model discovery from MCP servers.
- Support for streaming responses.
- Robust error handling and timeout management.
- Debug mode for troubleshooting.
For more detailed information and troubleshooting, refer to the MCP Connector's GitHub repository[1].
By following these steps, you can effectively integrate MCP servers into Open WebUI, enhancing its functionality with various AI models.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.