Home / MCP / MCP OpenAPI Schema Explorer Server

MCP OpenAPI Schema Explorer Server

Provides token-efficient MCP Resources to explore OpenAPI v3.0 and Swagger v2.0 specifications from local or remote sources.

javascript
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "openapi_npx": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-openapi-schema-explorer@latest",
                "<path-or-url-to-spec>",
                "--output-format",
                "yaml"
            ]
        }
    }
}

You can explore large OpenAPI and Swagger specifications efficiently by running an MCP server that exposes the data as Resources. This lets you navigate paths, components, and operations without loading the entire spec into your language model’s context, saving tokens while keeping rich access to the API structure.

How to use

Once the MCP server is running, you connect to it from your MCP client to explore the loaded OpenAPI specification. Use the provided Resource URIs to inspect top-level fields, paths, operations, and components. Examples include opening the API info, listing paths, drilling into a specific path’s methods, and viewing component schemas.

How to install

# Prerequisites
- Node.js (LTS) installed
- npm available in your environment

# Step 1: Set up and run with npx (recommended)
# This runs the server directly without local installation
npx -y mcp-openapi-schema-explorer@latest <path-or-url-to-spec> --output-format yaml

# Step 2: Run with Docker (remote spec or local file)
# Remote URL example
docker run --rm -i kadykov/mcp-openapi-schema-explorer:<latest> <remote-url-to-spec> --output-format yaml

# Local file example (mount the file into the container)
docker run --rm -i -v /full/host/path/to/spec.yaml:/spec/api.yaml kadykov/mcp-openapi-schema-explorer:latest /spec/api.yaml --output-format yaml

# Step 3: Run from a local build (if you cloned the repo and built it)
node /full/path/to/cloned/mcp-openapi-schema-explorer/dist/src/index.js <path-or-url-to-spec> --output-format yaml

Additional sections

Configuration notes and usage tips help you tailor the server to your environment and preferred MCP client. The server supports both local file paths and remote HTTP/HTTPS URLs for specifications. Swagger v2.0 specifications are automatically converted to OpenAPI v3.0 on load. Resource-based access focuses on read-only exploration, with dynamic URIs transforming internal references to clickable MCP routes.

Configuration and notes

- The server exposes a set of MCP Resources designed for browsing the OpenAPI specification in a token-efficient way. Use openapi://info, openapi://paths/..., and openapi://components/... to navigate the document.

Examples and tips

- Use multiple entries in your MCP client configuration to explore different specs in parallel. Each entry can point to a different file path or URL.