OpenAPI Schema Explorer

by kadykov

13 stars
460 downloads
Not rated
GitHub

About

Provides token-efficient access to OpenAPI and Swagger specifications through URI-based references, allowing exploration of API structures without loading entire specs into context windows.

Details

Author
kadykov
Repository
kadykov/mcp-openapi-schema-explorer
GitHub stars
13
Downloads
460
License
MIT License
Categories
Developer Tools, Community, Other, AI, File Management, Knowledge Base, API, Infrastructure

- MCP Resource Template Access: Explore OpenAPI specs via parameterized URI templates (openapi://info, openapi://paths/{path}/{method}, openapi://components/{type}/{name}).
- OpenAPI v3.0 & Swagger v2.0 Support: Loads both formats, automatically converting v2.0 to v3.0.
- Local & Remote Files: Load specs from local file paths or HTTP/HTTPS URLs.
- Token-Efficient: Designed to minimize token usage for LLMs by providing structured access.
- Multiple Output Formats: Get detailed views in JSON (default), YAML, or minified JSON (--output-format).
- Dynamic Server Name: Server name in MCP clients reflects the info.title from the loaded spec.
- Reference Transformation: Internal $refs (#/components/...) are transformed into clickable MCP URIs.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name OpenAPI Schema Explorer
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 mcp-openapi-schema-explorer@latest
    • Argument 3 <path-or-url-to-spec>
    • Argument 4 --output-format
    • Argument 5 yaml

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

For the recommended usage methods (npx and Docker, described below), no separate installation step is required. Your MCP client will download the package or pull the Docker image automatically based on the configuration you provide.

However, if you prefer or need to install the server explicitly, you have two options:

1. Global Installation: You can install the package globally using npm:

    npm install -g mcp-openapi-schema-explorer
    

See Method 3 below for how to configure your MCP client to use a globally installed server.

2. Local Development/Installation: You can clone the repository and build it locally:

    git clone https://github.com/kadykov/mcp-openapi-schema-explorer.git
cd mcp-openapi-schema-explorer
npm install
npm run build

See Method 4 below for how to configure your MCP client to run the server from your local build using node.

- Claude Code - Anthropic's CLI tool for coding with Claude
- Claude Desktop, Cline, Windsurf - See installation instructions below

If you have installed the package globally using npm install -g, you can configure your client to run it directly.


This method is useful if you have cloned the repository locally for development or to run a modified version.

Setup Steps (Run once in your terminal):

1. Clone the repository: git clone https://github.com/kadykov/mcp-openapi-schema-explorer.git
2. Navigate into the directory: cd mcp-openapi-schema-explorer
3. Install dependencies: npm install
4. Build the project: npm run build (or just build)

Example Client Configuration Entry (Local Development Method):

Add the following entry to your MCP client's configuration file. This instructs the client to run the locally built server using node.

json
{
"mcpServers": {
"My API Spec (Local Dev)": {
"command": "node",
"args": [
"/full/path/to/cloned/mcp-openapi-schema-explorer/dist/src/index.js",
"<path-or-url-to-spec>",
"--output-format",
"yaml"
],

"env": {}
}
}
}
``

Important: Replace /full/path/to/cloned/mcp-openapi-schema-explorer/dist/src/index.js with the correct absolute path to the built index.js` file in your cloned repository.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

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

Linux

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

Macos

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

Windows

{
    "env": [],
    "args": [
        "/c",
        "npx",
        "-y",
        "mcp-openapi-schema-explorer@latest",
        "<path-or-url-to-spec>",
        "--output-format",
        "yaml"
    ],
    "command": "cmd"
}

MCP OpenAPI Schema Explorer

npm version
NPM Downloads
Docker Pulls
License: MIT
codecov
Verified on MseeP
Trust Score
Listed on Spark

An MCP (Model Context Protocol) server that provides token-efficient access to OpenAPI (v3.0) and Swagger (v2.0) specifications via MCP Resource Templates.

Project Goal

The primary goal of this project is to allow MCP clients (like Cline or Claude Desktop) to explore the structure and details of large OpenAPI specifications without needing to load the entire file into an LLM's context window. It achieves this by exposing parts of the specification through MCP Resource Templates, which provide parameterized access patterns for read-only data exploration.

This server supports loading specifications from both local file paths and remote HTTP/HTTPS URLs. Swagger v2.0 specifications are automatically converted to OpenAPI v3.0 upon loading.

> Note: This server provides resource templates (not pre-enumerated resources). MCP clients access these templates through the resources/templates/list protocol method. For more information about resource templates, see the MCP Resource Templates documentation.

Why MCP Resource Templates?

The Model Context Protocol defines both Resources and Tools.

- Resources: Represent data sources (like files, API responses). They are ideal for read-only access and exploration by MCP clients.
- Resource Templates: A special type of resource that uses parameterized URIs (e.g., openapi://paths/{path}/{method}), allowing dynamic access without pre-enumerating all possible values.
- Tools: Represent executable actions or functions, often used by LLMs to perform tasks or interact with external systems.

While other MCP servers exist that provide access to OpenAPI specs via _Tools_, this project specifically focuses on providing access via _Resource Templates_. This approach is particularly efficient for large APIs because:

- It doesn't require pre-enumerating thousands of potential paths and components
- Clients can discover available resources dynamically using the template patterns
- It provides structured, on-demand access to specific parts of the specification

For more details on MCP clients and their capabilities, see the MCP Client Documentation.

Quick Start Guides by Client

- Claude Code - Anthropic's CLI tool for coding with Claude
- Claude Desktop, Cline, Windsurf - See installation instructions below

Installation

For the recommended usage methods (npx and Docker, described below), no separate installation step is required. Your MCP client will download the package or pull the Docker image automatically based on the configuration you provide.

However, if you prefer or need to install the server explicitly, you have two options:

1. Global Installation: You can install the package globally using npm:

    npm install -g mcp-openapi-schema-explorer
    

See Method 3 below for how to configure your MCP client to use a globally installed server.

2. Local Development/Installation: You can clone the repository and build it locally:

    git clone https://github.com/kadykov/mcp-openapi-schema-explorer.git
cd mcp-openapi-schema-explorer
npm install
npm run build

See Method 4 below for how to configure your MCP client to run the server from your local build using node.

Adding the Server to your MCP Client

This server is designed to be run by MCP clients (like Claude Desktop, Windsurf, Cline, etc.). To use it, you add a configuration entry to your client's settings file (often a JSON file). This entry tells the client how to execute the server process (e.g., using npx, docker, or node). The server itself doesn't require separate configuration beyond the command-line arguments specified in the client settings entry.

Below are the common methods for adding the server entry to your client's configuration.

Method 1: npx (Recommended)

Using npx is recommended as it avoids global/local installation and ensures the client uses the latest published version.

Example Client Configuration Entry (npx Method):

Add the following JSON object to the mcpServers section of your MCP client's configuration file. This entry instructs the client on how to run the server using npx:

{
  "mcpServers": {
    "My API Spec (npx)": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-openapi-schema-explorer@latest",
        "<path-or-url-to-spec>",
        "--output-format",
        "yaml"
      ],
      "env": {}
    }
  }
}

Configuration Notes:

- Replace "My API Spec (npx)" with a unique name for this server instance in your client.
- Replace <path-or-url-to-spec> with the absolute local file path or full remote URL of your specification.
- The --output-format is optional (json, yaml, json-minified), defaulting to json.
- To explore multiple specifications, add separate entries in mcpServers, each with a unique name and pointing to a different spec.

Method 2: Docker

You can instruct your MCP client to run the server using the official Docker image: kadykov/mcp-openapi-schema-explorer.

Example Client Configuration Entries (Docker Method):

Add one of the following JSON objects to the mcpServers section of your MCP client's configuration file. These entries instruct the client on how to run the server using docker run:

- Remote URL: Pass the URL directly to docker run.

- Using a Remote URL:

  {
    "mcpServers": {
      "My API Spec (Docker Remote)": {
        "command": "docker",
        "args": [
          "run",
          "--rm",
          "-i",
          "kadykov/mcp-openapi-schema-explorer:latest",
          "<remote-url-to-spec>"
        ],
        "env": {}
      }
    }
  }
  

- Using a Local File: (Requires mounting the file into the container)

  {
"mcpServers": {
"My API Spec (Docker Local)": {
"command": "docker",
"args": [
"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"
],
"env": {}
}
}
}

Important: Replace /full/host/path/to/spec.yaml with the correct absolute path on your host machine. The path /spec/api.yaml is the corresponding path inside the container.

Method 3: Global Installation (Less Common)

If you have installed the package globally using npm install -g, you can configure your client to run it directly.

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.