OpenAPI to MCP Converter
Convert any OpenAPI specification into MCP tool definitions automatically.
How to Use This Tool
- Paste your OpenAPI specification (JSON format) into the input area. The tool supports OpenAPI 3.0, 3.1, and Swagger 2.0.
- The tool automatically detects all API endpoints and displays them as selectable items.
- Choose which endpoints to convert using the checkboxes. Use 'Select All' for a complete conversion or pick specific endpoints.
- Click 'Convert to MCP' to generate MCP tool definitions from the selected endpoints.
- Review the generated MCP tool definitions. Each endpoint becomes an MCP tool with parameters mapped from path params, query params, and request body.
- Copy the output and use it in your MCP server implementation.
Bridging REST APIs and MCP
Many organizations have existing REST APIs documented with OpenAPI (Swagger) specifications. The Model Context Protocol (MCP) provides a standardized way for AI assistants to interact with these APIs. This converter bridges the gap — transforming your OpenAPI spec into MCP tool definitions that any AI client can use.
The conversion maps OpenAPI concepts to MCP: Each API endpoint becomes an MCP tool. Path parameters, query parameters, and request body properties become tool input parameters. Response schemas inform the tool descriptions. Authentication requirements are preserved as notes in the tool metadata.
This is particularly powerful for enterprises with dozens of internal APIs. Instead of building custom MCP servers from scratch, you can generate the tool definitions from your existing OpenAPI documentation and wrap them in a lightweight MCP server. The AI assistant then discovers and uses your APIs automatically.
As the MCP ecosystem matures in 2026, we're seeing a convergence of API standards. Tools like Speakeasy, Stainless, and Postman are all adding MCP generation features. This browser-based converter gives you instant results without installing any tools or sharing your API specifications with third-party services.
Last updated: February 2026
FAQ
What does this tool do?
It takes an OpenAPI (Swagger) specification and converts each API endpoint into an MCP tool definition. This lets AI assistants use your existing APIs as MCP tools without manual configuration.
Which OpenAPI versions are supported?
OpenAPI 3.0, 3.1, and Swagger 2.0 are all supported. The tool auto-detects the version and handles the conversion accordingly.
How are parameters mapped?
Path parameters, query parameters, and request body schemas are mapped to MCP tool input_schema properties. Response schemas are used to generate tool descriptions. Required parameters are preserved.
Does this support YAML OpenAPI specs?
Currently the tool supports JSON format. YAML support is planned for a future update. In the meantime, you can convert your YAML spec to JSON using any online YAML-to-JSON converter, then paste the JSON here.
How do I handle API authentication in MCP?
MCP tools don't handle authentication directly — that's the responsibility of the MCP server implementation. The converted tool definitions include auth requirement notes. In your MCP server code, add authentication headers or tokens when making the actual API calls to your endpoints.