How to Convert Any OpenAPI Spec to an MCP Server Config
Converting an OpenAPI specification to an MCP server configuration lets you use any REST API through AI assistants like Claude Desktop and Cursor. Here's how to do it in seconds with MCP-Bridge.
What You Need
- An OpenAPI v3 spec (JSON format)
- An MCP-compatible client (Claude Desktop, Cursor, Cline, etc.)
- API credentials (if the API requires authentication)
Step 1: Get Your OpenAPI Spec
Most modern APIs publish their OpenAPI specification. Common locations include:
- The API provider's documentation site
- A public GitHub repository (e.g., Stripe's openapi repo)
- APIs.guru — a directory of 2,000+ OpenAPI specs
Step 2: Convert with MCP-Bridge
Visit our converter page, paste your OpenAPI JSON, and click "Convert to MCP Config." The tool extracts all endpoints, parameters, and generates a complete MCP server configuration.
Step 3: Add to Your Client
Copy the generated config and add it to your MCP client:
- Claude Desktop: Edit
claude_desktop_config.json - Cursor: Add to
.cursor/mcp.json - Cline: Configure in the MCP settings panel
Step 4: Set Environment Variables
Add your API keys to the env section of the config. These are never sent to MCP-Bridge — all data stays in your local client configuration.
Step 5: Restart and Use
Restart your MCP client. Your AI assistant can now use the API's tools directly through natural language.
Automating Integration with Standardized Specs
The transition from an OpenAPI specification to a fully functional MCP server demonstrates the power of standardized schemas. OpenAPI provides a rigorous definition of your REST endpoints, which the MCP protocol can directly translate into available tools for the AI. This means any internal microservice you have built can become an AI-callable tool in minutes.
However, raw OpenAPI specs often lack semantic context. For an LLM to use a tool effectively, the descriptions of the parameters must be robust. Before converting your spec, take the time to enrich your OpenAPI YAML/JSON with highly descriptive summaries and clear constraints. Better documentation in the spec directly correlates to higher accuracy when the AI decides how to format the request payload.
Tip: Try the converter with a sample OpenAPI spec to see how it works before using your own.
Continue the Series
This is part 1 of the OpenAPI to MCP tutorial series:
Part 1
Fundamentals
You are here
Part 2
Build Custom
Hands-on with real APIs
Part 3
Config Recipes
10 ready-to-use configs