- Home
- MCP servers
- Swagger
Swagger
- javascript
0
GitHub Stars
javascript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"suhailtajshaik-swagger-to-mcp": {
"command": "node",
"args": [
"server.js",
"--swagger=./path/to/your/spec.yaml"
]
}
}
}Swagger to MCP Server converts a Swagger/OpenAPI specification into a dynamic MCP server. You can point the server at local specs or remote URLs, and it automatically creates MCP tools with input validation and manifest generation for easy integration.
How to use
Start a dedicated MCP server instance from your Swagger/OpenAPI spec and interact with it via MCP clients. You can run a local server using a swagger file you provide, or use a remote URL to fetch the spec on the fly. The server will expose MCP tools derived from each endpoint, validate inputs with JSON schemas, and generate an mcp.json manifest for seamless integration.
How to install
Prerequisites: you need Node.js and a package manager able to run pnpm commands. You should have network access to install dependencies.
# Install dependencies
pnpm install
# Start the MCP server with a local Swagger file
pnpm start
# Or start using a specific local Swagger file
node server.js --swagger=./path/to/your/spec.yaml
# Generate manifest only (no server start)
node server.js --swagger=./petstore.yaml --manifest-only
# Use a remote Swagger URL
node server.js --swagger=https://petstore.swagger.io/v2/swagger.json
Configuration
Configure the server port and related options through environment variables. For example, set the port the MCP server should listen on.
MCP_PORT=4000
Notes and usage patterns
- You can start the server with a local Swagger spec by pointing to a file path. The --swagger option accepts either a local path or a remote URL. - If you provide --manifest-only, the server will generate the MCP manifest (mcp.json) without starting the HTTP listener. - When using a remote URL, ensure the URL is reachable and returns a valid OpenAPI specification.