MCP.so
Sign In
Servers

@reapi/mcp-openapi

@ReAPI-com

OpenAPI specification MCP server.

Overview

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

FAQ from @reapi/mcp-openapi

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.

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”.

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.

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.

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.

Tags

More from Other