Explore APIs with OpenAPI Schema Information
An MCP server exposing 10 tools for exploring and querying an OpenAPI schema file's endpoints, parameters, and components.
Maintainer of this project? Claim this page to edit the listing.
1.0.0Add to Favorites
Why it matters
Empower Large Language Models (LLMs) to understand and interact with APIs by providing structured OpenAPI schema information. This asset enables LLMs to intelligently query and utilize API functionalities.
Outcomes
What it gets done
List available API endpoints and their methods.
Retrieve detailed information for specific API endpoints.
Inspect request and response schemas for API operations.
Search across the entire API specification for relevant components and examples.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-openapi-schema | bash Capabilities
Tools your agent gets
Lists all API paths and their HTTP methods with brief descriptions 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 parameters for a specific path
Lists all schema components including schemas, responses, and parameters
Gets the detailed definition for a specific component
Lists all available security schemes
Overview
OpenAPI Schema MCP Server
An MCP server exposing 10 tools for exploring a single loaded OpenAPI schema file - endpoints, request/response schemas, components, security schemes, and full-spec search - returned in YAML. Use to let an LLM explore and answer questions about a specific OpenAPI specification instead of reading the raw file; each server instance loads exactly one schema file.
What it does
This MCP server exposes an OpenAPI schema file (JSON or YAML) to an LLM through ten specialized tools, returning responses in YAML for better LLM comprehension. list-endpoints lists all API paths and their HTTP methods with summaries in a nested structure; get-endpoint gets full detail for one endpoint, including its 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 a path's parameters. list-components lists all schema components (schemas, responses, parameters, etc.), and get-component gets the detailed definition for a specific one. list-security-schemes lists the API's available security schemes. get-examples retrieves examples for a specific component or endpoint. search-schema searches across the entire specification's paths, operations, and schemas at once.
When to use - and when NOT to
Use this to let an LLM explore and answer questions about a specific OpenAPI specification - listing available endpoints, inspecting a request/response schema, finding a component definition, checking security schemes, or searching the spec for anything related to a keyword - rather than having the LLM read the raw spec file directly.
The server loads exactly one OpenAPI schema file, specified via command-line argument (defaulting to openapi.yaml in the current directory if none is given) - querying multiple APIs at once means configuring multiple separate MCP server instances, each pointed at its own schema file and given a distinct name.
Inputs and outputs
Input is natural-language questions about the loaded API ("What endpoints are available?", "Show me the details for the POST /pets endpoint", "What is the request body schema for creating a new pet?", "Search for anything related to 'user' in this API") mapped to the tool that answers them. Output is the relevant slice of the OpenAPI spec - endpoint lists, parameter/schema definitions, security schemes, or examples - returned in YAML.
How to install
Run directly with npx -y mcp-openapi-schema [path-to-schema], using a relative or absolute path to the schema file (or --help for usage). For Claude Desktop, add an entry to claude_desktop_config.json (~/Library/Application Support/Claude/claude_desktop_config.json on macOS/Linux, $env:AppData\Claude\claude_desktop_config.json on Windows) pointing npx -y mcp-openapi-schema at the absolute schema path. For Claude Code, register it with claude mcp add openapi-schema npx -y mcp-openapi-schema (or a named variant per API, e.g. claude mcp add petstore-api npx -y mcp-openapi-schema ~/Projects/petstore.yaml), verify with claude mcp list/claude mcp get openapi-schema, and remove with claude mcp remove openapi-schema; the -s/--scope flag controls whether the config is stored per-project (default) or globally, useful when registering multiple API schemas under different names.
Who it's for
Developers who want an LLM to explore and answer questions about a specific OpenAPI specification - endpoints, schemas, security, examples - without having to read the raw spec file itself.
npx -y mcp-openapi-schema
Source 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:
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.yamlVerify the MCP server is registered
# List all configured servers claude mcp list # Get details for your OpenAPI schema server claude mcp get openapi-schemaRemove the server if needed
claude mcp remove openapi-schemaUse 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
-sor--scopeflag withproject(default) orglobalto 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 structureget-endpoint: Gets detailed information about a specific endpoint including parameters and responsesget-request-body: Gets the request body schema for a specific endpoint and methodget-response-schema: Gets the response schema for a specific endpoint, method, and status codeget-path-parameters: Gets the parameters for a specific pathlist-components: Lists all schema components (schemas, responses, parameters, etc.)get-component: Gets detailed definition for a specific componentlist-security-schemes: Lists all available security schemesget-examples: Gets examples for a specific component or endpointsearch-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.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.