Lists all API paths and their HTTP methods with summaries in a nested object structure
Gets detailed information about a specific endpoint including parameters and responses
Gets the request body schema for a specific endpoint and method
Gets the response schema for a specific endpoint, method, and status code
Gets the parameters for a specific path
Lists all schema components (schemas, responses, parameters, etc.)
Gets detailed definition for a specific component
Lists all available security schemes
Gets examples for a specific component or endpoint
Searches across paths, operations, and schemas
The OpenAPI Schema Explorer provides a powerful interface for Large Language Models to interact with and understand API specifications. It allows models to explore paths, operations, parameters, schemas, and other components of any OpenAPI specification file in JSON or YAML format. This tool bridges the gap between complex API documentation and LLM understanding, enabling more accurate code generation, API usage guidance, and technical documentation assistance. With features like detailed schema exploration, component lookup, and search capabilities, it makes working with APIs significantly more efficient.
The OpenAPI Schema Explorer is a Model Context Protocol (MCP) server that enables Large Language Models to interact with and understand OpenAPI specifications. This tool is particularly useful for developers working with APIs, as it allows the LLM to provide more accurate guidance, code examples, and explanations based on the actual API structure.
You can install and run the OpenAPI Schema Explorer using NPX, which allows you to execute the package without installing it globally.
The simplest way to use the OpenAPI Schema Explorer is through NPX:
# 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
To integrate the OpenAPI Schema Explorer with Claude Desktop:
Locate your Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
$env:AppData\Claude\claude_desktop_config.json
Edit the configuration file to include the OpenAPI Schema Explorer:
{
"mcpServers": {
"OpenAPI Schema": {
"command": "npx",
"args": ["-y", "mcp-openapi-schema", "/ABSOLUTE/PATH/TO/openapi.yaml"]
}
}
}
Replace /ABSOLUTE/PATH/TO/openapi.yaml
with the actual path to your OpenAPI specification file.
To use the OpenAPI Schema Explorer with Claude Code CLI:
# 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
# List all configured servers
claude mcp list
# Get details for your OpenAPI schema server
claude mcp get openapi-schema
claude mcp remove openapi-schema
When using the OpenAPI Schema Explorer with an LLM:
list-endpoints
toolget-endpoint
to understand their parameters and responsesget-request-body
and get-response-schema
to understand data structureslist-components
and get-component
search-schema
Example queries to try:
The OpenAPI Schema Explorer makes it much easier for LLMs to understand and work with API specifications, leading to more accurate and helpful responses when discussing API usage and implementation.