Get the FREE Ultimate OpenClaw Setup Guide →

mcpo

A simple, secure MCP-to-OpenAPI proxy server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio open-webui-mcpo uvx mcpo --port 8000 --api-key top-secret -- your_mcp_server_command

How to use

mcpo exposes any MCP tool as an OpenAPI-compatible HTTP proxy. It wraps an MCP server (which typically speaks via stdio) with a standard HTTP/OpenAPI interface, enabling tools, SDKs, and UIs that expect HTTP endpoints to work seamlessly with your MCP commands. You can launch mcpo to proxy a single MCP server, or manage multiple MCP tools via a config file. The docs UI is auto-generated for each proxied tool, and you can access it at the tool’s dedicated docs path. mcpo also supports SSE and Streamable HTTP MCP servers, and can run behind a subpath with root-path for reverse-proxy setups. To get started, you typically run mcpo through uvx or Python, provide the underlying MCP server command after the -- delimiter, and pass an API key for access control.

How to install

Prerequisites:

  • Python 3.8+ (recommended) or install via uv for fast startup
  • Optional: Docker if you prefer containerized usage

Installation options:

Option A: Install via Python (uv/uvx).

  1. Install mcpo pip install mcpo
  2. Run mcpo against your MCP server command uvx mcpo --port 8000 --api-key "YOUR_API_KEY" -- your_mcp_server_command

Option B: Use uvx directly with a local MCP server command

  1. Ensure uv is installed (via your environment manager)
  2. Start mcpo proxy uvx mcpo --port 8000 --api-key "YOUR_API_KEY" -- your_mcp_server_command

Option C: Run via Docker (no local installation required)

  1. docker pull ghcr.io/open-webui/mcpo:main
  2. Run the container exposing port 8000 and passing the MCP server command docker run -p 8000:8000 ghcr.io/open-webui/mcpo:main --api-key "YOUR_API_KEY" -- your_mcp_server_command

Option D: Config file for multiple MCP servers

  1. Create a config.json following the Claude Desktop format (example in README)
  2. Start mcpo with the config mcpo --config /path/to/config.json or with hot-reload enabled: mcpo --config /path/to/config.json --hot-reload

Additional notes

Tips and common considerations:

  • You can serve multiple MCP tools through a single mcpo instance by using a config.json that defines multiple mcpServers entries.
  • Use --root-path to mount mcpo behind a reverse proxy under a subpath (e.g., /api/mcpo).
  • For OpenUI/Open WebUI integration, mcpo generates an OpenAPI schema and docs UI at /docs for each tool (e.g., http://localhost:8000/<tool>/docs).
  • If you plan to use OAuth 2.1 with streamable-http MCP servers, configure the oauth block per the README and rely on dynamic client registration where supported.
  • To upgrade mcpo, follow the standard pip/uv/docker upgrade procedures appropriate for your installation method.
  • If you encounter port conflicts, choose an unused port and update the --port flag accordingly.

Related MCP Servers

Sponsor this space

Reach thousands of developers