{"id":27041016,"url":"https://github.com/open-webui/mcpo","last_synced_at":"2026-02-27T19:51:33.802Z","repository":{"id":285214795,"uuid":"957412694","full_name":"open-webui/mcpo","owner":"open-webui","description":"A simple, secure MCP-to-OpenAPI proxy server","archived":false,"fork":false,"pushed_at":"2025-11-16T19:18:48.000Z","size":374,"stargazers_count":3651,"open_issues_count":45,"forks_count":415,"subscribers_count":21,"default_branch":"main","last_synced_at":"2025-11-16T21:13:04.374Z","etag":null,"topics":["mcp","mcp-server","mcp-to-openapi","open-webui","openapi"],"latest_commit_sha":null,"homepage":"https://docs.openwebui.com/features/plugin/tools/openapi-servers/mcp","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/open-webui.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"tjbck"}},"created_at":"2025-03-30T10:03:03.000Z","updated_at":"2025-11-16T10:38:33.000Z","dependencies_parsed_at":"2025-04-14T06:19:23.344Z","dependency_job_id":"dd0f38bc-7d89-4eb3-a329-d70a965e64e4","html_url":"https://github.com/open-webui/mcpo","commit_stats":null,"previous_names":["tjbck/mcpo","open-webui/mcpo"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/open-webui/mcpo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-webui%2Fmcpo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-webui%2Fmcpo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-webui%2Fmcpo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-webui%2Fmcpo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/open-webui","download_url":"https://codeload.github.com/open-webui/mcpo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-webui%2Fmcpo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29911354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"ssl_error","status_checked_at":"2026-02-27T19:37:41.463Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mcp","mcp-server","mcp-to-openapi","open-webui","openapi"],"created_at":"2025-04-05T04:01:13.824Z","updated_at":"2026-02-27T19:51:33.790Z","avatar_url":"https://github.com/open-webui.png","language":"Python","funding_links":["https://github.com/sponsors/tjbck"],"categories":["Python","\u003cimg src=\"./assets/satellite.svg\" width=\"16\" height=\"16\" style=\"vertical-align: middle;\"\u003e Satellites","📚 Projects (1974 total)","openapi","MCP Ecosystem","模型上下文协议 MCP","🤖 AI/ML","Containerised MCP Servers","MCP Utilities \u0026 Tools","Developer Tools","MCP Servers \u0026 Protocol"],"sub_categories":["MCP Servers","Core \u0026 Frameworks","Web \u0026 Content","Gateways"],"readme":"# ⚡️ mcpo\n\nExpose any MCP tool as an OpenAPI-compatible HTTP server—instantly.\n\nmcpo 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.\n\nNo custom protocol. No glue code. No hassle.\n\n## 🤔 Why Use mcpo Instead of Native MCP?\n\nMCP servers usually speak over raw stdio, which is:\n\n- 🔓 Inherently insecure\n- ❌ Incompatible with most tools\n- 🧩 Missing standard features like docs, auth, error handling, etc.\n\nmcpo solves all of that—without extra effort:\n\n- ✅ Works instantly with OpenAPI tools, SDKs, and UIs\n- 🛡 Adds security, stability, and scalability using trusted web standards\n- 🧠 Auto-generates interactive docs for every tool, no config needed\n- 🔌 Uses pure HTTP—no sockets, no glue code, no surprises\n\nWhat feels like \"one more step\" is really fewer steps with better outcomes.\n\nmcpo makes your AI tools usable, secure, and interoperable—right now, with zero hassle.\n\n## 🚀 Quick Usage\n\nWe recommend using uv for lightning-fast startup and zero config.\n\n```bash\nuvx mcpo --port 8000 --api-key \"top-secret\" -- your_mcp_server_command\n```\n\nOr, if you’re using Python:\n\n```bash\npip install mcpo\nmcpo --port 8000 --api-key \"top-secret\" -- your_mcp_server_command\n```\n\nTo use an SSE-compatible MCP server, simply specify the server type and endpoint:\n\n```bash\nmcpo --port 8000 --api-key \"top-secret\" --server-type \"sse\" -- http://127.0.0.1:8001/sse\n```\n\nYou can also provide headers for the SSE connection:\n\n```bash\nmcpo --port 8000 --api-key \"top-secret\" --server-type \"sse\" --header '{\"Authorization\": \"Bearer token\", \"X-Custom-Header\": \"value\"}' -- http://127.0.0.1:8001/sse\n```\n\nTo use a Streamable HTTP-compatible MCP server, specify the server type and endpoint:\n\n```bash\nmcpo --port 8000 --api-key \"top-secret\" --server-type \"streamable-http\" -- http://127.0.0.1:8002/mcp\n```\n\nYou can also run mcpo via Docker with no installation:\n\n```bash\ndocker run -p 8000:8000 ghcr.io/open-webui/mcpo:main --api-key \"top-secret\" -- your_mcp_server_command\n```\n\nExample:\n\n```bash\nuvx mcpo --port 8000 --api-key \"top-secret\" -- uvx mcp-server-time --local-timezone=America/New_York\n```\n\nThat’s it. Your MCP tool is now available at http://localhost:8000 with a generated OpenAPI schema — test it live at [http://localhost:8000/docs](http://localhost:8000/docs).\n\n🤝 **To integrate with Open WebUI after launching the server, check our [docs](https://docs.openwebui.com/openapi-servers/open-webui/).**\n\n\n### 🌐 Serving Under a Subpath (`--root-path`)\n\nIf you need to serve mcpo behind a reverse proxy or under a subpath (e.g., `/api/mcpo`), use the `--root-path` argument:\n\n```bash\nmcpo --port 8000 --root-path \"/api/mcpo\" --api-key \"top-secret\" -- your_mcp_server_command\n```\n\nAll routes will be served under the specified root path, e.g. `http://localhost:8000/api/mcpo/memory`.\n\n\n### 🔄 Using a Config File\n\nYou can serve multiple MCP tools via a single config file that follows the [Claude Desktop](https://modelcontextprotocol.io/quickstart/user) format.\n\nEnable hot-reload mode with `--hot-reload` to automatically watch your config file for changes and reload servers without downtime:\n\nStart via:\n\n```bash\nmcpo --config /path/to/config.json\n```\n\nOr with hot-reload enabled:\n\n```bash\nmcpo --config /path/to/config.json --hot-reload\n```\n\nExample config.json:\n\n```json\n{\n  \"mcpServers\": {\n    \"memory\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@modelcontextprotocol/server-memory\"]\n    },\n    \"time\": {\n      \"command\": \"uvx\",\n      \"args\": [\"mcp-server-time\", \"--local-timezone=America/New_York\"],\n      \"disabledTools\": [\"convert_time\"] // Disable specific tools if needed\n    },\n    \"mcp_sse\": {\n      \"type\": \"sse\", // Explicitly define type\n      \"url\": \"http://127.0.0.1:8001/sse\",\n      \"headers\": {\n        \"Authorization\": \"Bearer token\",\n        \"X-Custom-Header\": \"value\"\n      }\n    },\n    \"mcp_streamable_http\": {\n      \"type\": \"streamable-http\",\n      \"url\": \"http://127.0.0.1:8002/mcp\"\n    } // Streamable HTTP MCP Server\n  }\n}\n```\n\nEach tool will be accessible under its own unique route, e.g.:\n- http://localhost:8000/memory\n- http://localhost:8000/time\n\nEach with a dedicated OpenAPI schema and proxy handler. Access full schema UI at: `http://localhost:8000/\u003ctool\u003e/docs`  (e.g. /memory/docs, /time/docs)\n\n### 🔐 OAuth 2.1 Authentication\n\nmcpo supports OAuth 2.1 authentication for MCP servers that require it. The implementation defaults to **dynamic client registration**, so most servers only need minimal configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"oauth-protected-server\": {\n      \"type\": \"streamable-http\",\n      \"url\": \"http://localhost:8000/mcp\",\n      \"oauth\": {\n        \"server_url\": \"http://localhost:8000\"\n      }\n    }\n  }\n}\n```\n\n#### OAuth Configuration Options\n\n**Basic Options:**\n- `server_url` (required): OAuth server base URL\n- `storage_type`: \"file\" (persistent) or \"memory\" (session-only, default: \"file\")\n- `callback_port`: Local port for OAuth callback (default: 3030)\n- `use_loopback`: Auto-open browser for auth (default: true)\n\n**Advanced Options (rarely needed):**\nFor servers that don't support dynamic client registration, you can specify static client metadata:\n\n```json\n{\n  \"mcpServers\": {\n    \"legacy-oauth-server\": {\n      \"type\": \"streamable-http\", \n      \"url\": \"http://api.example.com/mcp\",\n      \"oauth\": {\n        \"server_url\": \"http://api.example.com\",\n        \"client_metadata\": {\n          \"client_name\": \"My MCPO Client\",\n          \"redirect_uris\": [\"http://localhost:3030/callback\"]\n        }\n      }\n    }\n  }\n}\n```\n\n\u003e **Note**: Avoid setting `scope`, `authorization_endpoint`, or `token_endpoint` in the config. These are automatically discovered from the server's OAuth metadata during the dynamic registration flow.\n\nOn first connection, mcpo will:\n1. Perform dynamic client registration (if supported)\n2. Open your browser for authorization\n3. Capture the OAuth callback automatically  \n4. Store tokens securely (in `~/.mcpo/tokens/` for file storage)\n5. Use tokens for all subsequent requests\n\nOAuth is supported for `streamable-http` server types. See [OAUTH_GUIDE.md](OAUTH_GUIDE.md) for detailed documentation.\n\n## 🔧 Requirements\n\n- Python 3.8+\n- uv (optional, but highly recommended for performance + packaging)\n\n## 🛠️ Development \u0026 Testing\n\nTo contribute or run tests locally:\n\n1.  **Set up the environment:**\n    ```bash\n    # Clone the repository\n    git clone https://github.com/open-webui/mcpo.git\n    cd mcpo\n\n    # Install dependencies (including dev dependencies)\n    uv sync --dev\n    ```\n\n2.  **Run tests:**\n    ```bash\n    uv run pytest\n    ```\n\n3.  **Running Locally with Active Changes:**\n\n    To run `mcpo` with your local modifications from a specific branch (e.g., `my-feature-branch`):\n\n    ```bash\n    # Ensure you are on your development branch\n    git checkout my-feature-branch\n\n    # Make your code changes in the src/mcpo directory or elsewhere\n\n    # Run mcpo using uv, which will use your local, modified code\n    # This command starts mcpo on port 8000 and proxies your_mcp_server_command\n    uv run mcpo --port 8000 -- your_mcp_server_command\n\n    # Example with a test MCP server (like mcp-server-time):\n    # uv run mcpo --port 8000 -- uvx mcp-server-time --local-timezone=America/New_York\n    ```\n    This allows you to test your changes interactively before committing or creating a pull request. Access your locally running `mcpo` instance at `http://localhost:8000` and the auto-generated docs at `http://localhost:8000/docs`.\n\n\n## 🪪 License\n\nMIT\n\n## 🤝 Contributing\n\nWe welcome and strongly encourage contributions from the community!\n\nWhether you're fixing a bug, adding features, improving documentation, or just sharing ideas—your input is incredibly valuable and helps make mcpo better for everyone.\n\nGetting started is easy:\n\n- Fork the repo\n- Create a new branch\n- Make your changes\n- Open a pull request\n\nNot sure where to start? Feel free to open an issue or ask a question—we’re happy to help you find a good first task.\n\n## ✨ Star History\n\n\u003ca href=\"https://star-history.com/#open-webui/mcpo\u0026Date\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=open-webui/mcpo\u0026type=Date\u0026theme=dark\" /\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=open-webui/mcpo\u0026type=Date\" /\u003e\n    \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=open-webui/mcpo\u0026type=Date\" /\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\n---\n\n✨ Let's build the future of interoperable AI tooling together!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-webui%2Fmcpo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopen-webui%2Fmcpo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-webui%2Fmcpo/lists"}