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
评论