FreeToolSpace

OpenAPI → MCP Server

Paste any OpenAPI or Swagger JSON spec and instantly get a production-ready MCP server — in TypeScript or Python.

OpenAPI / Swagger Spec
MCP Server
🔌

Paste an OpenAPI or Swagger JSON spec to generate an MCP server

What is MCP?

The Model Context Protocol (MCP) is the universal standard for connecting AI agents to external APIs and databases. Introduced by Anthropic and adopted by OpenAI, Google, and Microsoft, MCP lets AI models call your APIs as "tools" with structured inputs and outputs.

How This Tool Works

  1. Paste your OpenAPI 3.x or Swagger 2.0 JSON spec on the left.
  2. Each API endpoint is automatically converted to an MCP tool.
  3. Toggle between TypeScript and Python output.
  4. Copy the generated code and run it as a fully functional MCP server.

What Gets Generated

  • Server setup: Proper MCP server initialization with name and version.
  • Tool registration: Each endpoint becomes a named tool with input schemas.
  • API helper: A reusable HTTP request function for making API calls.
  • Parameter handling: Path, query, header, and body parameters are extracted.
  • Transport: stdio transport for direct use with Claude, Cursor, and other MCP hosts.

Supported Formats

  • OpenAPI 3.0 / 3.1 — Modern API specifications with components/schemas.
  • Swagger 2.0 — Legacy format with definitions and host/basePath.
  • $ref resolution — Schema references are automatically resolved inline.

Frequently Asked Questions

What MCP SDK does the TypeScript output use?

It uses @modelcontextprotocol/sdk — the official TypeScript SDK. Tools are registered with server.registerTool() and input schemas use Zod.

What about the Python output?

It uses FastMCP from mcp.server.fastmcp — the official Python SDK. Tools are defined with the @mcp.tool() decorator and Python type hints.

Can I use this with Claude, Cursor, or Windsurf?

Yes! The generated server uses stdio transport, which is compatible with Claude Desktop, Cursor, Windsurf, and any other MCP-compatible AI host.

Is my data processed on the server?

No. All parsing and code generation happens entirely in your browser. Your API spec never leaves your device.