Etoolio

OpenAPI to MCP Server Generator

Free OpenAPI to MCP generator. Paste a Swagger/OpenAPI spec (JSON or YAML) and get a TypeScript Model Context Protocol server with a tool for every endpoint, ready for Claude and other AI agents. 100% in your browser.

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, set API_BASE_URL (and API_KEY if needed), then npx 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 operationId or 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.

Good to know

OpenAPI to MCP Server Generator, frequently asked questions

What does this generator do?

Paste an OpenAPI (Swagger) specification and it generates a complete TypeScript MCP (Model Context Protocol) server, one tool per API operation, with zod input schemas built from your parameters and request bodies. AI agents like Claude can then call your API through the standard MCP interface. The transform runs entirely in your browser.

What is MCP?

The Model Context Protocol is the open standard, adopted across AI tools in 2025-2026, for connecting AI assistants to external tools and data. An MCP server exposes 'tools' an agent can call. Turning your existing API into an MCP server makes it usable by any MCP-compatible AI client.

Does it support JSON and YAML specs?

Yes. Paste or upload your spec in either JSON or YAML, and OpenAPI 2.0 (Swagger) or 3.x. The tool detects the format automatically.

How do I run the generated server?

Save it as server.ts, run 'npm i @modelcontextprotocol/sdk zod', set API_BASE_URL (and API_KEY if your API needs auth), then run it with 'npx tsx server.ts'. Add it to your MCP client as a stdio server.

Is the generated code a starting point or final?

It's a working scaffold that maps each endpoint to an MCP tool with the right method, path, query and body handling. Review authentication, rate limits and any endpoints you don't want to expose before using it in production.

Is my spec uploaded?

No. The whole generation happens in your browser, your API spec is never sent to a server.