Labsco
ReAPI-com logo

ReAPI OpenAPI

โ˜… 87

from ReAPI-com

Serves multiple OpenAPI specifications to enable LLM-powered IDE integrations.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

@reapi/mcp-openapi

A Model Context Protocol (MCP) server that loads and serves multiple OpenAPI specifications to enable LLM-powered IDE integrations. This server acts as a bridge between your OpenAPI specifications and LLM-powered development tools like Cursor and other code editors.

Features

  • Loads multiple OpenAPI specifications from a directory
  • Exposes API operations and schemas through MCP protocol
  • Enables LLMs to understand and work with your APIs directly in your IDE
  • Supports dereferenced schemas for complete API context
  • Maintains a catalog of all available APIs

Powered by ReAPI

This open-source MCP server is sponsored by ReAPI, a next-generation API platform that simplifies API design and testing. While this server provides local OpenAPI integration for development, ReAPI offers two powerful modules:

๐ŸŽจ API CMS

  • Design APIs using an intuitive no-code editor
  • Generate and publish OpenAPI specifications automatically
  • Collaborate with team members in real-time
  • Version control and change management

๐Ÿงช API Testing

  • The most developer-friendly no-code API testing solution
  • Create and manage test cases with an intuitive interface
  • Powerful assertion and validation capabilities
  • Serverless cloud test executor
  • Perfect for both QA teams and developers
  • CI/CD integration ready

Try ReAPI for free at reapi.com and experience the future of API development.

How It Works

  1. The server scans the specified directory for OpenAPI specification files
  2. It processes and dereferences the specifications for complete context
  3. Creates and maintains a catalog of all API operations and schemas
  4. Exposes this information through the MCP protocol
  5. IDE integrations can then use this information to:
    • Provide API context to LLMs
    • Enable intelligent code completion
    • Assist in API integration
    • Generate API-aware code snippets

Tools

  1. refresh-api-catalog

    • Refresh the API catalog
    • Returns: Success message when catalog is refreshed
  2. get-api-catalog

    • Get the API catalog, the catalog contains metadata about all openapi specifications, their operations and schemas
    • Returns: Complete API catalog with all specifications, operations, and schemas
  3. search-api-operations

    • Search for operations across specifications
    • Inputs:
      • query (string): Search query
      • specId (optional string): Specific API specification ID to search within
    • Returns: Matching operations from the API catalog
  4. search-api-schemas

    • Search for schemas across specifications
    • Inputs:
      • query (string): Search query
      • specId (optional string): Specific API specification ID to search
    • Returns: Matching schemas from the API catalog
  5. load-api-operation-by-operationId

    • Load an operation by operationId
    • Inputs:
      • specId (string): API specification ID
      • operationId (string): Operation ID to load
    • Returns: Complete operation details
  6. load-api-operation-by-path-and-method

    • Load an operation by path and method
    • Inputs:
      • specId (string): API specification ID
      • path (string): API endpoint path
      • method (string): HTTP method
    • Returns: Complete operation details
  7. load-api-schema-by-schemaName

    • Load a schema by schemaName
    • Inputs:
      • specId (string): API specification ID
      • schemaName (string): Name of the schema to load
    • Returns: Complete schema details

Roadmap

  1. Semantic Search

    • Enable natural language queries for API operations and schemas
    • Improve search accuracy with semantic understanding
  2. Remote Specs Sync

    • Support syncing OpenAPI specifications from remote sources
  3. Code Templates

    • Expose code templates through MCP protocol
    • Provide reference patterns for LLM code generation
  4. Community Contributions

    • Submit feature requests and bug reports
    • Contribute to improve the server

Example Prompts in Cursor

Here are some example prompts you can use in Cursor IDE to interact with your APIs:

  1. Explore Available APIs

    "Show me all available APIs in the catalog with their operations"
    "List all API specifications and their endpoints"
  2. API Operation Details

    "Show me the details of the create pet API endpoint"
    "What are the required parameters for creating a new pet?"
    "Explain the response schema for the pet creation endpoint"
  3. Schema and Mock Data

    "Generate mock data for the Pet schema"
    "Create a valid request payload for the create pet endpoint"
    "Show me examples of valid pet objects based on the schema"
  4. Code Generation

    "Generate an Axios client for the create pet API"
    "Create a TypeScript interface for the Pet schema"
    "Write a React hook that calls the create pet endpoint"
  5. API Integration Assistance

    "Help me implement error handling for the pet API endpoints"
    "Generate unit tests for the pet API client"
    "Create a service class that encapsulates all pet-related API calls"
  6. Documentation and Usage

    "Show me example usage of the pet API with curl"
    "Generate JSDoc comments for the pet API client methods"
    "Create a README section explaining the pet API integration"
  7. Validation and Types

    "Generate Zod validation schema for the Pet model"
    "Create TypeScript types for all pet-related API responses"
    "Help me implement request payload validation for the pet endpoints"
  8. API Search and Discovery

    "Find all endpoints related to pet management"
    "Show me all APIs that accept file uploads"
    "List all endpoints that return paginated responses"

These prompts demonstrate how to leverage the MCP server's capabilities for API development. Feel free to adapt them to your specific needs or combine them for more complex tasks.