swagger-mcp
Allows AI agents to explore and understand any API documented with Swagger/OpenAPI by providing tools to search endpoints, schemas, and auth details.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@swagger-mcp list endpoints for order management"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: OpenAPI Schema Explorer
Tools
Designed for progressive disclosure — orient, then discover, then drill down — so the agent loads only what it needs.
Tool | Purpose |
| Title, version, servers, global security, counts. Start here. |
| Tags (logical groups) with endpoint counts. |
| Compact index of endpoints; optional |
| Substring search over path/summary/description/params. |
| Named schemas with one-line descriptions. |
| Substring search over schema names, fields, descriptions. |
| Full detail for one |
| Resolve one named schema. |
| 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 buildLicense
MIT
Available Tools
9 toolsget_api_overviewAPI overviewARead-only
Top-level API metadata: title, version, description, servers, global security, and counts. Start here on an unfamiliar API.
Inputs: spec.
get_authGet authARead-only
Full security schemes for the API (OAuth2 flows, scopes, API-key locations) plus the global security requirement.
Inputs: spec.
get_endpointGet endpointARead-only
Full detail for one endpoint: parameters, request/response schemas, and required auth. Named schemas are shown by name — resolve them with get_schema.
Inputs: path (required), method (required), spec.
get_schemaGet schemaARead-only
Resolve one named schema. Nested named schemas are shown as { "$schema": "Name" } markers — call get_schema again to expand them.
Inputs: name (required), spec.
list_endpointsList endpointsARead-only
Compact index of endpoints (method, path, summary, tags). Optionally filter by tag.
Inputs: tag, spec.
list_schemasList schemasARead-only
List named component/definition schemas with one-line descriptions.
Inputs: spec.
list_tagsList tagsARead-only
List the API's tags (logical groups) with descriptions and endpoint counts.
Inputs: spec.
search_endpointsSearch endpointsARead-only
Substring search over endpoint path, summary, description, tags, and parameter names. Returns matches ranked by relevance.
Inputs: query (required), spec.
search_schemasSearch schemasARead-only
Substring search over schema names, property names, and descriptions. Returns matches ranked by relevance.
Inputs: query (required), spec.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a clearly distinct purpose: API metadata, auth, endpoint details, schema resolution, listings of endpoints/schemas/tags, and searching. No overlap or ambiguity.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., get_api_overview, list_endpoints, search_schemas), making them predictable and easy to understand.
With 9 tools, the set is well-scoped for an API exploration server. Each tool serves a necessary function without redundancy or unnecessary complexity.
The tool surface covers the full exploration workflow: overview, auth, listing endpoints/schemas/tags, detailed endpoint and schema retrieval, and substring search. No obvious gaps for the intended purpose.
Related MCP Connectors
MCP server for AI access to Swagger by SmartBear.
Read-only discovery MCP for Bittensor subnets, APIs, OpenAPI operations, pricing, and manifests.
Guarded MCP server for agent-readable business truth, provenance, readiness, and discovery.
Read-only MCP server over the developer docs for the portfolio's JSON API, MCP, A2A and NLWeb.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA MCP server that exposes OpenAPI schema information to LLMs like Claude. This server allows an LLM to explore and understand large OpenAPI schemas through a set of specialized tools, without needing to load the whole schema into the context50MIT
- AlicenseNot gradedqualityBmaintenanceMCP server providing token-efficient access to OpenAPI/Swagger specs via MCP Resources for client-side exploration.522 npm76MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI agents to explore, search, and query API definitions from OpenAPI/Swagger JSON files.MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for loading and exploring OpenAPI/Swagger specifications, enabling AI assistants to dynamically browse API contracts by loading specs, searching endpoints, inspecting schemas, and retrieving operations.10 npm3MIT