swagger-navigator
Intelligent MCP Server for Swagger/OpenAPI Discovery
claude mcp add --transport stdio aaydin-tr-swagger-navigator-mcp npx -y swagger-navigator-mcp \ --env CONFIG_PATH="path/to/swagger-navigator-mcp.config.yaml"
How to use
Swagger Navigator is an MCP server that indexes and searches Swagger/OpenAPI specifications to help AI assistants explore REST APIs. It dynamically discovers API specs from local files or remote HTTP endpoints, builds an internal index, and provides a fuzzy search interface over endpoints, descriptions, and metadata. Use the provided commands to list sources and endpoints, and to search for endpoints using natural language queries. The server is designed to be queried by LLMs or IDE assistants to generate clients, anticorruption layers, or type-safe clients based on the actual API schema.
How to install
Prerequisites:
- Node.js 18+ (npm comes with Node.js)
- A working network connection for fetching remote OpenAPI specs (if used)
Install and build:
# 1) Install dependencies
npm install
# 2) Build TypeScript sources (if the project uses a build step)
npm run build
Run the MCP server (example with a configuration path):
CONFIG_PATH=./swagger-navigator-mcp.config.yaml npm start
If you prefer using npx to run directly (as in the MCP config):
# This will fetch and run the package without local installation
npx -y swagger-navigator-mcp
Configuration file (swagger-navigator-mcp.config.yaml) example:
# Swagger Navigator MCP Server Configuration
sources:
- name: "petstore-local"
source: "./specs/petstore.json"
description: "Local Petstore API specification"
- name: "github-api"
source: "https://api.github.com"
description: "GitHub REST API v3"
headers:
Authorization: "token ${GITHUB_TOKEN}"
Accept: "application/vnd.github.v3+json"
search:
fuzzyThreshold: 0.6
refreshInterval: 300
Environment variables can be substituted in the config using ${VAR_NAME} syntax. Ensure required variables are exported before starting the server.
Additional notes
Notes:
- The CONFIG_PATH environment variable points to the YAML config that lists sources and search options.
- For private APIs, supply authentication headers in the config, using environment variable substitution for secrets.
- If the OpenAPI spec changes, the MCP’s refresh interval will trigger re-indexing; you can also restart the server to force a reload.
- When starting with npx, the package will be fetched on demand; with local npm install, you can reuse the built artifacts for faster startup.
Related MCP Servers
openmcp
Turn any openapi file into an mcp server, with just the tools you need.
mcpgen
Generate Go MCP server boilerplate from OpenAPI 3 specifications
mcp-openapi
OpenAPI specification MCP server.
mcp-swagger
MCP Swagger Server 将任何符合 OpenAPI/Swagger 规范的 REST API 转换为 Model Context Protocol (MCP) 格式,让 AI 助手能够理解和调用您的 API。
openapi -generator
A Python tool that automatically converts OpenAPI(Swagger, ETAPI) compatible specifications into fully functional Model Context Protocol (MCP) servers. Generates Docker-ready implementations with support for SSE/IO communication protocols, authentication, and comprehensive error handling. https://pypi.org/project/openapi-mcp-generator/
openapi2mcptools
OpenAPI specifications => MCP (Model Context Protocol) tools