MCP OpenAPI Bridge
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP OpenAPI Bridgeinspect ./openapi.yaml and list the available operations"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP OpenAPI Bridge
Turn any OpenAPI 3.x spec into callable MCP tools at runtime.
Point the bridge at a spec — JSON or YAML — and every operation becomes an MCP tool with a real input schema: path, query, and header parameters plus the JSON request body. Calling a tool performs the HTTP request and returns a bounded, readable response. No code generation, no build step, no wrappers to maintain.
Tenth tool in the TokenSaver family: TokenSaver MCP maps repositories, MCP Context Budget audits tool costs, MCP Web Snapshot reads the web, MCP Log Tail summarizes logs, MCP Secret Scan guards commits, MCP JSON Lens explores data, MCP Gateway aggregates servers, commitsmith writes commits, MCP Injection Guard screens input, and OpenAPI Bridge connects APIs.
Why
Almost every API ships an OpenAPI spec, and almost no agent can call it without someone writing and maintaining a wrapper. The bridge closes that gap at runtime: the spec is the integration. Add a server, remove a server, change a schema — the tools follow.
Related MCP server: OpenAPI MCP Server
Quick start
List what a spec exposes:
npx -y mcp-openapi-bridge inspect ./openapi.yaml# Petstore (5 tool(s), base https://api.example.com/v1)
- listpets GET /pets — List pets
- createpet POST /pets — Create a pet
- getpetbyid GET /pets/{petId} — Find pet by ID
- deletepet DELETE /pets/{petId} — Delete a pet
- gettree GET /treeCall an operation without any MCP client:
npx -y mcp-openapi-bridge call ./openapi.yaml getpetbyid --args '{"petId":"42"}' \
--base-url https://api.example.com/v1 --header "Authorization: Bearer $TOKEN"Serve it to your agent:
npx -y mcp-openapi-bridge serve ./openapi.yaml --read-onlyMCP server
{
"mcpServers": {
"petstore": {
"command": "npx",
"args": ["-y", "mcp-openapi-bridge", "serve", "./openapi.yaml"],
"env": { "PETSTORE_TOKEN": "..." }
}
}
}Every operation becomes a tool named from operationId (or METHOD /path when missing) with a description built from the summary and route.
How it works
Load the spec from a JSON or YAML file.
Resolve local
$refs (schemas, parameters, request bodies) with recursion protection.Index operations, merging path-level and operation-level parameters.
Generate one MCP tool per operation with a JSON Schema built from parameters plus a
bodyproperty for JSON request bodies.Invoke by mapping arguments to the URL, query string, headers, and body — then return the response capped by size and token budgets.
Options
Flag | Meaning |
| Override |
| Extra request header; repeatable |
| Only expose GET and HEAD operations |
| Filter operations by tag |
| Request timeout (default 15000) |
| Response size cap (default 1000000) |
| Token budget for responses (default 4000) |
Exit codes: 0 success, 1 request or HTTP failure, 2 usage error. call exits 1 on HTTP errors so scripts can gate on it.
Limitations (v0.1.0)
Local
$refs only; external files are rejected with a clear message.Cookie parameters are ignored.
OpenAPI 3.x only (2.0 / Swagger is not supported).
Response bodies are returned as text or pretty JSON; binary responses are capped, not decoded.
No OAuth flow — pass tokens through
--headeror your MCP serverenvconfig.
Security notes
The bridge itself stores nothing. Credentials live in your client config or shell.
--read-onlyplus tag filters keep mutating operations away from an agent session.Responses are bounded by
--max-bytesand--budget, so a huge API payload cannot flood the context.Requests go only to the configured base URL; no telemetry, no callbacks.
Development
npm install
npm run typecheck
npm run build
npm testThe suite covers spec loading (JSON + YAML), $ref resolution, operation indexing, schema generation, request building, live HTTP invocation against a local test API, MCP round trips, and CLI flows.
License
MIT — see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Point Gecko at an OpenAPI spec; get first-call-correct, auth-hidden agent tools.
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
Pay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.
Free public MCP for AI agents — 193 tools, 44 workflows. No API key.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceAutomatically converts Swagger/OpenAPI specifications into dynamic MCP tools, enabling interaction with any REST API through natural language by loading specs from local files or URLs.-
- FlicenseNot gradedqualityDmaintenanceDynamically exposes any OpenAPI/Swagger API as tools for AI assistants, automatically generating MCP tools from OpenAPI specs with authentication support.-
- AlicenseNot gradedqualityBmaintenanceDynamically converts any Swagger 2.0 or OpenAPI 3.x specification into callable MCP tools, enabling AI clients to interact with API endpoints.8 npmMIT
- AlicenseNot gradedqualityBmaintenanceConverts any OpenAPI 3.x spec into a live MCP server, making every endpoint a validated tool that AI agents can call without writing glue code.6 npmMIT