Converts Swagger/OpenAPI specifications into dynamic MCP tools, automatically generating endpoints with input/output schema validation for any API documented with OpenAPI/Swagger format.
Swagger to MCP Server
Convert any Swagger/OpenAPI specification into a dynamic Model Context Protocol (MCP) server.
Features
π Automatically generates MCP tools from Swagger/OpenAPI specs
π Supports both local files (.yaml, .yml, .json) and remote URLs
β Built-in JSON schema validation using AJV
π Dynamic endpoint mapping with path parameters
πͺΆ Generates MCP manifest (mcp.json) for easy integration
Installation
Usage
Start the MCP server
Or with a custom Swagger file:
Generate manifest only (without starting server)
Use a remote Swagger URL
Configuration
Create a .env file to configure the server:
How It Works
Load Swagger/OpenAPI spec - From local file or URL
Parse endpoints - Extract all paths and operations
Generate MCP tools - Each endpoint becomes an MCP tool with:
Input schema validation
Output schema definition
HTTP request handler
Start MCP server - Listen on configured port and handle tool requests
Example
The included petstore.yaml provides a simple example:
This generates an MCP tool that can fetch pet information by ID.
License
MIT
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Automatically converts Swagger/OpenAPI specifications into dynamic MCP tools, enabling interaction with any REST API through natural language by loading specs from local files or URLs.