Skip to content
MCP server

OpenAPI Swagger MCP

Local MCP server with 11 fixed tools for searching, previewing and calling OpenAPI APIs

Runs locally

OpenAPI Swagger MCP is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI
Runs
Locally
Version
0.1.5
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add openapi-swagger-mcp -- npx -y @nhan7777/openapi-swagger-mcp

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "openapi-swagger-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@nhan7777/openapi-swagger-mcp"
      ]
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "openapi-swagger-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@nhan7777/openapi-swagger-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "openapi-swagger-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@nhan7777/openapi-swagger-mcp"
      ]
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "openapi-swagger-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@nhan7777/openapi-swagger-mcp"
      ]
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add openapi-swagger-mcp -- npx -y @nhan7777/openapi-swagger-mcp

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.openapi-swagger-mcp]
command = "npx"
args = ["-y", "@nhan7777/openapi-swagger-mcp"]

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "openapi-swagger-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@nhan7777/openapi-swagger-mcp"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "openapi-swagger-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@nhan7777/openapi-swagger-mcp"
          ]
        }
      }
    }

    Or run: gemini mcp add -s user openapi-swagger-mcp npx -- -y @nhan7777/openapi-swagger-mcp

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "openapi-swagger-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@nhan7777/openapi-swagger-mcp"
          ]
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "openapi-swagger-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@nhan7777/openapi-swagger-mcp"
          ]
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "openapi-swagger-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@nhan7777/openapi-swagger-mcp"
          ]
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "openapi-swagger-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@nhan7777/openapi-swagger-mcp"
          ]
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "openapi-swagger-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@nhan7777/openapi-swagger-mcp"
          ]
        }
      }
    }

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "openapi-swagger-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@nhan7777/openapi-swagger-mcp"
          ]
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "openapi-swagger-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@nhan7777/openapi-swagger-mcp"
          ]
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

About OpenAPI Swagger MCP

Instead of generating one tool per endpoint, this server keeps the tool list fixed at 11 however large the API is. The README argues that per-endpoint bridges fall apart on a 400-route backend, so the agent searches the spec, reads one operation's contract and then acts.

A typical session runs list_apis and search_operations to find an endpoint, get_operation_schema to read its parameters and auth, preview_operation for an offline dry run that reports sent: false, and invoke_operation to make the real HTTP call and check the response against the spec. A local Request Inspector web UI on 127.0.0.1 shows every tool call and HTTP exchange, with secrets masked by name.

It reads a YAML config listing each service's base URL and spec (a URL or a local file) and supports Swagger 2.0 and OpenAPI 3.0/3.1. The README warns that invoke_operation sends real POST, PUT, PATCH and DELETE requests, so it recommends pointing it at local, test or staging environments only. It runs locally over stdio with no telemetry.

Tools this server provides (6)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 4 of 6 tools read data; 2 names don't say.

From the server's own tool labels and tool names; not verified by us.

list_apisName suggests: reads
List configured services, spec readiness, revisions, warnings and Inspector status
search_operationsName suggests: reads
Search endpoints by path, operationId, text, parameters or request and response fields
get_operation_schemaName suggests: reads
Read the full contract for one operation: parameters, body, responses and auth
refresh_specs
Reload OpenAPI specs without restarting the server
preview_operationName suggests: reads
Build and validate a request offline without sending it
invoke_operation
Send the real HTTP request and check the response against the spec

What it does

Fixed 11-tool surface
The tool count stays the same whether the API has 10 routes or 400.
Offline dry run
`preview_operation` builds and validates a request without touching the network.
Real calls with checks
`invoke_operation` sends the HTTP request and checks the response against the spec.
Local request inspector
A read-only web UI on 127.0.0.1 shows tool calls, HTTP exchanges, auth runs and cURL export.
Config check and demo
`--check` validates the config offline, and a `demo` command starts a mock backend.
Spec refresh
`refresh_specs` reloads specs without a restart and keeps the last valid snapshot if reloading fails.

Good for

  • Let an agent find and call an endpoint in a large internal API
  • Dry-run a request before sending it to a staging service
  • Test an API with deliberately bad inputs and compare responses with the spec
  • Audit what an agent actually sent using the local inspector

Pricing

Open source

OpenAPI Swagger MCP FAQ

Which spec formats work?

Swagger 2.0 and OpenAPI 3.0 and 3.1.

Is OpenAPI Swagger MCP safe to point at production?

The README recommends non-production environments only, because real POST, PUT, PATCH and DELETE calls have no undo.

Does OpenAPI Swagger MCP send telemetry?

No. The README says it runs locally over stdio with zero telemetry, though any tool output your assistant reads goes to your model provider.

What Node version is needed?

The demo requires Node.js 22.19 or newer.

Is OpenAPI Swagger MCP free?

Yes. OpenAPI Swagger MCP is open source, so you can use and self-host it for free.

How do I add OpenAPI Swagger MCP to Claude Code?

Run this command in your terminal: claude mcp add openapi-swagger-mcp -- npx -y @nhan7777/openapi-swagger-mcp

What are the best alternatives to OpenAPI Swagger MCP?

The closest alternatives to OpenAPI Swagger MCP are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers