What the OpenAPI to MCP generator does
Paste an OpenAPI (Swagger) specification and this tool generates a complete, ready-to-run MCP server in TypeScript, one tool for every endpoint in your API. Each tool gets a zod input schema built from the spec's path, query and body parameters, so an AI agent like Claude can call your API safely through the Model Context Protocol. The whole transform runs in your browser; your spec is never uploaded.
Why turn your API into an MCP server
MCP became the standard way to connect AI assistants to real tools and data in 2025-2026, but writing an MCP server by hand for an existing API is tedious boilerplate. If you already have an OpenAPI spec, that boilerplate is fully derivable, this tool does it in one click, so any MCP-compatible AI client can use your API immediately.
How to use it
- Paste or upload your OpenAPI spec (JSON or YAML, Swagger 2.0 or OpenAPI 3.x).
- Click Generate. The tool lists every operation it turned into an MCP tool.
- Copy or download
server.ts. - Run it:
npm i @modelcontextprotocol/sdk zod, setAPI_BASE_URL(andAPI_KEYif needed), thennpx tsx server.ts. - Add it to your MCP client (Claude Desktop, an IDE, or your own agent) as a stdio server.
What gets generated
- One MCP tool per API operation, named from its
operationIdor method + path. - zod input schemas from the spec's parameters, with descriptions and optional/required flags.
- A shared request helper that handles path substitution, query strings, JSON bodies and bearer auth.
Good to know
- The output is a working scaffold, review authentication, rate limits and which endpoints you expose before production use.
- Nothing is uploaded, generation is entirely client-side.
- Pair it with the AGENTS.md Generator when wiring your project up for AI agents.