Free Tool

OpenAPI to MCP: Convert Your API to an MCP Server

Paste your OpenAPI or Swagger spec. Pick the endpoints and get a hosted MCP server in minutes. No code required.

Try: or

  • OpenAPI 3.x
  • Swagger 2.0
  • JSON & YAML
  • Free tier

Why Convert OpenAPI to MCP?

  • AI-Ready APIs

    Claude, Cursor, and other AI assistants use MCP to call tools. Your REST API doesn't speak MCP. Until now.

  • Skip Manual Work

    Writing a tool by hand for every endpoint is slow. Conversion generates them from your spec.

  • Secure by Default

    Credentials stay encrypted on our servers. AI clients never see your API keys.

How It Works

  1. Paste Spec URL

    Enter your OpenAPI or Swagger spec URL. We auto-detect the format and version.

  2. Select Endpoints

    Choose which API endpoints to expose as MCP tools. We auto-categorize them for you.

  3. Deploy

    Click Deploy and your MCP server is usually live in under 3 minutes, with a public URL.

Three Ways to Convert

Choose the method that fits your workflow: browser for speed, CLI for automation, Docker for self-hosting.

  • Fastest

    Web UI

    Paste URL, select tools, deploy. No installation required.

    • Deploy in minutes
    • Visual tool selector
    • Managed hosting
  • CLI

    One command to generate and deploy. Perfect for CI/CD.

    bash
    # Install CLI
    npm install -g mcpize
    
    # Create project from OpenAPI URL
    mcpize init my-api --template openapi \
      --from-url https://api.example.com/openapi.json
    
    # Deploy
    mcpize deploy
  • Docker

    Self-hosted on your infrastructure. Full control.

    bash
    # Self-hosted with Docker
    docker run -p 8080:8080 procoders/openapi-mcp-ts \
      --spec-url https://api.example.com/openapi.json

OpenAPI to MCP: Python vs TypeScript

Python (FastMCP)

python
from fastmcp import FastMCP
import httpx

# Load OpenAPI spec
spec = httpx.get("https://api.example.com/openapi.json").json()
client = httpx.AsyncClient(base_url="https://api.example.com")

# Create MCP server from spec
mcp = FastMCP.from_openapi(openapi_spec=spec, client=client)
mcp.run()
  • Async with httpx
  • Great for data science
  • Decorator-based API

TypeScript (MCPize)

bash
# Install CLI
npm install -g mcpize

# Create project from OpenAPI URL
mcpize init my-api --template openapi \
  --from-url https://api.example.com/openapi.json

# Deploy
mcpize deploy
  • Full type safety
  • Production-ready templates
  • One-command deploy

Other OpenAPI to MCP Tools

MCPize isn't the only option. Here are other popular tools for converting OpenAPI specs to MCP servers:

  • Popular on Hacker News. Generates MCP servers from remote OpenAPI-documented APIs.

  • Official AWS tool. Dynamically creates MCP tools from OpenAPI specs for LLMs.

  • Python framework with built-in OpenAPI conversion. Great for data science workflows.

  • Free online converter. Supports 10+ programming languages. No account needed.

Does MCP Use OpenAPI?

Not directly. OpenAPI describes REST endpoints for developers and code generators. MCP describes tools for AI models: each tool has a name, a description written for an LLM, and a JSON Schema for its inputs. An MCP client never reads your OpenAPI file.

The two map cleanly, though. An operation becomes a tool, its summary becomes the tool description, and its parameters and request body become the input schema. That is what an OpenAPI to MCP converter automates, and why the result is only as good as the descriptions in your spec.

On MCPize, the generated server runs behind the MCP gateway, which adds your API credentials to each upstream call and handles sign-in for AI clients. If you would rather write the server yourself, see MCP server hosting or build an MCP server from a template.

Full Compatibility

Swagger 2.0 Support

Still using Swagger 2.0? No problem. The converter reads Swagger 2.0 directly, including securityDefinitions, host and basePath. Same workflow, same result.

Swagger 2.0 or OpenAPI 3.xMCP Server

Frequently Asked Questions

Can I convert any REST API to MCP?

Yes, if your API has an OpenAPI (Swagger) specification. Most modern REST APIs publish one: look for /openapi.json, /swagger.json, or /docs endpoints. The converter parses your spec and generates an MCP tool for each endpoint you select.

What about authentication?

The hosted converter supports Bearer tokens and API keys sent in a header. Your credentials are stored encrypted and the MCPize gateway adds them to each upstream request, so AI clients never see them.

How many endpoints can I expose as MCP tools?

Technically unlimited, but LLM performance degrades with 40+ tools. We recommend enabling only essential operations. The converter auto-categorizes endpoints as Recommended/Optional/Risky to help you choose.

OpenAPI to MCP: Python or TypeScript?

Both work great. Python with FastMCP is ideal for data science workflows. TypeScript with the official MCP SDK is better for production APIs with strict typing. MCPize generates TypeScript by default but supports both.

Does it support Swagger 2.0?

Yes. The converter reads Swagger 2.0 specs directly, including securityDefinitions, host and basePath. The workflow is identical: just paste your Swagger spec URL.

Is there a free tier?

Yes. Converting a spec is free, and MCPize hosting has a free tier for running the server it generates.

Ready to Convert Your API?

Paste your OpenAPI spec and deploy an MCP server in minutes.

Or convert from Postman Collection

Free to Start