Swagger/OpenAPI
TypeScript-based MCP server that integrates with Swagger/OpenAPI specifications to expose API endpoints as tools for LLMs
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
Maintainer
Works with
Installation
Manual Installation
npx swagger-mcp-adapterConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 installSet 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" # OptionalBuild the TypeScript project
Compile the TypeScript source into JavaScript so it can be run with Node.js.
npm run buildStart 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.jsConfigure 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.
Swagger/OpenAPI Alternatives — Similar Developer Tools Servers
Looking for alternatives to Swagger/OpenAPI? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up Swagger/OpenAPI in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.