o

opa-mcp

@teddy258/opa-mcp
0 Stars 174 次浏览 teddy258 更新于 2026-08-23

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

  1. get_api_info - API
  2. list_tags - API
  3. list_endpoints get_endpoints_by_tag -
  4. get_endpoint_detail -
  5. list_schemas get_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
  1. get_api_info - Understand what the API is about
  2. list_tags - See how the API is organized
  3. list_endpoints or get_endpoints_by_tag - Find relevant endpoints
  4. get_endpoint_detail - Get detailed information about a specific endpoint
  5. list_schemas get_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

相关 MCP 服务