Go to file
Timothy Jaeryang Baek f9baa73cb6 chore: github
2025-04-02 16:23:50 -07:00
.github chore: github 2025-04-02 16:23:50 -07:00
src/mcpo feat: cors_allow_origins cli option 2025-04-02 16:17:27 -07:00
.gitignore feat: --config support 2025-03-30 20:30:23 -07:00
.python-version chore: gitignore 2025-03-30 03:04:25 -07:00
LICENSE doc: readme 2025-03-30 04:31:22 -07:00
pyproject.toml feat: --config support 2025-03-30 20:30:23 -07:00
README.md Update README.md 2025-04-01 02:31:39 -07:00
uv.lock feat: mcpo cli 2025-03-30 04:24:20 -07:00

mcpo

Expose any MCP tool as an OpenAPI-compatible HTTP server—instantly.

mcpo is a dead-simple proxy that takes an MCP server command and makes it accessible via standard RESTful OpenAPI, so your tools "just work" with LLM agents and apps expecting OpenAPI servers.

No custom protocol. No glue code. No hassle.

🤔 Why Use mcpo Instead of Native MCP?

MCP servers usually speak over raw stdio, which is:

  • 🔓 Inherently insecure
  • Incompatible with most tools
  • 🧩 Missing standard features like docs, auth, error handling, etc.

mcpo solves all of that—without extra effort:

  • Works instantly with OpenAPI tools, SDKs, and UIs
  • 🛡 Adds security, stability, and scalability using trusted web standards
  • 🧠 Auto-generates interactive docs for every tool, no config needed
  • 🔌 Uses pure HTTP—no sockets, no glue code, no surprises

What feels like "one more step" is really fewer steps with better outcomes.

mcpo makes your AI tools usable, secure, and interoperable—right now, with zero hassle.

🚀 Quick Usage

We recommend using uv for lightning-fast startup and zero config.

uvx mcpo --port 8000 -- your_mcp_server_command

Or, if youre using Python:

pip install mcpo
mcpo --port 8000 -- your_mcp_server_command

Example:

uvx mcpo --port 8000 -- uvx mcp-server-time --local-timezone=America/New_York

Thats it. Your MCP tool is now available at http://localhost:8000 with a generated OpenAPI schema — test it live at http://localhost:8000/docs.

🔄 Using a Config File

You can serve multiple MCP tools via a single config file that follows the Claude Desktop format:

Start via:

mcpo --config /path/to/config.json

Example config.json:

{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"]
    },
    "time": {
      "command": "uvx",
      "args": ["mcp-server-time", "--local-timezone=America/New_York"]
    }
  }
}

Each tool will be accessible under its own unique route, e.g.:

Each with a dedicated OpenAPI schema and proxy handler. Access full schema UI at: http://localhost:8000/<tool>/docs (e.g. /memory/docs, /time/docs)

🔧 Requirements

  • Python 3.8+
  • uv (optional, but highly recommended for performance + packaging)

🪪 License

MIT