OpenAPI to MCP Generator

OpenAPI to MCP Generator

Convert any OpenAPI 3.x spec into MCP tool definitions. Paste your JSON spec, select endpoints, and export as MCP config, TypeScript server, or Python server.

OpenAPI Spec (JSON)

Endpoints

Paste an OpenAPI spec or load the sample

Generated MCP output will appear here

What This Tool Does

OpenAPI to MCP Generator is built for deterministic developer and agent workflows.

Convert OpenAPI 3.x specs into MCP tool definitions. Export as config JSON, TypeScript server, or Python server. All processing in your browser.

Use How to Use for execution steps and FAQ for constraints, policies, and edge cases.

Last updated:

This tool is provided as-is for convenience. Output should be verified before use in any production or critical context.

Agent Invocation

Best Path For Builders

Browser workflow

Runs instantly in the browser with private local processing and copy/export-ready output.

Browser Workflow

This tool is optimized for instant in-browser execution with local data handling. Run it here and copy/export the output directly.

/openapi-to-mcp/

For automation planning, fetch the canonical contract at /api/tool/openapi-to-mcp.json.

How to Use OpenAPI to MCP Generator

  1. 1

    Paste your OpenAPI spec

    Enter your OpenAPI 3.x specification in JSON format. You can also click Load Sample to see a working example.

  2. 2

    Select endpoints

    Use the endpoint checklist to choose which API endpoints to convert into MCP tools. By default, all endpoints are selected.

  3. 3

    Choose output format

    Select your preferred output: MCP Config JSON for direct use, TypeScript Server for a full server scaffold, or Python Server for a Python-based implementation.

  4. 4

    Copy or download

    Review the generated MCP tool definitions in the output panel. Click Copy to clipboard or Download to save the file directly.

Frequently Asked Questions

What is OpenAPI to MCP Generator?
OpenAPI to MCP Generator converts OpenAPI 3.x API specifications into Model Context Protocol tool definitions. Each API endpoint becomes an MCP tool with proper input schemas, descriptions, and auth configuration.
What output formats are available?
Three formats: MCP config JSON (for direct use), TypeScript MCP server scaffold (using the official SDK), and Python MCP server scaffold. All include tool definitions with proper input schemas.
Is OpenAPI to MCP Generator free?
Yes. Completely free with no account or sign-up required.
Does it send my API spec to a server?
No. All conversion happens in your browser. Your API specification never leaves your device.
Does it handle $ref references in OpenAPI specs?
Yes. The tool resolves $ref references inline, handles allOf/oneOf schemas, and properly converts nested object structures into JSON Schema format compatible with MCP tool definitions.