Overview
Swagger MCP Server is a server that ingests and serves Swagger/OpenAPI specifications through the Model Context Protocol (MCP). It allows developers to easily manage and interact with their API specifications.
To use the Swagger MCP Server, clone the repository, install the dependencies, configure your Swagger/OpenAPI specification, and start the server using Yarn commands.
- Loads Swagger/OpenAPI specifications - Supports multiple authentication methods: Basic Auth, Bearer Token, API Key, OAuth2 - Automatically generates MCP tools from API endpoints - Server-Sent Events (SSE) support for real-time communication - TypeScript support
- Managing API specifications for development and testing.
- Real-time communication with clients using Server-Sent Events.
- Supporting various authentication methods for secure API access.
Add to your AI client
Use these steps to connect Swagger MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"swagger-mcp-dcolley": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-swagger-mcp-dcolley"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"swagger-mcp-dcolley": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-swagger-mcp-dcolley"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"swagger-mcp-dcolley": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-swagger-mcp-dcolley"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"swagger-mcp-dcolley": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-swagger-mcp-dcolley"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"swagger-mcp-dcolley": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-swagger-mcp-dcolley"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"swagger-mcp-dcolley": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-swagger-mcp-dcolley"
]
}
}
}FAQ
Is Swagger MCP Server secure?
Yes, it is recommended to keep the server private and not expose it to the public internet.
What are the prerequisites for running the server?
You need Node.js (v18 or higher), Yarn package manager, and TypeScript.
How can I test the server?
You can run the test suite using Yarn commands to ensure everything works correctly.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2797,"uuid":"9750ce58-32e3-4ba6-9b50-cab3775f182a","name":"swagger-mcp","title":"Swagger MCP Server","description":"Swagger to MCP server","avatar_url":"https://avatars.githubusercontent.com/u/1845970?v=4","created_at":"2025-03-14T02:10:22.909Z","updated_at":"2025-03-14T02:13:49.016Z","status":"created","author_name":"dcolley","author_avatar_url":"https://avatars.githubusercontent.com/u/1845970?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/dcolley/swagger-mcp","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"59\",\"license\":\"Apache-2.0 license\",\"language\":\"TypeScript\",\"is_official\":false,\"latest_commit_time\":\"2025-05-06 09:36:15\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]