OpenAPI Schema

OpenAPI Schema

A MCP server that exposes OpenAPI schema information to LLMs like Claude. This server allows an LLM to explore and understand large OpenAPI schemas through a set of specialized tools, without needing to load the whole schema into the context

hannesj

Content Fetching
Visit Server

README

OpenAPI Schema Model Context Protocol Server

A Model Context Protocol (MCP) server that exposes OpenAPI schema information to Large Language Models (LLMs) like Claude. This server allows an LLM to explore and understand OpenAPI specifications through a set of specialized tools.

Features

  • Load any OpenAPI schema file (JSON or YAML) specified via command line argument
  • Explore API paths, operations, parameters, and schemas
  • View detailed request and response schemas
  • Look up component definitions and examples
  • Search across the entire API specification
  • Get responses in YAML format for better LLM comprehension

Usage

Command Line

Run the MCP server with a specific schema file:

# Use the default openapi.yaml in current directory
npx -y mcp-openapi-schema

# Use a specific schema file (relative path)
npx -y mcp-openapi-schema ../petstore.json

# Use a specific schema file (absolute path)
npx -y mcp-openapi-schema /absolute/path/to/api-spec.yaml

# Show help
npx -y mcp-openapi-schema --help

Claude Desktop Integration

To use this MCP server with Claude Desktop, edit your claude_desktop_config.json configuration file:

{
  "mcpServers": {
    "OpenAPI Schema": {
      "command": "npx",
      "args": ["-y", "mcp-openapi-schema", "/ABSOLUTE/PATH/TO/openapi.yaml"]
    }
  }
}

Location of the configuration file:

  • macOS/Linux: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: $env:AppData\Claude\claude_desktop_config.json

Claude Code Integration

To use this MCP server with Claude Code CLI, follow these steps:

  1. Add the OpenAPI Schema MCP server to Claude Code

    # Basic syntax
    claude mcp add openapi-schema npx -y mcp-openapi-schema
    
    # Example with specific schema
    claude mcp add petstore-api npx -y mcp-openapi-schema ~/Projects/petstore.yaml
    
  2. Verify the MCP server is registered

    # List all configured servers
    claude mcp list
    
    # Get details for your OpenAPI schema server
    claude mcp get openapi-schema
    
  3. Remove the server if needed

    claude mcp remove openapi-schema
    
  4. Use the tool in Claude Code

    Once configured, you can invoke the tool in your Claude Code session by asking questions about the OpenAPI schema.

Tips:

  • Use the -s or --scope flag with project (default) or global to specify where the configuration is stored
  • Add multiple MCP servers for different APIs with different names

MCP Tools

The server provides the following tools for LLMs to interact with OpenAPI schemas:

  • list-endpoints: Lists all API paths and their HTTP methods with summaries in a nested object structure
  • get-endpoint: Gets detailed information about a specific endpoint including parameters and responses
  • get-request-body: Gets the request body schema for a specific endpoint and method
  • get-response-schema: Gets the response schema for a specific endpoint, method, and status code
  • get-path-parameters: Gets the parameters for a specific path
  • list-components: Lists all schema components (schemas, responses, parameters, etc.)
  • get-component: Gets detailed definition for a specific component
  • list-security-schemes: Lists all available security schemes
  • get-examples: Gets examples for a specific component or endpoint
  • search-schema: Searches across paths, operations, and schemas

Examples

Example queries to try:

What endpoints are available in this API?
Show me the details for the POST /pets endpoint.
What parameters does the GET /pets/{petId} endpoint take?
What is the request body schema for creating a new pet?
What response will I get from the DELETE /pets/{petId} endpoint?
What schemas are defined in this API?
Show me the definition of the Pet schema.
What are the available security schemes for this API?
Are there any example responses for getting a pet by ID?
Search for anything related to "user" in this API.

Recommended Servers

Mult Fetch MCP Server

Mult Fetch MCP Server

A versatile MCP-compliant web content fetching tool that supports multiple modes (browser/node), formats (HTML/JSON/Markdown/Text), and intelligent proxy detection, with bilingual interface (English/Chinese).

Featured
Local
Persistent Knowledge Graph

Persistent Knowledge Graph

An implementation of persistent memory for Claude using a local knowledge graph, allowing the AI to remember information about users across conversations with customizable storage location.

Featured
Local
Hyperbrowser MCP Server

Hyperbrowser MCP Server

Welcome to Hyperbrowser, the Internet for AI. Hyperbrowser is the next-generation platform empowering AI agents and enabling effortless, scalable browser automation. Built specifically for AI developers, it eliminates the headaches of local infrastructure and performance bottlenecks, allowing you to

Featured
Local
Exa MCP

Exa MCP

A Model Context Protocol server that enables AI assistants like Claude to perform real-time web searches using the Exa AI Search API in a safe and controlled manner.

Featured
Perplexity Chat MCP Server

Perplexity Chat MCP Server

MCP Server for the Perplexity API.

Featured
Web Research Server

Web Research Server

A Model Context Protocol server that enables Claude to perform web research by integrating Google search, extracting webpage content, and capturing screenshots.

Featured
Youtube Translate

Youtube Translate

A Model Context Protocol server that enables access to YouTube video content through transcripts, translations, summaries, and subtitle generation in various languages.

Featured
PubMedSearch

PubMedSearch

A Model Content Protocol server that provides tools to search and retrieve academic papers from PubMed database.

Featured
Aindreyway Codex Keeper

Aindreyway Codex Keeper

Serves as a guardian of development knowledge, providing AI assistants with curated access to latest documentation and best practices.

Featured
Perplexity Deep Research

Perplexity Deep Research

A server that allows AI assistants to perform web searches using Perplexity's sonar-deep-research model with citation support.

Featured