Skip to content
MCP-Bridge
Tutorial

How to Convert Any OpenAPI Spec to an MCP Server Config

June 2026 · 4 min read

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.

Tip: Try the converter with a sample OpenAPI spec to see how it works before using your own.