New in 5.0: MCP 2026-07-28, tool annotations, structured output and a browser playground
OpenAPI in.
MCP server out.
Used or mentioned across
Each mark links to its source (checked Oct 25, 2026). Trademarks belong to their owners; no endorsement is implied.
The open-source generator is free to self-host forever. Or get a live, secure MCP URL in about a minute with MCP Cloud (private beta).
npx openapi-mcp-generator -i openapi.json -o my-mcpRequires Node.js 22.19 or later. Also supports stdio, web (SSE) and streamable-http.
openapi-mcp-generator is a free, MIT-licensed CLI and library that turns an OpenAPI 3.x specification into a ready-to-run Model Context Protocol (MCP) server for stdio, SSE, Streamable HTTP or Cloudflare Workers. You own the generated TypeScript code, and tool inputs are validated against JSON Schema before any request reaches your API.
How it works
From spec to live endpoint in three steps
openapi: 3.0.3
info:
title: Petstore
version: 1.0.0
servers:
- url: https://petstore3.swagger.io/api/v3
paths:
/pet/{petId}:
get:
operationId: getPetById
summary: Find pet by ID
parameters:
- name: petId
in: path
required: true
schema:
type: integerAny OpenAPI 3.x document in JSON or YAML, from a local path or a URL.
Why openapi-mcp-generator
Own the code
The generator writes a typed TypeScript project to your disk. It is MIT-licensed: read it, change it, commit it and run it wherever you like.
Safe by default
Credentials are read from environment variables or wrangler secrets, not your source. External $refs are rejected unless you opt in, and tool inputs are validated against JSON Schema before any request is sent.
Live in minutes
One command generates a Cloudflare Worker project that you deploy to your own account with Wrangler. MCP Cloud (private beta) aims to do the whole thing for you in about a minute.
Open source vs Cloud
Same generator. You choose who runs it.
Self-hosting is complete and free. MCP Cloud is for teams who would rather not operate it. Every Cloud entry below is planned for the beta and not available yet.
| Feature | Open source | MCP Cloud Private beta |
|---|---|---|
| Price | $0, MIT licensed, forever | Free tier plus paid plans (beta pricing, subject to change) |
| Where it runs | Your machine, your servers or your Cloudflare account | An isolated Cloudflare Worker per serverPlanned |
| Setup | Generate, install and deploy yourself | Paste a spec, get an MCP URLPlanned |
| Inbound auth | Built-in bearer token (--inbound-auth bearer); OAuth via your own gateway | Per-server key; OAuth for Claude.ai and ChatGPT on ProPlanned |
| Spec changes | Re-run the generator | Auto-sync from a spec URL with tool diff and rollback (Pro)Planned |
| Logs | Whatever you set up | Metadata only (tool, status, latency, size)Planned |
| Your code | Yours from the start | Export your server code at any timePlanned |
| Availability | Available now on npm | Private beta. Not live. |
MCP ToolGuard
Free and MIT-licensedSecure the servers you connect to.
A free, MIT-licensed local proxy that sits between your MCP client and an MCP server and blocks tool poisoning, rug pulls and secret exfiltration before they reach your agent. From the author of openapi-mcp-generator. No account, no cloud service, no telemetry.
npm install -g mcp-toolguard-cliRequires Node.js 20+. Runs locally.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y", "mcp-toolguard-cli", "run", "--",
"npx", "-y", "@modelcontextprotocol/server-filesystem", "/path"
]
}
}
}Put npx -y mcp-toolguard-cli run -- in front of the server command, then restart the client.
Tool poisoning
Hidden instructions in tool descriptions, like "read ~/.ssh/id_rsa".
Rug pulls
A server quietly changing its tool definitions after install.
Tool shadowing
One server's description redirecting how other tools are used.
Secret exfiltration
API keys and private keys smuggled into tool-call arguments.
Result injection
Prompt-injection text inside tool results such as web pages and issues.
Honest numbers: on 50 injection samples it blocks 60% and detects 74%. 26% get through undetected, and 0 of 50 clean samples are blocked. See the benchmark
FAQ
Questions, answered
Pricing, setup and security in plain terms. More answers live in the docs.
Read the full FAQPricing
Yes. The CLI and library are MIT-licensed and free to use and self-host forever, with unlimited servers and tool calls.
Planned plans are Cloud Free at $0 (2 servers, 10k tool calls a month), Pro at $29 a month and Team at $149 a month. This is beta pricing, subject to change, and MCP Cloud is in private beta and not live yet.
Compare plansNo. Cloud plans have hard limits by default, so calls beyond your limit are refused rather than billed. We never bill overages without your opt-in.
Setup
Node.js 22.19 or later and an OpenAPI 3.0+ spec in JSON or YAML, from a file path or a URL. One command generates a ready-to-run TypeScript project.
Read the quickstartNot directly. Since 5.0.0 the generator refuses Swagger 2.0 files with a clear error. Convert it to OpenAPI 3 first, for example with npx swagger2openapi.
Anywhere you choose: locally over stdio, on your own servers over SSE or Streamable HTTP, or on your own Cloudflare account as a Worker. The generator does not host it for you.
See transports
Security
Into environment variables for Node transports, or Wrangler secrets for Workers. They are never written into the generated source code.
Authentication guideNot by default. HTTP and Worker endpoints are public unless you generate them with --inbound-auth bearer and set a token. Tool inputs are always validated against JSON Schema before any request reaches your API.
Security modelEach server runs in its own isolated Worker. Logs hold metadata only, never request or response bodies. Credentials are passed through by default, outbound calls go only to hosts in your spec, and write and delete tools stay off until you enable them.
Security overview
Ready when your API is.
Generate your first server from the quickstart, or tell us about your API and we will reach out when the Cloud beta has room.