Get the FREE Ultimate OpenClaw Setup Guide →

swagger

MCP server from gulbaki/swagger-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio gulbaki-swagger-mcp-server node build/index.js

How to use

This MCP server provides an explorer for Swagger/OpenAPI specifications. It offers tools to load API specs, inspect endpoints, and retrieve detailed operation information. Use load_api to import an OpenAPI/Swagger document by providing a unique apiId and a source URL or path. Once loaded, you can query endpoint details with get_endpoint_details, list all loaded APIs with list_apis, and search endpoints using a pattern with search_endpoints. The server also exposes handy resources under swagger://{apiId} to quickly access an API overview, a list of endpoints, or details for a specific endpoint. For Claude Desktop integration, you can point Claude at the built server and reference the recipe-like tool calls to interact with loaded APIs.

How to install

Prerequisites:

  • Node.js (v14+ recommended) and npm

Steps:

  1. Clone or create the project directory
  2. Install dependencies:
    npm install
    
  3. Build the TypeScript code:
    npm run build
    
  4. Run the MCP server:
    node build/index.js
    

Optional: if you publish or run via a different entry, ensure the path in mcp_config matches your runtime entry (e.g., build/index.js).

Additional notes

Tips and notes:

  • The primary tools are load_api, get_endpoint_details, list_apis, and search_endpoints. Use load_api with apiId and source (URL or file path) to import a Swagger/OpenAPI spec.
  • After loading, use get_endpoint_details with apiId, method, and path to fetch information about a specific endpoint. Set natural to true for a human-friendly summary.
  • You can access a loaded API via swagger://{apiId}/* routes, such as swagger://{apiId}/load for overview, swagger://{apiId}/endpoints for a list, or swagger://{apiId}/endpoint/{method}/{path} for endpoint details.
  • If you integrate with Claude Desktop, adjust claude_desktop_config.json to reference the built index.js path as shown in the README example.
  • Ensure network access to the OpenAPI spec if you use a remote URL as the source; some servers may require CORS allowances or authentication depending on the source.

Related MCP Servers

Sponsor this space

Reach thousands of developers