api
MCP server from bluechenchenchen/api-mcp-server
claude mcp add --transport stdio bluechenchenchen-api-mcp-server npx -y api-mcp-server --transport stdio --doc-url xxx
How to use
This MCP server is an API Swagger/OpenAPI documentation retrieval tool built on the Model Context Protocol (MCP). It fetches Swagger/OpenAPI specs from a provided URL, cleans and optimizes the document to reduce token usage, and exposes the information through MCP-compatible transports so IDEs can access endpoint details, parameters, and example requests/responses. The server supports multiple transport modes (stdio, http, and sse) to accommodate different integration scenarios with code editors and IDEs.
To use it, run the server with a document URL via the transport you prefer. In stdio mode (default), you can invoke it through npx api-mcp-server --doc-url <URL> and receive structured API information through standard I/O. If you need real-time updates or a RESTful interface, you can switch to http or SSE modes using --transport http or --transport sse and specify a port if needed with --port. The tool will parse the provided OpenAPI/Swagger document, extract endpoints, parameters, and response formats, and present them in a normalized MCP-friendly format suitable for IDE features like code completion and interface suggestions.
How to install
Prerequisites:
- Node.js v16 or newer
- npm or pnpm
Installation steps:
- Ensure Node.js is installed. Verify with: node -v npm -v
- Install dependencies and run the server using the MCP npm package. Since this server is designed to be used via npx, you can skip a global install and run directly: npx -y api-mcp-server --doc-url https://example.com/swagger.json
Optional development workflow (clone repository and run locally):
- git clone https://github.com/bluechenchenchen/api-mcp-server.git
- cd api-mcp-server
- pnpm install
- pnpm dev # for development mode
- pnpm build
Note: Replace https://example.com/swagger.json with your actual OpenAPI/Swagger URL. You can also switch transport modes later (stdio, http, sse) using the --transport flag.
Additional notes
Tips and common considerations:
- The --doc-url parameter is required to fetch the OpenAPI/Swagger document.
- Supported formats include Swagger 2.0 and OpenAPI 3.x; the tool will normalize the document for MCP consumption.
- Transport options: stdio (default), http, and sse. Use http for a RESTful interface and sse for real-time updates.
- If you run into CORS or network restrictions, ensure the host can access the provided doc URL from the chosen transport.
- The npm package name for this server is api-mcp-server, so you can run it directly with npx api-mcp-server. Consider pinning a specific version in production to avoid breaking changes.
- For debugging or inspector usage, you can run the inspector tool: npx @modelcontextprotocol/inspector
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.