Skip to main content
Glama
marcin-sucharski

Swagger MCP Server

Swagger 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>

Related MCP server: cod-api MCP Server

Usage

  1. 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"
    }
  ]
}
  1. 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 expose

    • name: A unique identifier for the endpoint

    • url: URL to the Swagger/OpenAPI JSON definition

Development

To build the project:

npm run build

To run locally:

npm run run

License

ISC

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Exposes Swagger/OpenAPI API documentation to AI models, enabling exploration, search, and interaction with endpoints, schemas, and execution of API calls.
    14
    1 npm
    2
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Exposes REST API endpoints defined in an OpenAPI Specification as MCP tools, allowing AI models to call them via the ModelContext Protocol.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables developers to define, expose, and consume APIs using the Model Context Protocol with API-first design, built on OpenAPI specifications for robust schema validation and secure integration.
    3 npm
    1
    MIT