swagger-mcp
72
Swagger MCP Server is a personal server designed to ingest and serve Swagger/OpenAPI specifications using the Model Context Protocol. It supports multiple authentication methods and automatically generates MCP tools from API endpoints. It also includes features like Server-Sent Events for real-time communication and TypeScript support.
Swagger MCP Server
A server that ingests and serves Swagger/OpenAPI specifications through the Model Context Protocol (MCP).
Features
- Loads Swagger/OpenAPI specifications
- Supports multiple authentication methods
- Automatically generates MCP tools from API endpoints
- Real-time communication via Server-Sent Events
- TypeScript support
Prerequisites
- Node.js (v18 or higher)
- Yarn package manager
- TypeScript
Installation
- Clone the repository and navigate to the directory
- Install dependencies with Yarn
- Create and configure a
.env
file - Configure your Swagger/OpenAPI specification
Usage
- Start the development server
- Build for production
- Start the production server
API Endpoints
GET /health
- Check server health statusGET /sse
- Establish SSE connectionPOST /messages
- Send messages to the MCP server
Security
This is a personal server and should not be exposed to the public internet.
Testing
Run the test suite and check for coverage