Registry / llm-agents / mcpo
library0.0.20pypypiunverified

MCPO (Model Context Protocol to OpenAPI Proxy) is a dead-simple proxy that takes an MCP server command and makes it accessible via standard RESTful OpenAPI. It enables tools to "just work" with LLM agents and applications expecting OpenAPI servers, addressing the integration challenges of stdio-based MCP tools within the broader web ecosystem. Developed by the Open WebUI community, MCPO is an active project, with version 0.0.20 released on February 27, 2026.

pip install mcpo
INSTALL
IMPORT
SIG · MCPO
M
mcpo
llm-agentspythonv0.0.20
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

This quickstart demonstrates how to install `mcpo` and then run it to proxy a simple `mcp-server-time` tool. The first command installs `mcpo` and a sample MCP server. The second command starts `mcpo` on port 8000, securing it with an API key, and instructs it to proxy the `mcp-server-time` command. Your proxied API will then be available at `http://localhost:8000` with auto-generated documentation at `http://localhost:8000/docs`.

pip install mcpo uvx mcp-server-time uvx mcpo --port 8000 --api-key "YOUR_API_KEY" -- uvx mcp-server-time --local-timezone=America/New_York
mcpo --version
Debug
Known issues
gotchaWhen running `mcpo` to proxy an MCP server command, arguments specific to the proxied server must be separated from `mcpo`'s arguments using `--` (double dash).
fix
Always use `--` before the command and arguments of the MCP server you intend to proxy, e.g., `mcpo [mcpo_args] -- [mcp_server_command] [mcp_server_args]`.
affects: All versions
gotchaWhen `mcpo` is configured with `--server-type streamable-http`, it expects the target MCP server to already be running at the provided URL, rather than launching it directly as it would with `stdio` type servers.
fix
Ensure your `streamable-http` MCP server is independently started and listening on the specified URL *before* you execute the `mcpo` command. For example, run `uv run your_mcp_server.py` in one terminal, then `mcpo --server-type streamable-http -- http://127.0.0.1:8000/mcp` in another.
affects: All versions
gotchaWhile `mcpo` can provide API key authentication, it's crucial to ensure that the API key provided to `mcpo` (`--api-key`) is correctly expected and validated by any downstream clients or AI agents. For more robust authentication, `mcpo` also supports OAuth configuration.
fix
For simple setups, use `--api-key "YOUR_SECRET"`. For enterprise or production environments, explore `mcpo`'s OAuth configuration options, including `server_url` for dynamic client registration and secure token management.
affects: All versions
Errors
Common errors & fixes
What am I missing to get the MCP Server as Http-streamable with the MCPO Proxy? Neither of these commands work: uvx mcpo --port 8002 --api-key "top-secret" --server-type "streamable-http" -- http://127.0.0.1:8000/mcp or uvx mcpo --port 8002 --api-key "top-secret" -- uv run server.py
`mcpo` treats `streamable-http` servers as remote endpoints that must be pre-running, not as child processes to launch. The `uv run server.py` command is being passed *as the target URL* when it should be running separately.
fix
First, start your `streamable-http` MCP server (e.g., `uv run server.py` which exposes it on `http://127.0.0.1:8000/mcp` if configured this way). Then, in a separate terminal, run `uvx mcpo --port 8002 --api-key "top-secret" --server-type "streamable-http" -- http://127.0.0.1:8000/mcp`.
mcpo: command not found
The `mcpo` executable is not in your system's PATH, or the library was not installed in your active Python environment.
fix
Ensure you have installed `mcpo` using `pip install mcpo` (or `uv pip install mcpo`). If using a virtual environment, activate it before running the command. If installed globally, ensure your user's PATH includes the directory where pip installs executables.
Upgrade
Version history
0.0.20latest on PyPI · released Feb 27, 2026
Audit
Dependencies
clickrequiredCommand-line interface toolkit
pydanticrequiredData validation and settings management
mcprequiredCore Model Context Protocol SDK
pyjwtrequiredJSON Web Token implementation
fastapirequiredWeb framework for building APIs
typerrequiredBuilding CLI applications (built on Click)
uvicornrequiredASGI server for FastAPI
watchdogrequiredMonitors filesystem events (for hot-reloading)
python-dotenvrequiredLoading environment variables
passlibrequiredSecure password hashing library
Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
mcpo — pip install mcpo · libregistry