Allows LLMs to explore and interact with Swagger/OpenAPI specifications, providing tools for loading API specifications, browsing endpoints, and getting detailed information about 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:
- Build the TypeScript code:
Usage
Available Tools
load_api
Load an OpenAPI/Swagger specification into the server.
Parameters:
apiId
(string): Unique identifier for this APIsource
(string): URL or file path to the OpenAPI/Swagger specification
Example:
get_endpoint_details
Get detailed information about a specific API endpoint.
Parameters:
apiId
(string): ID of the loaded APImethod
(string): HTTP method (GET, POST, etc.)path
(string): API endpoint pathnatural
(boolean, optional): If true, returns a human-readable summary
Example:
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 APIpattern
(string): Search pattern for endpoint paths or descriptions
Example:
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
:
Replace /path/to/your/swagger-mcp-server
with the actual path to your project directory.
License
MIT License
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A Model Context Protocol server that enables LLMs to explore and interact with API specifications by providing tools for loading, browsing, and getting detailed information about API endpoints.
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that enables LLMs to interact with Salesforce data through SOQL queries, SOSL searches, and various API operations including record management.Last updated -10124PythonMIT License
- -securityAlicense-qualityA Model Context Protocol server that allows LLMs to interact with web content through standardized tools, currently supporting web scraping functionality.Last updated -PythonMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables LLMs to interact with GraphQL APIs by providing schema introspection and query execution capabilities.Last updated -4291MIT License
- -securityAlicense-qualityA Model Context Protocol Server that enables LLMs to interact with and execute REST API calls through natural language prompts, supporting GET/PUT/POST/PATCH operations on configured APIs.Last updated -6PythonApache 2.0