Setting up MCP Servers in Open WebUI
This guide shows how to connect MCP (Model Context Protocol) servers to Open WebUI using mcpo, the MCP→OpenAPI proxy.
mcpo launches your MCP servers and exposes both a global OpenAPI schema at /openapi.json and per-tool routes at /<tool> — each with its own OpenAPI schema and proxy handler.
Prerequisites
1. Install Open WebUI
- Download and install Open WebUI
2. Install npx Tool
npxcomes bundled with node and npm, which can be downloaded here: https://nodejs.org/en/download.- Reference: npm documentation
Verify installation:
npx --version3. Install uvx Tool
uvxcomes bundled with uv.- Reference: uv documentation
Verify installation:
uvx --versionStep 1: Configure Multiple MCP Servers
Create a mcp_config.json file to define one or more MCP servers:
{
"mcpServers": {
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"]
},
"time": {
"command": "uvx",
"args": ["mcp-server-time"]
},
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"[PATH-TO-DIRECTORY]"
]
}
}
}Notes
Add or remove entries under
mcpServersas needed.If a server needs environment variables, export them in your shell before launching mcpo, e.g.:
bashexport API_TOKEN="..."Relative paths (like
./data) are resolved from wheremcpois started.
Step 2: Run mcpo
Start mcpo with uvx. This example uses port 8000:
uvx mcpo --port 8000 --config ./mcp_config.jsonTip: Pin a Python version if needed:
uvx -p 3.11 mcpo --port 8000 --config ./mcp_config.json.
Quick verification (local URLs)
After mcpo starts, verify the tool routes are exposed correctly:
Global schema:
http://localhost:8000/openapi.jsonhttp://localhost:8000/docs
Per-tool routes (each has its own schema & proxy handler):
Time tool:
http://localhost:8000/timehttp://localhost:8000/time/openapi.json- Full schema UI:
http://localhost:8000/time/docs
Fetch tool:
http://localhost:8000/fetchhttp://localhost:8000/fetch/openapi.json- Full schema UI:
http://localhost:8000/fetch/docs
If you chose a different port, replace
8000accordingly.
Step 3: Connect mcpo to Open WebUI
- Open Open WebUI in your browser.
- Open ⚙️ Settings.
- Click on ➕ Tools to add a new tool server.
- Enter the URL where your OpenAPI tool server is running (e.g.,
http://localhost:8000/time). - Click Save.
If you're running multiple tools through mcpo using a config file, each tool is mounted under its own unique path. For example, if you’re using fetch and time tools simultaneously through mcpo, they’ll each be available at a distinct route:
http://localhost:8000/timehttp://localhost:8000/fetchEach path has its own OpenAPI schema and proxy handler, and you can access the full schema UI at:
http://localhost:8000/<tool>/docs(e.g.,/fetch/docs,/time/docs).
Two ways to register tool servers in Open WebUI
User Tool Servers (added via regular Settings)
- Only accessible to the user who registered the tool server.
- The connection is made directly from the browser (client‑side) by the user.
- Perfect for personal workflows or when testing custom/local tools.
Global Tool Servers (added via Admin Settings)
- Admins can manage shared tool servers available to all or selected users across the entire deployment.
- Great for standardized, organization‑wide tool access.
Learn more about MCP integration in Open WebUI
Step 4: Confirm MCP Is Connected
Once your tool server is successfully connected, Open WebUI will display a tool server indicator directly in the message input area. Clicking this icon opens a popup where you can:
- View connected tool server information
- See which tools are available and which server they're provided by
- Debug or disconnect any tool if needed
Additional Resources
- Open WebUI Tool Servers: https://docs.openwebui.com/openapi-servers
- Model Context Protocol: https://modelcontextprotocol.io/docs
- mcpo repository: https://github.com/open-webui/mcpo