Skip to main content
Glama

openapi-mcp-gateway. Point one YAML file at your OpenAPI specs, and each API gets its own MCP endpoint and auth.

Mount any OpenAPI spec as a Model Context Protocol (MCP) server from one YAML file, with no code to write. Fine-grained access control decides who may call each operation and which values the model may send, and dynamic exposure keeps an API of any size within the model's context. One process runs several APIs, each with its own endpoint and auth.

With uv installed, one command serves PokéAPI:

uvx openapi-mcp-gateway serve --spec https://pokeapi.co/openapi.yml --name pokeapi

Then connect any MCP client, such as Claude Code, Cursor or VS Code, to http://127.0.0.1:8000/pokeapi/mcp. Getting Started continues from there to a config file with several APIs.

Highlights

Most OpenAPI-to-MCP tools turn every operation into a tool. The gateway also decides what the model sees, what it may send and who may call it.

  • Context Efficiency: dynamic exposure serves an API of any size as three tools that search, describe and call its operations, instead of one tool per operation loaded into the model's context.

  • Deterministic Guardrails: pinned, hidden and enum-limited parameters bound which resources the model can reach, enforced by the gateway rather than the prompt.

  • Fine-Grained Access Control: per-user OAuth and per-operation scopes decide which tools each client can list and call.

  • One Gateway for Many APIs: one YAML file serves several OpenAPI specs, each at its own MCP endpoint with its own auth.

Related MCP server: FastMCP OpenAPI

Architecture

Each tool call is authorized, shaped and sent upstream, and its response is reshaped on the way back.

openapi-mcp-gateway architecture. An MCP client calls an MCP endpoint, one per API, which config.yml builds at startup. Each call is authorized first, by its token and then by the scopes the operation needs, getting an upstream token from the API's authorization server or your identity provider when the mode calls for one. The request is shaped by params and JSONata and sent with the upstream credential, over HTTP to a REST API or over ASGI to a FastAPI app in the same process. The response comes back reshaped by JSONata. openapi-mcp-gateway architecture, as described above.

Documentation

See the documentation for the guides, concepts, reference and evaluation.

License

MIT

Available Tools

19 tools
add_petAdd a new pet to the store.D

Add a new pet to the store.

Inputs: name (required), photoUrls (required), id, tags, +2 more.

create_userCreate user.B

This can only be done by the logged in user.

Inputs: id, email, phone, lastName, +4 more.

create_users_with_list_inputCreates list of users with given input array.C

Creates list of users with given input array.

Inputs: no named parameters.

delete_orderDelete purchase order by identifier.A
DestructiveIdempotent

For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.

Inputs: orderId (required).

delete_petDeletes a pet.D
DestructiveIdempotent

Delete a pet.

Inputs: petId (required), api_key.

delete_userDelete user resource.B
DestructiveIdempotent

This can only be done by the logged in user.

Inputs: username (required).

find_pets_by_statusFinds Pets by status.A
Read-onlyIdempotent

Multiple status values can be provided with comma separated strings.

Inputs: status (required).

find_pets_by_tagsFinds Pets by tags.B
Read-onlyIdempotent

Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.

Inputs: tags (required).

get_inventoryReturns pet inventories by status.A
Read-onlyIdempotent

Returns a map of status codes to quantities.

Inputs: no named parameters.

get_order_by_idFind purchase order by ID.B
Read-onlyIdempotent

For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.

Inputs: orderId (required).

get_pet_by_idFind pet by ID.C
Read-onlyIdempotent

Returns a single pet.

Inputs: petId (required).

get_user_by_nameGet user by user name.A
Read-onlyIdempotent

Get user detail based on username.

Inputs: username (required).

login_userLogs user into the system.C
Read-onlyIdempotent

Log into the system.

Inputs: password, username.

logout_userLogs out current logged in user session.B
Read-onlyIdempotent

Log user out of the system.

Inputs: no named parameters.

place_orderPlace an order for a pet.C

Place a new order in the store.

Inputs: id, petId, status, complete, +2 more.

update_petUpdate an existing pet.C
Idempotent

Update an existing pet by Id.

Inputs: name (required), photoUrls (required), id, tags, +2 more.

update_pet_with_formUpdates a pet in the store with form data.C

Updates a pet resource based on the form data.

Inputs: petId (required), name, status.

update_userUpdate user resource.D
Idempotent

This can only be done by the logged in user.

Inputs: username (required), id, email, phone, +4 more.

upload_fileUploads an image.C

Upload image of the pet.

Inputs: petId (required), additionalMetadata.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 19 tools

    Disambiguation4/5

    Tools are generally distinct per resource and action, but update_pet and update_pet_with_form could confuse agents expecting a single update path. Similarly, create_user vs create_users_with_list_input are similar in purpose though descriptions clarify the difference.

    Naming Consistency5/5

    All tool names follow a consistent snake_case verb_noun pattern (e.g., get_pet_by_id, delete_order, create_user). There is minor variation in verbs like add vs create, but the pattern remains predictable throughout.

    Tool Count5/5

    19 tools is well-scoped for a pet store API covering pets, users, and orders. Each tool serves a clear purpose without redundancy, and the count is within the typical range for a domain-specific server.

    Completeness4/5

    The toolset provides solid CRUD coverage for pets, users, and orders, including listing/filtering and file upload. Minor gaps exist—for example, no update order and no way to list all users or all pets generically—but core workflows are covered.

    Maintenance

    ActivityActive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Dynamically generates MCP tools from OpenAPI specifications, enabling AI assistants to interact with any REST API through natural language. Supports multiple APIs with authentication, parameter validation, and integration with Claude Desktop and LangChain.
      1
      MIT
    • A
      license
      A
      quality
      Not graded
      maintenance
      A generic MCP server that dynamically exposes any OpenAPI-documented REST API to LLMs by auto-discovering endpoints. It provides tools for exploring API capabilities and making authenticated requests directly through natural language interfaces.
      2
      11 npm
      MIT