Skip to content

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 ​

2. Install npx Tool ​

Verify installation:

bash
npx --version

3. Install uvx Tool ​

Verify installation:

bash
uvx --version

Step 1: Configure Multiple MCP Servers ​

Create a mcp_config.json file to define one or more MCP servers:

json
{
  "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 mcpServers as needed.

  • If a server needs environment variables, export them in your shell before launching mcpo, e.g.:

    bash
    export API_TOKEN="..."
  • Relative paths (like ./data) are resolved from where mcpo is started.

Step 2: Run mcpo ​

Start mcpo with uvx. This example uses port 8000:

bash
uvx mcpo --port 8000 --config ./mcp_config.json

Tip: 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.json
    • http://localhost:8000/docs
  • Per-tool routes (each has its own schema & proxy handler):

    • Time tool:

      • http://localhost:8000/time
      • http://localhost:8000/time/openapi.json
      • Full schema UI: http://localhost:8000/time/docs
    • Fetch tool:

      • http://localhost:8000/fetch
      • http://localhost:8000/fetch/openapi.json
      • Full schema UI: http://localhost:8000/fetch/docs

If you chose a different port, replace 8000 accordingly.

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/time
  • http://localhost:8000/fetch

Each 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 ​

  1. 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.
  2. 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 ​