- Live API — compile a public OpenAPI document and point the editor at the gateway.
- WIP / branch API — your server is already on this machine (
localhost, a Docker network). Point the gateway at that origin so Cursor, Codex, or Claude Code can exercise the branch you are editing.
How do I install it?
The project lives on GitHub: Fetch-Hive/openapi-mcp. Install with Homebrew, Docker,npx, the curl installer, or cargo install — the README lists the current commands.
How do I connect a local or branch API?
- Run
mcp-gateway init --allow-private-networksso loopback and private networks are allowed. - Add the spec from a file in the repo:
mcp-gateway add-spec --name demo --file ./openapi.yaml --base-url http://127.0.0.1:3000 --insecure-http.--base-urlis this checkout, not production. - Start
mcp-gateway serve demo(defaulthttp://127.0.0.1:8787/mcp). - Paste
mcp-gateway inspect demo --client cursor(orcodex,claude-code,vscode) into the editor. The token frominitgoes inMCP_GATEWAY_TOKEN.
--allow-private-networks is required for localhost. --insecure-http is required when the API speaks HTTP.
How do I connect a live API?
- Run
mcp-gateway init(no private-network flag). mcp-gateway add-spec --name demo --url https://…(or--fileplus--base-url https://api.example.com).mcp-gateway serve demo, then the sameinspect --clientsnippets.
mcp-gateway doctor checks config, secrets, the local IR cache, and the SSRF policy.
Can I deploy on Render, Heroku, DigitalOcean, or Hetzner?
Yes. The GitHub repo has platform guides and one-click buttons for Render, Heroku, and DigitalOcean App Platform, plus Compose/cloud-init for a Hetzner VPS: openapi-mcp deploy docs. After deploy, point the editor athttps://<host>/mcp with the same bearer token.
Vercel cannot run this server (it is serverless, not a long-lived process). If you do not want to operate a VPS, use hosted MCP Gateway for a live API. Hosted MCP Gateway does not proxy localhost — use the CLI on your machine for a branch API.
Set MCP_GATEWAY_TOKEN and MCP_GATEWAY_SPEC_URL (an HTTPS OpenAPI document). The container reads PORT itself.
How is this different from hosted MCP Gateway?
Hosted MCP Gateway on Fetch Hive gives you a dashboard, client tokens, plan quotas, and a public/g/{slug} URL for live APIs. Self-hosting keeps the process and secrets on your machine and is how you attach an editor to a local checkout. Binding all interfaces requires --expose. TLS is your reverse proxy’s job.

