mcp-openapi-schema-explorer
MCP server providing token-efficient access to OpenAPI/Swagger specs via MCP Resource Templates for client-side exploration.
claude mcp add --transport stdio kadykov-mcp-openapi-schema-explorer npx -y mcp-openapi-schema-explorer@latest <path-or-url-to-spec> --output-format yaml
How to use
This MCP server provides token-efficient, template-based access to OpenAPI (v3) and Swagger (v2) specifications via MCP Resource Templates. By exposing parameterized resource templates (for example, openapi://paths/{path}/{method} and other components), clients can explore large API definitions without loading the entire document into memory. The server supports loading specs from local files or remote URLs (Swagger v2.0 is automatically converted to OpenAPI v3.0 on load). Clients discover available resources through the template patterns rather than enumerating every path or component up front, enabling scalable exploration of large APIs.
To use it, add one of the provided MCP server entries to your client's configuration (npx or Docker are common methods). When using npx, you can pass the path or URL to your OpenAPI/Swagger spec and optionally set an output format (json, yaml, json-minified). When using Docker, point the container to your spec URL or mount a local file into the container. The server emphasizes resource templates over pre-enumerated resources, making it especially suitable for very large APIs where context window constraints matter.
How to install
Prerequisites:
- Node.js and npm (for local build or npx usage) or Docker (for Docker usage) installed on your machine
- Access to the internet for pulling packages/images
Option A: Global installation (optional, if you want to run via npm globally)
- Install the package globally:
npm install -g mcp-openapi-schema-explorer
- Run with your preferred spec (example):
mcp-openapi-schema-explorer <path-or-url-to-spec> --output-format yaml
Option B: Local development / installation (cloning repository and building locally)
- Clone the repository and install dependencies:
git clone https://github.com/kadykov/mcp-openapi-schema-explorer.git
cd mcp-openapi-schema-explorer
npm install
- Build the project (if a build step exists):
npm run build
- Run from the local build (example):
node dist/server.js <path-or-url-to-spec> --output-format yaml
Option C: Docker usage (recommended for MCP clients integration)
- Pull and run the Docker image with a remote spec:
docker run --rm -i kadykov/mcp-openapi-schema-explorer:latest <remote-url-to-spec>
- Or mount a local 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
If you are configuring an MCP client, use one of the provided configuration examples (npx or Docker) to connect to the server with your chosen spec.
Additional notes
Notes and tips:
- The server provides resource templates for dynamic, on-demand access to parts of the OpenAPI/Swagger spec (e.g., paths, components) without pre-enumerating every possible resource.
- Swagger v2.0 specs are automatically converted to OpenAPI v3.0 upon loading.
- When using npx, you can omit --output-format to default to json; supported options include json, yaml, json-minified.
- If you run via Docker with a local file, ensure the host path is absolute and correctly mounted, and the container path matches the spec path you provide inside the container.
- Clients should rely on the template endpoints rather than listing all resources; this scales well for very large specifications.
- Keeping the server up to date (via latest tag) helps ensure compatibility with newer MCP clients and spec features.
Related MCP Servers
Pare
Dev tools, optimized for agents. Structured, token-efficient MCP servers for git, test runners, npm, Docker, and more.
mcp-jest
Automated testing for Model Context Protocol servers. Ship MCP Servers with confidence.
MCP-Client -Project-using-NodeJS
A minimal Model Context Protocol (MCP) implementation built with Node.js and TypeScript. This project demonstrates client–server communication over stdio, structured message handling, and local data access, developed with VS Code and GitHub Copilot to explore modern AI tool integration workflows.
mcp-node-omnibus
A comprehensive Model Context Protocol (MCP) server that provides advanced Node.js development tooling and automation capabilities.
warp-sql
🗄️ Model Context Protocol (MCP) server for SQL Server integration with Warp terminal. Execute queries, explore schemas, export data, and analyze performance with natural language commands.
openapi-to -converter
A tool for automatically converting OpenAPI into Model Context Protocol (MCP) Server instance