A Management Control Plane server that allows users to explore and analyze Swagger/OpenAPI specifications, providing features such as endpoint exploration, schema analysis, and customizable response formatting, with support for authentication and integration with tools like Claude.
A Management Control Plane (MCP) server for exploring and analyzing Swagger/OpenAPI specifications through Claude.
Install and run globally using npx:
npx -y @johnneerdael/swagger-mcp
Or install with environment variables:
npx -y @johnneerdael/swagger-mcp \ --env BASE_URL=/api \ --env AUTH_TOKEN=your-token \ --env PORT=3000
Name: Swagger Explorer
Command: npx -y @johnneerdael/swagger-mcp
Arguments: --swagger-url=$SWAGGER_URL
Here are some example interactions with Claude:
Human: Can you explore the Swagger documentation at http://localhost:8080/docs?
Claude: I'll help you explore that Swagger documentation using the Swagger Explorer MCP.
Let me analyze the API endpoints and schemas for you:
[Claude would then use the MCP to fetch and analyze the Swagger documentation]
Human: What are the available response schemas for the /pets POST endpoint?
Claude: I'll check the response schemas for that endpoint using the MCP.
[Claude would use the MCP to fetch specific endpoint details]
Human: Can you show me the detailed structure of the Pet schema?
Claude: I'll retrieve the detailed schema information using the MCP.
[Claude would use the MCP to analyze the schema structure]
Authentication Support
Custom Response Formatting
Schema Analysis
API Exploration
Environment Variables:
BASE_URL
: Base path for the API (default: '')AUTH_TOKEN
: Bearer token for authenticationPORT
: Server port (default: 3000)SWAGGER_URL
: Default Swagger documentation URLcurl -X POST http://localhost:3000/api/explore \ -H "Authorization: Bearer your-token" \ -H "Content-Type: application/json" \ -d '{ "url": "http://your-swagger-url", "options": { "paths": true, "schemas": true } }'
curl -X POST http://localhost:3000/api/schema-details \ -H "Authorization: Bearer your-token" \ -H "Content-Type: application/json" \ -d '{ "url": "http://your-swagger-url", "schemaName": "Pet" }'
curl -X POST http://localhost:3000/api/response-schemas \ -H "Authorization: Bearer your-token" \ -H "Content-Type: application/json" \ -d '{ "url": "http://your-swagger-url", "path": "/pets", "method": "post" }'
{ "status": "success", "data": { // Only non-null values } }
{ "status": "success", "timestamp": "2025-01-29T10:00:00.000Z", "data": { // Full response }, "metadata": { "version": "1.0", "format": "detailed" } }
API Documentation Review
Human: Can you summarize all the available endpoints and their purposes?
Schema Validation
Human: What fields are required for creating a new pet?
Response Analysis
Human: What are the possible error responses for the login endpoint?
Integration Planning
Human: How should I structure my request to create a new order?
Connection Issues
Authorization Errors
Schema Not Found
To contribute or modify:
npm install
npm run build
npm start
MIT License - See LICENSE file for details
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!