Swagger/OpenAPI

v1.0.0Developer Toolsstable

TypeScript-based MCP server that integrates with Swagger/OpenAPI specifications to expose API endpoints as tools for LLMs

swagger-mcp-adaptermcpai-integration
Share:
9
Stars
0
Downloads
0
Weekly
0/5

What is Swagger/OpenAPI?

Swagger/OpenAPI is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to typescript-based mcp server that integrates with swagger/openapi specifications to expose api endpoints as tools for llms

TypeScript-based MCP server that integrates with Swagger/OpenAPI specifications to expose API endpoints as tools for LLMs

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • TypeScript-based MCP server that integrates with Swagger/Ope

Use Cases

Expose any Swagger/OpenAPI endpoint as a tool for Claude.
Call external APIs described in OpenAPI specs.
serifcolakel

Maintainer

LicenseMIT
Languagetypescript
Versionv1.0.0
UpdatedMar 29, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx swagger-mcp-adapter

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Swagger/OpenAPI

The Swagger MCP Adapter is a TypeScript-based MCP server that reads any Swagger or OpenAPI specification file and dynamically exposes every endpoint as a callable MCP tool. This lets Claude and other LLMs discover and invoke REST APIs described by an OpenAPI spec without requiring custom integration code.

Prerequisites

  • Node.js 18 or later and npm installed
  • An existing Swagger 2.0 or OpenAPI 3.x specification file (JSON or YAML)
  • The target API must be network-accessible from the machine running the adapter
  • Claude Desktop or another MCP-compatible client
  • Git installed to clone the repository
1

Clone and install the repository

Clone the swagger-mcp-adapter repository and install its npm dependencies.

git clone https://github.com/serifcolakel/swagger-mcp-adapter.git
cd swagger-mcp-adapter
npm install
2

Set required environment variables

Export the path to your OpenAPI/Swagger file. Optionally override the base URL if the spec does not contain a correct server URL.

export SWAGGER_PATH="./path/to/your/swagger.json"
export BASE_URL="https://api.example.com"  # Optional
3

Build the TypeScript project

Compile the TypeScript source into JavaScript so it can be run with Node.js.

npm run build
4

Start the MCP server

Run the compiled server. It will read the spec at SWAGGER_PATH and expose each endpoint as an MCP tool over stdio.

node dist/index.js
5

Configure your MCP client

Add an entry to claude_desktop_config.json pointing to the built server script. Use the absolute path to dist/index.js.

Swagger/OpenAPI Examples

Client configuration

Add the adapter to Claude Desktop config. Replace /absolute/path with the real path where you cloned the repo.

{
  "mcpServers": {
    "swagger-mcp-adapter": {
      "command": "node",
      "args": ["/absolute/path/to/swagger-mcp-adapter/dist/index.js"],
      "env": {
        "SWAGGER_PATH": "/absolute/path/to/swagger.json",
        "BASE_URL": "https://api.example.com"
      }
    }
  }
}

Prompts to try

After connecting, Claude can list and call any endpoint defined in your OpenAPI spec.

- "List all available API services from the loaded Swagger spec."
- "Get information about the /users endpoint and call it to retrieve the first 10 users."
- "Call the POST /orders endpoint with the following payload and show me the response."
- "Check the cache status and tell me how many entries are currently cached."

Troubleshooting Swagger/OpenAPI

SWAGGER_PATH not found or server exits immediately

Make sure the SWAGGER_PATH environment variable points to an actual file. Use an absolute path to avoid working-directory ambiguity. Run `ls $SWAGGER_PATH` to verify.

API calls fail with network or CORS errors

Ensure BASE_URL is set to the correct server origin. The machine running the adapter must have network access to that host. Check firewall rules if requests time out.

TypeScript build errors during npm run build

Confirm Node.js is version 18 or later (`node --version`). Delete node_modules and run `npm install` again, then retry the build.

Frequently Asked Questions about Swagger/OpenAPI

What is Swagger/OpenAPI?

Swagger/OpenAPI is a Model Context Protocol (MCP) server that typescript-based mcp server that integrates with swagger/openapi specifications to expose api endpoints as tools for llms It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Swagger/OpenAPI?

Follow the installation instructions on the Swagger/OpenAPI GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Swagger/OpenAPI?

Swagger/OpenAPI works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Swagger/OpenAPI free to use?

Yes, Swagger/OpenAPI is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "swagger-mcp-adapter": { "command": "npx", "args": ["-y", "swagger-mcp-adapter"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Swagger/OpenAPI?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides