opa-mcp
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"my-api": {
"args": [
"-y",
"opamcp",
"https://petstore3.swagger.io/api/v3/openapi.json"
],
"command": "npx"
}
}
}
服务介绍
opamcp
OpenAPI MCP Server - OpenAPI MCP AI API .
# npx
npx -y opamcp <openapi-url>
#
npx -y opamcp https://petstore3.swagger.io/api/v3/openapi.json
MCP
Claude Desktop / Cursor
MCP :
{
"mcpServers": {
"my-api": {
"command": "npx",
"args": [
"-y",
"opamcp",
"https://petstore3.swagger.io/api/v3/openapi.json"
]
}
}
}
get_api_info |
API (title, version, description, servers) | - |
list_tags |
(API ) | - |
list_endpoints |
- | |
get_endpoints_by_tag |
tag: string |
|
get_endpoint_detail |
(, , , ) | path: string, method: string |
list_schemas |
components/schemas | - |
get_schema |
name: string |
|
search_endpoints |
path, summary, operationId | query: string |
get_api_info- APIlist_tags- APIlist_endpointsget_endpoints_by_tag-get_endpoint_detail-list_schemasget_schema-
#
bun install
#
bun run dev https://petstore3.swagger.io/api/v3/openapi.json
#
bun run build
MIT
English
OpenAPI MCP Server - Expose OpenAPI specs as MCP tools for AI assistants.
This MCP server parses an OpenAPI specification and provides semantic tools that allow AI assistants to explore and understand APIs step by step.
Installation & Usage
# Run directly with npx
npx -y opamcp <openapi-url>
# Example
npx -y opamcp https://petstore3.swagger.io/api/v3/openapi.json
MCP Client Configuration
Claude Desktop / Cursor
Add to your MCP client configuration:
{
"mcpServers": {
"my-api": {
"command": "npx",
"args": [
"-y",
"opamcp",
"https://petstore3.swagger.io/api/v3/openapi.json"
]
}
}
}
Available Tools
| Tool | Description | Parameters |
|---|---|---|
get_api_info |
Get API basic info (title, version, description, servers) | - |
list_tags |
List all tags (API groups) | - |
list_endpoints |
List all endpoints with summary | - |
get_endpoints_by_tag |
Get endpoints filtered by tag | tag: string |
get_endpoint_detail |
Get detailed endpoint info (params, request, response, schemas) | path: string, method: string |
list_schemas |
List all schema names in components/schemas | - |
get_schema |
Get full schema definition | name: string |
search_endpoints |
Search endpoints by path, summary, or operationId | query: string |
Recommended Usage Flow
get_api_info- Understand what the API is aboutlist_tags- See how the API is organizedlist_endpointsorget_endpoints_by_tag- Find relevant endpointsget_endpoint_detail- Get detailed information about a specific endpointlist_schemasget_schema- Explore data types
Development
# Install dependencies
bun install
# Run locally
bun run dev https://petstore3.swagger.io/api/v3/openapi.json
# Build for distribution
bun run build
License
MIT