MCP.so
登录

@reapi/MCP Openapi

@ReAPI-com

基本信息

分类

其他

许可证

MIT

传输方式

stdio

作者

ReAPI-com

关于 @reapi/MCP Openapi

OpenAPI specification MCP server.

@reapi/MCP Openapi 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "@reapi/mcp-openapi": {
      "command": "npx",
      "args": [
        "-y",
        "@reapi/mcp-openapi@latest",
        "--dir",
        "./specs"
      ],
      "env": {}
    }
  }
}

@reapi/MCP Openapi 工具

7

Refresh the API catalog

Get the API catalog, the catalog contains metadata about all openapi specifications, their operations and schemas

Search for operations across specifications

Search for schemas across specifications

Load an operation by operationId

Load an operation by path and method

Load a schema by schemaName

概览

What is @reapi/mcp-openapi?

@reapi/mcp-openapi is a Model Context Protocol (MCP) server that loads and serves multiple OpenAPI specifications to enable LLM-powered IDE integrations. It acts as a bridge between your OpenAPI specifications and LLM-powered development tools like Cursor and other code editors, allowing LLMs to understand and work with your APIs directly in the IDE.

How to use @reapi/mcp-openapi?

Install and configure by adding a .cursor/mcp.json file (project-specific) or editing ~/.cursor/mcp.json (global) with the command npx -y @reapi/mcp-openapi@latest --dir <specs-directory>. Then enable the server in Cursor IDE’s Settings > MCP and refresh the catalog by typing “Please refresh the API catalog” or “Reload the OpenAPI specifications” in the chat panel. Place OpenAPI 3.x specification files (JSON/YAML, .json, .yaml, .yml) in the target directory; the server automatically discovers and processes them.

Key features of @reapi/mcp-openapi

  • Loads multiple OpenAPI specifications from a directory
  • Exposes API operations and schemas through MCP protocol
  • Enables LLMs to understand and work with APIs directly in the IDE
  • Supports dereferenced schemas for complete API context
  • Maintains a catalog of all available APIs
  • Powered by ReAPI, with optional API CMS and testing modules

Use cases of @reapi/mcp-openapi

  • Explore all available APIs and their operations in your project
  • Retrieve detailed endpoint information, parameters, and response schemas
  • Generate mock data, request payloads, and valid object examples from schemas
  • Create API client code (Axios, TypeScript interfaces, React hooks) automatically
  • Search for endpoints related to specific functionality or that accept file uploads

常见问题

1

What are the supported specification formats and requirements?

OpenAPI 3.x specifications in JSON or YAML format with `.json`, `.yaml`, or `.yml` extensions. By default, the filename (without extension) is used as the specification ID. To assign a custom ID, add an `x-spec-id` field in the OpenAPI info object.

2

How can I refresh the API catalog?

After adding new specifications to the directory, open Cursor’s chat panel and type either “Please refresh the API catalog” or “Reload the OpenAPI specifications”.

3

How does the server handle multiple specifications with overlapping paths?

Use the `x-spec-id` field in each specification’s info object to assign unique identifiers. This prevents naming conflicts for endpoint paths, schema names, and operation IDs, allowing you to reference endpoints specifically as `spec-id/path`.

4

What tools does the server expose through MCP?

Seven tools: `refresh-api-catalog`, `get-api-catalog`, `search-api-operations`, `search-api-schemas`, `load-api-operation-by-operationId`, `load-api-operation-by-path-and-method`, and `load-api-schema-by-schemaName`.

5

Does the server require authentication or special permissions?

No authentication is mentioned. The server runs locally on your machine and communicates with Cursor IDE via the MCP protocol. Cursor may request confirmation for each tool execution by default; you can enable Yolo mode for automatic execution.

评论

其他 分类下的更多 MCP 服务器