English | 简体中文
This is a Swagger/OpenAPI documentation retrieval tool based on MCP (Model Context Protocol). It can fetch and parse Swagger/OpenAPI documentation from specified URLs and supports multiple transport methods.
- Fetch Swagger/OpenAPI documentation from remote URLs
- Support for Swagger 2.0 and OpenAPI 3.x formats
- Multiple transport methods:
- stdio: Standard input/output mode
- http: HTTP server mode
- sse: Server-Sent Events mode
- Automatic port allocation and failover
- CORS support
- Comprehensive error handling
{
"mcpServers": {
"api-mcp-server": {
"command": "npx",
"args": [
"-y",
"api-mcp-server",
"--transport",
"stdio",
"--doc-url",
"xxx"
]
}
}
}
{
"mcpServers": {
"api-mcp-server": {
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"api-mcp-server",
"--transport",
"stdio",
"--doc-url",
"xxx"
]
}
}
}
-
--transport <stdio|http|sse>
: Choose transport method (default: stdio) -
--port <number>
: HTTP/SSE server port (default: 3000) -
--doc-url <url>
: Swagger/OpenAPI documentation URL (required)
# Clone the repository
git clone https://github.com/bluechenchenchen/api-mcp-server.git
# Install dependencies
pnpm install
# Run in development mode
pnpm dev
# Build
pnpm build
- Node.js >= 16.0.0
- npm >= 6.0.0 or pnpm >= 6.0.0
MIT