api-doc-mcp
This is a set of MCP tools for managing and retrieving OpenAPI documentation.
Features
This toolkit provides the following features:
- List all API groups
 
- List APIs in a specified group
 
- Get API details
 
- Search APIs
 
- Support both remote API docs and local JSON files
 
- Auto-refresh API documentation on each request
 
Usage
For cursor
# remote api
npx -y api-doc-mcp http://localhost:8000/swagger.json
# local file
npx -y api-doc-mcp ./swagger.json
Build
npm run build
Usage
Command Format
npx api-doc-mcp <API_DOC_URL_OR_FILE_PATH>
Examples
- View help:
 
npx api-doc-mcp
- List all API groups (Remote API):
 
npx api-doc-mcp https://api.example.com/swagger.json
- List all API groups (Local file):
 
npx api-doc-mcp ./swagger.json
Development
npm run dev
Tool Description
listApiGroups
List all available API groups.
Returns:
- name: Group name
 
- description: Group description
 
- apiCount: API count
 
listGroupApis
List all APIs in a specified group.
Parameters:
- groupName: API group name
 
Returns:
- path: API path
 
- method: HTTP method
 
- summary: API summary
 
getApiDetail
Get detailed information about a specified API.
Parameters:
- path: API path
 
- method: HTTP method
 
Returns:
- Complete API details, including parameters, request body, and response definition
 
searchApis
Search APIs.
Parameters:
Returns:
- path: API path
 
- method: HTTP method
 
- summary: API summary