swagger
MCP server from tuskermanshu/swagger-mcp-server
claude mcp add --transport stdio tuskermanshu-swagger-mcp-server node start-server.js
How to use
This MCP server parses Swagger/OpenAPI documents (supporting both v2 and v3) and generates TypeScript types and API client code across multiple frameworks. It exposes a set of MCP tools such as parse-swagger, parse-swagger-optimized, parse-swagger-lite, generate-typescript-types, generate-typescript-types-optimized, generate-api-client, generate-api-client-optimized, and file-writer. You can communicate with the server over standard input/output when started via node start-server.js, issuing JSON-RPC-like messages to request parsing, type generation, or client code generation. For example, you can request a full or optimized parse of a given OpenAPI URL, then generate TypeScript types with a chosen namespace, or produce an Axios, Fetch, or React Query client based on the same Swagger document. The optimized tools support caching, lazy loading, tag filtering, and partial results to handle large APIs efficiently. The server also supports writing outputs to the filesystem via the file-writer tool and can be inspected with the MCP Inspector when running in debug mode.
How to install
Prerequisites:
- Node.js (lts) installed
- npm or pnpm
Step-by-step:
-
Install project dependencies
npm install # or using pnpm pnpm install -
Build the project (if applicable)
npm run build # or pnpm build -
Start the MCP server (stdio transport)
node start-server.js -
(Optional) Connect with MCP Inspector for debugging
npx @modelcontextprotocol/inspector pipe -- node start-server.js -
If you prefer installing via Smithery for Claude or other clients:
npx -y @smithery/cli install @tuskermanshu/swagger-mcp-server --client claude
Additional notes
Notes and tips:
- The server caches Swagger/OpenAPI documents to speed up repeated queries. Cache is stored in the .api-cache directory; delete it to clear cached data or disable caching via the parse options.
- Supported tools include standard, optimized, and lite parsing modes, as well as type and client code generation. Use lite mode for very large documents when you need quick, basic summaries; switch to optimized modes for full parsing with caching and advanced options.
- The generate-api-client tools support multiple client types (axios, fetch, react-query). You can adjust imports and grouping (e.g., by tag) to fit your project structure.
- You can filter results by tags, paths, or include specific schemas to manage large APIs.
- For large docs, consider enabling useCache, lazyLoading, and skipValidation to balance performance and accuracy.
- The MCP server communicates via standard input/output by default. Use the MCP Inspector for a more user-friendly debugging experience.
- The npm package name for this server is @tuskermanshu/swagger-mcp-server, which can be installed or referenced in tooling integrations.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud