OpenAPI Schema logo

OpenAPI Schema

Free

让 LLM 在不增加上下文的情况下探索大型 OpenAPI 模式。

FreeFree tier
Type
Open Source

About OpenAPI Schema

An open-source Model Context Protocol (MCP) server designed for Large Language Models like Claude. It enables LLMs to explore and understand OpenAPI specifications without consuming excessive context. Supports loading any OpenAPI schema file (JSON or YAML), provides specialized tools to list endpoints, retrieve detailed endpoint info, request/response schemas, component definitions, examples, and security schemes. Outputs responses in YAML for better LLM comprehension. Easily integrates with Claude Desktop and Claude Code CLI via npx.

Key Features

Load any OpenAPI schema file (JSON or YAML) 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
Provides 9 specialized MCP tools: list-endpoints, get-endpoint, get-request-body, get-response-schema, get-path-parameters, list-components, get-component, list-security-schemes, get-examples
Integrates with Claude Desktop and Claude Code CLI

Pros & Cons

Pros
  • Reduces context consumption for LLMs by providing focused access to schema details
  • Supports both JSON and YAML OpenAPI schema files
  • Provides a comprehensive set of tools for exploring all parts of an API spec
  • Free and open source, easy to run via npx
  • Seamless integration with Claude Desktop and Claude Code
Cons
  • Limited to OpenAPI specifications, does not support other API description formats (e.g., GraphQL, gRPC)
  • Requires manual command-line setup and configuration
  • Dependent on Node.js and npx for execution
  • Documentation and community support are minimal (single-contributor project)

Best For

Enabling LLMs to understand and interact with OpenAPI documentation without context overheadBuilding AI-powered API assistants that can explore and reason about API structuresAutomating API integration tasks by providing structured schema access to language modelsDebugging and validating OpenAPI specifications with LLM assistance

FAQ

How do I run the OpenAPI Schema MCP server?
Use the command 'npx -y mcp-openapi-schema' optionally followed by the path to your OpenAPI schema file (supports both relative and absolute paths). Defaults to 'openapi.yaml' in the current directory if no file is specified.
What file formats are supported for OpenAPI schemas?
Both JSON and YAML formats are supported. The tool can load any OpenAPI schema file specified via command line argument.
How do I integrate this with Claude Desktop?
Edit your 'claude_desktop_config.json' file (located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS/Linux, or $env:AppData\Claude\claude_desktop_config.json on Windows) and add an entry under 'mcpServers' with 'command': 'npx', 'args': ['-y', 'mcp-openapi-schema', '/ABSOLUTE/PATH/TO/openapi.yaml'].
Can I use this with Claude Code CLI?
Yes. Use 'claude mcp add openapi-schema npx -y mcp-openapi-schema' (optionally with a schema path) to register the server. Then use 'claude mcp list' to verify and 'claude mcp get openapi-schema' for details.
What tools does the MCP server provide?
The server provides nine tools: list-endpoints, get-endpoint, get-request-body, get-response-schema, get-path-parameters, list-components, get-component, list-security-schemes, and get-examples.