mcpo is an MCP-to-OpenAPI proxy. It takes any MCP server and serves its tools as a standard OpenAPI HTTP server, with interactive docs and API key auth, so they work with Open WebUI and any other app that speaks OpenAPI.
Most MCP servers talk over stdio and run as a local process. An app in the browser or on another machine cannot reach them. mcpo runs the MCP server for you and puts plain HTTP in front of it. Every tool gets its own endpoint, its own OpenAPI schema and live docs at /docs, with no glue code.
Open WebUI connects to Streamable HTTP MCP servers natively. Use mcpo for stdio and SSE servers, or when a client only speaks OpenAPI.
Installation
Python
# With uv installed
uvx mcpo --port 8000 --api-key "top-secret" -- your_mcp_server_command
# Or install and run with pip (Python 3.11+)
pip install mcpo
mcpo --port 8000 --api-key "top-secret" -- your_mcp_server_command
API key that clients send as a bearer token. Also read from MCPO_API_KEY, which keeps it out of the process list
--strict-auth
Also protect the docs and OpenAPI schema with the API key
--server-type
stdio (default), sse or streamable-http
--header
Headers in JSON for a remote server
--config, --hot-reload
Config file, and reload it when it changes
--env, --env-path
Environment variables for the MCP server
--cors-allow-origins
Allowed CORS origins (default *)
--root-path
Serve under a subpath behind a reverse proxy, such as /api/mcpo
--path-prefix
URL prefix for the server routes
--ssl-certfile, --ssl-keyfile
Serve over HTTPS
--name, --description, --version
Title, description and version shown in the docs
--log-level
DEBUG, INFO, WARNING, ERROR or CRITICAL
Run mcpo --help for the full list. Setting MCPO_API_KEY through --env or --env-path has no effect.
OAuth
mcpo supports OAuth 2.1 for Streamable HTTP servers that require it. It uses dynamic client registration by default, so most servers need only the server URL.
file (default, persistent) or memory (session only)
callback_port
Local port for the OAuth callback (default 3030)
use_loopback
Open the browser for sign-in automatically (default true)
On first connection mcpo registers a client if needed, opens the browser for sign-in, captures the callback and stores the tokens in ~/.mcpo/tokens/. Later requests reuse them.
For a provider without dynamic client registration, register a client with the provider and put its client ID and secret into the client metadata.
Leave out scope, authorization_endpoint and token_endpoint. mcpo discovers them from the server's OAuth metadata. See the OAuth guide for details.
Development
git clone https://github.com/open-webui/mcpo.git
cd mcpo
uv sync --dev
# Run the tests
uv run pytest
# Run mcpo from your checkout
uv run mcpo --port 8000 -- uvx mcp-server-time --local-timezone=America/New_York