Home / MCP / OpenAPI MCP Server
Provides OpenAPI schema exploration and query capabilities to LLMs for endpoints, parameters, and components.
Configuration
View docs{
"mcpServers": {
"openapi_mcp": {
"command": "npx",
"args": [
"-y",
"mcp-openapi-schema",
"/ABSOLUTE/PATH/TO/openapi.yaml"
]
}
}
}This MCP server lets you load an OpenAPI schema and expose its paths, operations, parameters, and schemas to Large Language Models in a structured, searchable way. It’s useful for LLMS to explore API definitions, understand request/response contracts, and reason about API behavior without manual digging through the spec.
You interact with the OpenAPI Schema MCP server through an MCP client. Start the server with a specific OpenAPI file, then ask the MCP client to list endpoints, inspect details for particular paths, or look up schemas and examples. You can also have the server return responses in YAML format to make it easier for the model to read.
Basic usage patterns include loading a schema file and querying endpoints, parameters, request bodies, response schemas, and components. Use dedicated tools to search across the API specification and to retrieve exact definitions for components and examples.
Prerequisites: you need Node.js and npm installed on your system to run MCP servers with npx.
Install and run the MCP server with a specific OpenAPI file by using the following command structure. The server accepts a path to your OpenAPI schema file (JSON or YAML). You can point it at a relative path or an absolute path.
Lists all API paths and their HTTP methods with summaries in a nested structure.
Provides detailed information about a specific endpoint, including parameters and responses.
Retrieves the request body schema for a given endpoint and method.
Returns the response schema for a specific endpoint, method, and status code.
Fetches the parameters defined for a particular path.
Lists all schema components such as schemas, responses, and parameters.
Shows a detailed definition for a selected component.
Lists all available security schemes in the API.
Gets examples for a specific component or endpoint.
Searches across paths, operations, and schemas for a query.