Guide · May 20, 2026
This guide walks through converting an OpenAPI 3.x specification into a hosted Model Context Protocol (MCP) server. By the end, your API will be callable from Claude, ChatGPT, Cursor, or any other MCP client. No code, no infrastructure, no SDKs.
OpenAPI (formerly Swagger) is the most widely used format for describing REST APIs. If you’ve ever generated SDKs, built a developer portal, or seen interactive API docs at /docs, you’ve seen OpenAPI in action.
MCP (Model Context Protocol) is an open standard published by Anthropic for connecting AI assistants to external tools and data. An MCP server exposes a list of tools that AI clients (Claude, ChatGPT, Cursor, VS Code, and others) can call in response to user prompts.
OpenAPI to MCP means programmatically generating an MCP server from an OpenAPI spec, so each REST operation becomes a callable AI tool. You already wrote the OpenAPI spec; this just exposes it in a second protocol that AI assistants understand.
swagger2openapi first.No spec handy? Use our worked example below, which references the Atlas Bookings sample spec (a fictional B2B booking API, 12 operations).
Step 1 of 5
Vayro accepts either a public URL or a pasted spec. For this walkthrough we’ll use the Atlas Bookings sample:
If your spec lives behind authentication, you can paste the raw JSON or YAML content instead. Vayro stores a versioned copy so the connection survives upstream changes.
Step 2 of 5
From your dashboard, click New project, give it a name, and paste the spec URL. Vayro fetches it, validates it, and generates one MCP tool per OpenAPI operation. For the Atlas Bookings sample, that’s 12 tools (list appointments, create appointment, get customer, and so on).
Each tool gets a name (from the OpenAPI operationId), a description (from the operation summary plus an AI-enhanced overlay), and a JSON schema (from the operation’s parameters and request body).
Step 3 of 5
Most APIs need credentials. Open the API Auth tab and pick the scheme from your spec’s securitySchemes section:
Authorization: Bearer ... on every upstream call.All credentials are encrypted at rest with envelope encryption. Vayro never logs the decrypted values.
Step 4 of 5
Many multi-tenant SaaS APIs use templated server hosts like:
In the Server Variables panel, supply the concrete value for each variable (your subdomain, region, API version, etc.). Vayro substitutes these at request time, so changing the value later is instant; no spec re-fetch required.
If you skip this step, requests will hit the literal placeholder host and fail.
Step 5 of 5
Vayro gives you a hosted URL like:
Paste it into your MCP client of choice:
claude mcp add --transport http your-project https://mcp.vayro.ai/mcp/your-project-slug, then run /mcp inside Claude to verify the connection.~/.cursor/mcp.json.That’s it. Your AI assistant now has access to every operation your OpenAPI spec describes. Ask it to “list my open appointments” or “book a haircut tomorrow at 3pm” and it will call the right tool.
The OpenAPI to MCP conversion is more than a syntactic translation. A few things matter:
operationId. If yours are missing or unhelpful (getEndpoint1), Vayro can auto-rewrite them.npx swagger2openapi.{tenant}.api.example.com host and fail. Set values in the Server Variables panel.securitySchemes, Vayro can’t infer the right header. Add it to the spec or override in the API Auth tab.Model Context Protocol is an open standard from Anthropic for connecting AI assistants to external tools and data. An MCP server exposes a set of tools that AI clients like Claude, ChatGPT, and Cursor can invoke.
OpenAPI describes REST APIs in a machine-readable format. MCP is the protocol AI assistants speak. Converting OpenAPI to MCP lets you expose an existing API to AI agents without writing per-tool integration code.
No. Vayro hosts the MCP server for you. You get a URL like https://mcp.vayro.ai/mcp/your-project, and any MCP-compatible AI client can connect to it.
Vayro supports OpenAPI 3.0 and 3.1 only. Convert older Swagger 2 specs with swagger2openapi first.
Vayro supports Bearer tokens, API keys (header or query), basic auth, and OAuth 2.0 (including per-user OAuth where each end user authenticates against your upstream).
Yes. 1 project, 5,000 requests per month, no credit card. Paid tiers start at $49/mo for 5 projects and 100,000 requests.
Click re-fetch in the dashboard. Vayro pulls the new version, diffs it against the previous, and updates the generated MCP tools. Spec versions are kept so you can roll back.
Free tier covers 1 project and 5,000 requests per month. No credit card. Sign in with Google and you’ll have a hosted MCP server in under 5 minutes.