openapi-to-mcp-bridge-mcp
v1.0.0
Published
Bridge any OpenAPI 3.x spec → MCP server in one call. Inspect tools, preview JSON Schemas, generate a runnable Node MCP server, or stream-call endpoints live without writing a wrapper.
Maintainers
Readme
openapi-to-mcp-bridge-mcp
Bridge any OpenAPI 3.x spec → MCP server in one call. Inspect tools, preview JSON Schemas, generate a runnable Node MCP server, or stream-call endpoints live without writing a wrapper.
Why
Every AI agent dev wants to give Claude/GPT access to their existing REST APIs. Today they write MCP wrappers by hand — one tool per endpoint, schemas duplicated, auth boilerplate. This bridge eats an OpenAPI spec and emits MCP — automatically.
Install
npm install -g openapi-to-mcp-bridge-mcpTools
| Tool | What it does |
|------|--------------|
| from_url | Fetch spec from URL → summary (info / base URL / operation list) |
| from_spec | Same, but takes inline JSON/YAML |
| preview_tools | Return MCP-shaped {name, description, inputSchema} for every operation — paste into any MCP host |
| generate_server | Emit a runnable Node ESM MCP server wrapping all operations |
| call_endpoint | Fire one HTTP call against an operationId with validated args |
Quickstart
// claude_desktop_config.json
{
"mcpServers": {
"openapi-bridge": {
"command": "npx",
"args": ["-y", "openapi-to-mcp-bridge-mcp"]
}
}
}Then ask Claude:
"Use openapi-bridge.from_url with https://petstore3.swagger.io/api/v3/openapi.json — show me the tool list."
Generated server runtime env
The output of generate_server reads:
OPENAPI_BASE_URL— overrideservers[0].urlOPENAPI_AUTH_HEADER— single header to inject, e.g.Authorization: Bearer XYZ
License
MIT
