Swagger MCP Server
Overview
Swagger MCP Server is a Model Context Protocol server designed to expose Swagger-defined APIs through the Model Context Protocol, making them accessible to AI agents.
To use Swagger MCP Server, create a configuration file that defines the Swagger endpoints you want to expose, and then run the server using the command line.
- Exposes Swagger-defined APIs through the Model Context Protocol. - Supports configuration of multiple endpoints. - Easy installation via npm or npx.
- Integrating Swagger APIs with AI agents for enhanced functionality.
- Simplifying API access for developers working with Swagger/OpenAPI specifications.
- Facilitating the development of applications that require dynamic API interactions.
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-server-marcin-sucharski": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-swagger-mcp-server-marcin-sucharski"
]
}
}
}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-server-marcin-sucharski": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-swagger-mcp-server-marcin-sucharski"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"swagger-mcp-server-marcin-sucharski": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-swagger-mcp-server-marcin-sucharski"
]
}
}
}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-server-marcin-sucharski": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-swagger-mcp-server-marcin-sucharski"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"swagger-mcp-server-marcin-sucharski": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-swagger-mcp-server-marcin-sucharski"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"swagger-mcp-server-marcin-sucharski": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-swagger-mcp-server-marcin-sucharski"
]
}
}
}FAQ
What is the Model Context Protocol?
The Model Context Protocol is a framework that allows AI agents to interact with APIs in a structured manner.
How do I install Swagger MCP Server?
You can install it globally using npm or run it directly with npx.
Can I expose multiple APIs?
Yes! You can define multiple endpoints in the configuration file.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":3048,"uuid":"1bc3efa9-cf67-4fa7-9868-f26c0c01acc1","name":"swagger-mcp-server","title":"Swagger MCP Server","description":"","avatar_url":"https://avatars.githubusercontent.com/u/9115385?v=4","created_at":"2025-03-17T02:40:38.592Z","updated_at":"2025-03-17T03:49:44.435Z","status":"created","author_name":"marcin-sucharski","author_avatar_url":"https://avatars.githubusercontent.com/u/9115385?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/marcin-sucharski/swagger-mcp-server","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"0\",\"license\":\"\",\"language\":\"TypeScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-19 18:30:24\"}","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"}]]}]