Skip to main content
Glama

Swagger/OpenAPI MCP Server

by gulbaki

Swagger/OpenAPI MCP Server

A Model Context Protocol (MCP) server that allows LLMs to explore and interact with Swagger/OpenAPI specifications. This server provides tools and resources for loading API specifications, browsing endpoints, and getting detailed information about API operations.

Installation

  1. Clone or create the project directory
  2. Install dependencies:
npm install
  1. Build the TypeScript code:
npm run build

Usage

Available Tools

load_api

Load an OpenAPI/Swagger specification into the server.

Parameters:

  • apiId (string): Unique identifier for this API
  • source (string): URL or file path to the OpenAPI/Swagger specification

Example:

{ "name": "load_api", "arguments": { "apiId": "petstore", "source": "https://petstore.swagger.io/v2/swagger.json" } }
get_endpoint_details

Get detailed information about a specific API endpoint.

Parameters:

  • apiId (string): ID of the loaded API
  • method (string): HTTP method (GET, POST, etc.)
  • path (string): API endpoint path
  • natural (boolean, optional): If true, returns a human-readable summary

Example:

{ "name": "get_endpoint_details", "arguments": { "apiId": "petstore", "method": "GET", "path": "/pet/{petId}", "natural": true } }
list_apis

List all currently loaded API specifications.

Parameters: None

search_endpoints

Search for endpoints matching a specific pattern.

Parameters:

  • apiId (string): ID of the loaded API
  • pattern (string): Search pattern for endpoint paths or descriptions

Example:

{ "name": "search_endpoints", "arguments": { "apiId": "petstore", "pattern": "pet" } }

Available Resources

swagger://{apiId}/load

Get overview information about a loaded API specification.

swagger://{apiId}/endpoints

Get a list of all available endpoints for an API.

swagger://{apiId}/endpoint/{method}/{path}

Get detailed information about a specific endpoint.

Configuration with Claude Desktop

To use this server with Claude Desktop, add the following to your claude_desktop_config.json:

{ "mcpServers": { "swagger-explorer": { "command": "node", "args": ["/path/to/your/swagger-mcp-server/build/index.js"] } } }

Replace /path/to/your/swagger-mcp-server with the actual path to your project directory.

License

MIT License

-
security - not tested
F
license - not found
-
quality - not tested

A Model Context Protocol server that enables LLMs to explore and interact with API specifications by providing tools for loading, browsing, and getting detailed information about API endpoints.

  1. Installation
    1. Usage
      1. Available Tools
      2. Available Resources
    2. Configuration with Claude Desktop
      1. License

        Related MCP Servers

        • A
          security
          A
          license
          A
          quality
          A Model Context Protocol server that enables LLMs to interact with Salesforce data through SOQL queries, SOSL searches, and various API operations including record management.
          Last updated -
          10
          77
          Python
          MIT License
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol server that allows LLMs to interact with web content through standardized tools, currently supporting web scraping functionality.
          Last updated -
          Python
          MIT License
          • Linux
          • Apple
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol server that enables LLMs to interact with GraphQL APIs by providing schema introspection and query execution capabilities.
          Last updated -
          733
          1
          MIT License
          • Apple
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol Server that enables LLMs to interact with and execute REST API calls through natural language prompts, supporting GET/PUT/POST/PATCH operations on configured APIs.
          Last updated -
          5
          Python
          Apache 2.0

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/gulbaki/swagger-mcp-server'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server