OpenAPI to MCP Server Converter
Convert OpenAPI 3.x or Swagger specs into Model Context Protocol server tool definitions with zod schemas and fetch handlers, ready for Claude, Cursor and VS Code.
Loading tool...
What is OpenAPI to MCP Server Converter?
An OpenAPI to MCP Server Converter reads an OpenAPI 3.x or Swagger specification and generates a TypeScript module that registers one Model Context Protocol tool per API operation β zod input schemas, URL-templated fetch handlers and proper optionality β ready to drop into an MCP server for Claude, Cursor or VS Code.
Key Benefits
- Expose existing REST APIs to AI agents without writing MCP plumbing by hand
- Consistent, validated tool schemas derived directly from the spec
- Single-file output that plugs into the official MCP SDK
Common Use Cases
- β’Giving coding agents safe access to internal REST APIs
- β’Publishing product APIs as agent-callable tools
- β’Prototyping MCP servers from existing Swagger documentation
How to generate MCP tools from OpenAPI
- Paste the spec: Drop in your OpenAPI 3.x YAML or JSON β the converter reads servers, paths, operations, parameters and request bodies.
- Review the generated tools: Each operation becomes one MCP tool with a zod input schema derived from its parameters, path templates and fetch handler.
- Drop it into your server: Download the .ts file and call registerTools(server) inside an @modelcontextprotocol/sdk server for Claude, Cursor or VS Code.
Key Features
- YAML and JSON OpenAPI 3.x parsing with automatic base-URL detection
- One MCP tool per operation using operationId or generated names
- Path, query and body parameters mapped to zod schemas with correct optionality
- Fetch handler stubs with URL templating and query-string plumbing
- Single-file TypeScript output for the official MCP SDK, generated client-side