About Swagger MCP Server
Swagger MCP Server exposes Swagger/OpenAPI-defined APIs to AI agents through MCP. Developers configure the endpoint definitions to make available.
Key features
- 01Expose Swagger/OpenAPI APIs
- 02Configure endpoints with JSON
- 03Support multiple endpoints
Use cases
- 01Make Swagger APIs available to AI agents
- 02Configure API definitions for MCP access
MCP support
It is an MCP server that exposes configured Swagger/OpenAPI APIs to MCP clients.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMESwagger MCP Server
A Model Context Protocol server for Swagger/OpenAPI endpoints. This tool allows you to expose Swagger-defined APIs through the Model Context Protocol, making them accessible to AI agents.
Installation
You can install the package globally:
npm install -g swagger-mcp-server
Or use it directly with npx:
npx swagger-mcp-server <config-file>
Usage
- Create a configuration file (JSON) that defines the Swagger endpoints you want to expose:
{
"endpoints": [
{
"name": "example-api",
"url": "https://example.com/api/swagger.json"
}
]
}
- Run the server:
swagger-mcp-server config.json
Or with npx:
npx swagger-mcp-server config.json
Configuration Options
The configuration file supports the following options:
endpoints: An array of Swagger endpoints to exposename: A unique identifier for the endpointurl: URL to the Swagger/OpenAPI JSON definition
Development
To build the project:
npm run build
To run locally:
npm run run
License
ISC
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.