An MCP server that connects to a Swagger specification and helps an AI to build all the required models to generate a MCP server for that service.
- Downloads a Swagger specification and stores it locally for faster reference.
- Returns a list of all the endpoints and their HTTP Methods and descriptions
- Returns a list of all the models
- Returns a model
- Returns service to connect to the end point
- Returns MCP function definitions
- Generates complete MCP tool definitions with full schema information
- Includes AI-specific instructions in tool descriptions
- Node.js (v14 or higher)
- npm or yarn
- Clone the repository:
git clone https://github.com/readingdancer/swagger-mcp.git
cd swagger-mcp
- Install dependencies:
npm install
- Create a
.envfile based on the.env.examplefile:
cp .env.example .env
- Update the
.envfile.
Edit the .env file to configure the application:
PORT: The port on which the server will run (default: 3000)NODE_ENV: The environment (development, production, test)LOG_LEVEL: Logging level (info, error, debug)