swagger-mcp

swagger-mcp

A read-only MCP server for navigating OpenAPI / Swagger specifications, enabling agents to search endpoints, retrieve parameters and schemas, and inspect authentication without loading the full spec into context.

Category
Visit Server

README

swagger-mcp

A read-only Model Context Protocol server for navigating an OpenAPI / Swagger specification. It gives a coding agent tools to explore a large API's documentation — search endpoints, read parameters and schemas, inspect auth — without dumping the whole spec into context.

It never calls the described API. It only reads its documentation.

Works with any MCP-capable harness (Claude Code, Cursor, Cline, Windsurf, Zed, opencode, …) over stdio.

Usage

Add it to your MCP client config. No install step — npx fetches it on demand:

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

Every tool takes a spec parameter — a URL (or local path) to a Swagger 2.0 or OpenAPI 3.x document — so a single server can navigate any number of specs in one session. Internal/localhost URLs (e.g. Spring Boot's http://localhost:8080/v3/api-docs) are supported.

If you mostly work with one spec, set API_DOCS_URL as a default so spec can be omitted:

{
  "mcpServers": {
    "swagger-mcp": {
      "command": "npx",
      "args": ["-y", "@emreyc/swagger-mcp@latest"],
      "env": { "API_DOCS_URL": "https://api.example.com/swagger.json" }
    }
  }
}

Specs are fetched lazily and cached per URL for the process lifetime.

Tools

Designed for progressive disclosure — orient, then discover, then drill down — so the agent loads only what it needs.

Tool Purpose
get_api_overview Title, version, servers, global security, counts. Start here.
list_tags Tags (logical groups) with endpoint counts.
list_endpoints Compact index of endpoints; optional tag filter.
search_endpoints Substring search over path/summary/description/params.
list_schemas Named schemas with one-line descriptions.
search_schemas Substring search over schema names, fields, descriptions.
get_endpoint Full detail for one method+path: params, request/response schemas, auth.
get_schema Resolve one named schema.
get_auth Security schemes in full (OAuth2 flows, scopes, API-key locations).

Every tool also accepts an optional spec argument (a spec URL or path); when omitted it falls back to API_DOCS_URL.

Swagger 2.0 and OpenAPI 3.x are normalized into one consistent output shape. Nested named schemas are shown as { "$schema": "Name" } markers — call get_schema to expand them. This keeps every response bounded and is safe with circular schemas.

Development

npm install
npm run typecheck
npm test
npm run build

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured