- Home
- MCP servers
- Swagger
Swagger
- typescript
0
GitHub Stars
typescript
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": {
"nakiriyuuzu-swaggermcp": {
"command": "npx",
"args": [
"@yuuzu/swagger-mcp"
],
"env": {
"AUTH_TYPE": "bearer",
"LOG_LEVEL": "info",
"AUTH_TOKEN": "your-jwt-token-here",
"SWAGGER_URL": "https://api.example.com/swagger.json",
"API_BASE_URL": "https://example.com/api",
"SWAGGER_PATH": "/path/to/swagger.json"
}
}
}
}Swagger MCP Server dynamically builds MCP tools from Swagger/OpenAPI definitions using a TypeScript SDK. It lets Claude Desktop call REST APIs directly by generating tools from your API specifications and handling validation, logging, and auth for you.
How to use
You will run a local MCP that reads your Swagger/OpenAPI document and exposes generated MCP tools. In Claude Desktop, add a Swagger MCP server so Claude can invoke the REST APIs through the generated tools. Use the tools by selecting the generated tool names in your conversations and Claude will call the corresponding API endpoints automatically.
How to install
Prerequisites: you need Node.js version 20.14 or newer.
Install steps you can follow exactly as shown below. Start by cloning or fetching the package, install dependencies, and prepare the server for use in Claude Desktop.
npm install -g @yuuzu/swagger-mcp
npm run build
# Or run directly with npx without a global install
npx @yuuzu/swagger-mcp
# If you prefer to clone locally and build:
# git clone https://github.com/nakiriyuuzu/swagger-mcp.git
# cd swagger-mcp
# npm install
# npm run build
# Then run as above
Additional settings and usage notes
Configure Swagger source and authentication, then register the server in Claude Desktop to enable generation and usage of MCP tools.
Environment variables provide the Swagger source and credentials. The example below shows how to point to a Swagger JSON and set up a Bearer token.
{
"mcpServers": {
"swagger_mcp": {
"command": "npx",
"args": ["@yuuzu/swagger-mcp"],
"env": {
"SWAGGER_URL": "https://api.example.com/swagger.json",
"AUTH_TYPE": "bearer",
"AUTH_TOKEN": "your-jwt-token-here"
}
}
}
}
Security and advanced options
You can customize authentication with Bearer Token, API Key, or Basic Auth. Enable request/response logging and control how the Swagger document is refreshed. Keep the API_BASE_URL in mind if your Swagger uses relative paths.