Swagger/OpenAPI MCP Server
Explore and interact with Swagger/OpenAPI specifications, allowing for browsing endpoints and retrieving details on API operations.
Swagger/OpenAPI MCP Server
A Model Context Protocol (MCP) server that allows LLMs to explore and interact with Swagger/OpenAPI specifications. This server provides tools and resources for loading API specifications, browsing endpoints, and getting detailed information about API operations.
Installation
- Clone or create the project directory
- Install dependencies:
npm install
- Build the TypeScript code:
npm run build
Usage
Available Tools
load_api
Load an OpenAPI/Swagger specification into the server.
Parameters:
- apiId(string): Unique identifier for this API
- source(string): URL or file path to the OpenAPI/Swagger specification
Example:
{ "name": "load_api", "arguments": { "apiId": "petstore", "source": "https://petstore.swagger.io/v2/swagger.json" } }
get_endpoint_details
Get detailed information about a specific API endpoint.
Parameters:
- apiId(string): ID of the loaded API
- method(string): HTTP method (GET, POST, etc.)
- path(string): API endpoint path
- natural(boolean, optional): If true, returns a human-readable summary
Example:
{ "name": "get_endpoint_details", "arguments": { "apiId": "petstore", "method": "GET", "path": "/pet/{petId}", "natural": true } }
list_apis
List all currently loaded API specifications.
Parameters: None
search_endpoints
Search for endpoints matching a specific pattern.
Parameters:
- apiId(string): ID of the loaded API
- pattern(string): Search pattern for endpoint paths or descriptions
Example:
{ "name": "search_endpoints", "arguments": { "apiId": "petstore", "pattern": "pet" } }
Available Resources
swagger://{apiId}/load
Get overview information about a loaded API specification.
swagger://{apiId}/endpoints
Get a list of all available endpoints for an API.
swagger://{apiId}/endpoint/{method}/{path}
Get detailed information about a specific endpoint.
Configuration with Claude Desktop
To use this server with Claude Desktop, add the following to your claude_desktop_config.json:
{ "mcpServers": { "swagger-explorer": { "command": "node", "args": ["/path/to/your/swagger-mcp-server/build/index.js"] } } }
Replace /path/to/your/swagger-mcp-server with the actual path to your project directory.
License
MIT License
Related Servers
- Jetty.io- Work on dataset metadata with MLCommons Croissant validation and creation. 
- MCP Crypto Wallet EVM- Perform EVM crypto wallet operations using ethers.js v5. Supports a private key environment variable for wallet operations. 
- Bitrise- Manage apps, builds, and artifacts on Bitrise, a Continuous Integration and Delivery (CI/CD) platform. 
- MCP Everything- A demonstration server for the Model Context Protocol (MCP) showcasing various features like tools, resources, and prompts in TypeScript and Python. 
- OpenAI GPT Image- Generate and edit images using OpenAI's GPT-4o and DALL-E APIs with advanced prompt control. 
- Authless Remote MCP Server- A remote MCP server without authentication, deployable on Cloudflare Workers or locally with npm. 
- MCP Jenkins Intelligence- AI-powered Jenkins pipeline intelligence platform with natural language interface. Provides comprehensive pipeline analysis, failure prediction, optimization suggestions, and automated Jenkinsfile reconstruction using Model Context Protocol (MCP) integration. 
- .NET Types Explorer- Provides detailed type information from .NET projects including assembly exploration, type reflection, and NuGet integration for AI coding agents 
- MCP Pyrefly- A server for real-time Python code validation using Pyrefly, designed to prevent common coding errors from LLMs. 
- Codesys-mcp-toolkit- A Model Context Protocol (MCP) server for CODESYS V3 programming environments.