How to convert an OpenAPI spec or REST API into a managed MCP server
Updated
Give Kaiva Bridge your API's OpenAPI or Swagger spec. It creates one MCP tool for each operation and hosts the server for you, so there is no code to write and nothing to run. You switch on the tools your AI needs, publish, and add the server's address to Claude, ChatGPT, Cursor or any other MCP client.
Step by step
- Create a free accountSign up at app.kaiv.ai. No card is needed.
- Paste the spec linkChoose New server, then REST API, and paste the link to your OpenAPI (3.x) or Swagger (2.0) spec, in JSON or YAML. If the API needs a key, add it here: it is stored encrypted and never shown to the AI.
- Choose the toolsBridge reads the spec and lists one tool per operation, each marked as a read or a write. Servers are read-only by default: writes stay off until you switch them on.
- PublishClick Deploy server. Your MCP server is live at an address on api.kaiv.ai.
- Add it to your AI clientCopy the address from the Connect tab and add it to your client. Claude and ChatGPT sign in with your Kaiva account, so no key is needed.
The same from a terminal, with the open-source CLI:
npx @kaiva/bridge login
npx @kaiva/bridge push my-api --openapi https://api.example.com/openapi.json --read-only
npx @kaiva/bridge install my-api --client claude-codeRead-only by default. Writes when you decide.
Your server starts read-only. Writes are optional: switch on the ones you want when you are ready, after checking what they do.
From inside Claude
Kaiva Bridge is in Claude's connector directory. Connect it, then ask Claude: "Turn https://api.example.com/openapi.json into an MCP server. Which tools do I need?" Claude creates the server, lists its tools and recommends the ones for your task. You publish it in the console with one click.
From REST API to remote MCP server: what Bridge does
Converting an OpenAPI spec to a managed MCP server takes five stages, and Bridge runs all of them. You write no server code and run nothing.
| Stage | What happens |
|---|---|
| Read the spec | OpenAPI 3.x or Swagger 2.0, in JSON or YAML, from a link, a paste or an upload. A documentation page is followed to the spec it points to. |
| Generate the tools | One MCP tool per operation, named from its operationId, with the spec's description and an input schema built from its parameters and request body (types, allowed values and required fields kept). Each tool is marked as a read or a write. |
| Choose | Every tool starts switched off. You expose the ones your AI needs; writes stay off until you switch them on. |
| Publish | A remote MCP server at https://api.kaiv.ai/api/bridge/mcp/<name>, over Streamable HTTP. AI clients sign in with OAuth 2.1, or use a key made for that one server. |
| Each tool call | The arguments are checked against the tool's input schema, the request goes to your API with your credential (stored encrypted, sent only to your API's host), and the answer goes back to the AI client. |
| When the API changes | Read the spec again. A tool whose meaning changed is held until you accept it, so AI clients never get a changed tool unannounced. |
What you need
A link to the API's OpenAPI or Swagger document, or the file itself (you can paste or upload it). If you only have a documentation page, paste its link: Bridge follows a Swagger UI or docs page to the spec it points to, and reads GitHub, GitLab, Bitbucket, SwaggerHub and Dropbox links as the file they show.
Free includes 10 MCP servers, 200,000 tool calls a month and 200 pages of documents, with no card.
Let your coding agent do it, with no account
For a public API spec, a coding agent such as Claude Code, Codex or Cursor can create the server itself, with no account: npx @kaiva/bridge try --openapi <spec-url>. It gets a server with the spec's GET operations that lasts 72 hours, a key for it, and a claim link to give you.
Open the claim link to keep the server in your workspace. It keeps its address and your plan's limits apply. The agent's key stops working, so connect your AI client from the server's Connect tab. You can then add the API's key and switch on other operations.
In Claude Code, install the Kaiva Bridge plugin so the agent knows this flow: claude plugin marketplace add ai-kaiva/bridge, then claude plugin install kaiva-bridge@kaiva. Then ask it to make an MCP server for your API's spec.
Install the Kaiva Bridge skill in Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and other coding agents with npx skills add ai-kaiva/bridge. In a cloud agent sandbox such as Codex cloud or Claude Code on the web, allow the domains api.kaiv.ai and registry.npmjs.org first: network access there is off or limited by default.
No spec? Start from cURL or Postman
Under New server, then REST API, choose cURL and paste a command as the API's docs, a terminal or your browser's Copy as cURL give it. Each command becomes one tool.
Or choose Postman and upload a collection exported as v2.0 or v2.1. You pick which requests become tools; anything Bridge can't import, such as requests that need a pre-request script or OAuth sign-in, is listed with the reason. Either way it is read in your browser.
Other ways to do it
- Run an open-source generator yourselfSeveral open-source projects generate an MCP server from an OpenAPI spec, including FastMCP's OpenAPI support. You host, update and secure the server, and store the API credentials, yourself.
- Use the vendor's own MCP serverIf the company behind the API publishes an official MCP server, use it. Bridge can also put a remote MCP server behind one address with your other servers.
- Write one with an MCP SDKThe official TypeScript and Python SDKs let you write each tool by hand. That gives full control, at the cost of writing and maintaining the code.
Questions
- Do I need to write code?
- No. Bridge generates the tools from the spec and hosts the server. You choose which tools to switch on.
- Does it work with Swagger 2.0?
- Yes. OpenAPI 3.x and Swagger 2.0 both work, in JSON or YAML.
- Can my coding agent set this up without an account?
- Yes, for a public API spec. The agent runs npx @kaiva/bridge try --openapi <spec-url> and gets a server with the spec's GET operations for 72 hours plus a claim link for you. Claim it to keep it, then connect your AI client from the console and add keys and other operations.
- What if my API has no OpenAPI spec?
- Paste a cURL command or upload a Postman collection. Bridge turns each request into a tool, and you review them before anything is created.
- What if my API needs an API key?
- Add it when you create the server: a bearer token, basic auth or a custom header such as X-API-Key. It is encrypted, added to each call on the server side and never sent to the AI client.
- Can the AI change data through my API?
- Only if you switch writes on. Servers are read-only by default, and writes are optional.
- Is it free?
- Free includes 10 MCP servers, 200,000 tool calls a month and 200 pages of documents, with no card.