Skip to content
Conduit

mcp server

swagger-mcp-tool

Swagger MCP tool that provides Swagger/OpenAPI document query capabilities for AI assistants and MCP clients.

sdlbp/swagger-mcp-toolcommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

Before you start

  • Node.js 20 or newer
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "swagger-mcp-tool": {
      "command": "npx",
      "args": [
        "-y",
        "swagger-mcp-tool"
      ]
    }
  }
}

same format Cursor, GitHub Copilot CLI, Junie, JetBrains AI Assistant, Augment (Auggie CLI), Factory Droid, Kiro, Devin CLI +12

Values in angle brackets are placeholders. Restart Claude Desktop after editing its config.Claude Desktop docs

README

synced Oct 21, 2026

swagger-mcp-tool

GitHub

简体中文

What is swagger-mcp-tool

An MCP (Model Context Protocol) server that loads Swagger/OpenAPI documents and exposes query tools for AI assistants and MCP clients.

Features

  • Generate API-related code directly through an agent using Swagger docs.
  • Generate response types and interface definitions for TypeScript projects.

Installation

Prerequisites

  • Node.js >= 18
  • npm or npx (for running the CLI)
  • Bun >= 1.0.0 (optional, for development/build)

Install

npm install -g swagger-mcp-tool

Usage

Add one or more server entries to your MCP client config (example for Cursor: ~/.cursor/mcp.json). Use a separate server name per Swagger/OpenAPI document to support multiple projects in parallel.

{
  "mcpServers": {
    "swagger-petstore": {
      "command": "npx",
      "args": ["-y", "swagger-mcp-tool", "https://example.com/petstore.json"]
    },
    "swagger-orders": {
      "command": "npx",
      "args": ["-y", "swagger-mcp-tool", "./openapi/orders.yaml"]
    }
  }
}

Chat panel examples

After the server is configured, describe what you want to add in the chat panel. Start with "View the Swagger doc" to help the agent trigger this tool, for example:

"View the Swagger doc and complete the refund API for the order domain."

API

ToolDescriptionParametersOutput
list_api_groupsList all API groups (tags)NoneJSON array of tag objects
search_apisSearch APIs by tag or keywordtag (optional), keyword (optional)JSON array of API summaries
get_api_detailGet full operation detailpath, methodJSON operation object
get_schemaGet schema by $ref or namerefJSON schema object

License

This project is licensed under the MIT License - see the LICENSE file for details.

↑↓ navigate openesc close