by hannesj
A Model Context Protocol (MCP) server that exposes OpenAPI schema information to Large Language Models (LLMs) like Claude, allowing LLMs to explore and understand OpenAPI specifications through a set of specialized tools.
mcp-openapi-schema is a Model Context Protocol (MCP) server designed to facilitate the interaction between Large Language Models (LLMs) like Claude and OpenAPI specifications. It allows LLMs to explore and understand complex OpenAPI schemas without overwhelming their context window, providing a structured way to access API documentation.
mcp-openapi-schema can be used via the command line, integrated with Claude Desktop, or configured with Claude Code CLI.
Run the server with a specified OpenAPI schema file:
npx -y mcp-openapi-schema # Uses default openapi.yaml
npx -y mcp-openapi-schema ../petstore.json # Uses a relative path
npx -y mcp-openapi-schema /absolute/path/to/api-spec.yaml # Uses an absolute path
Add the following to your claude_desktop_config.json file:
{
"mcpServers": {
"OpenAPI Schema": {
"command": "npx",
"args": ["-y", "mcp-openapi-schema", "/ABSOLUTE/PATH/TO/openapi.yaml"]
}
}
}
claude mcp add openapi-schema npx -y mcp-openapi-schema
claude mcp add petstore-api npx -y mcp-openapi-schema ~/Projects/petstore.yaml
claude mcp list
claude mcp get openapi-schema
claude mcp remove openapi-schema
list-endpoints: Lists all API paths and HTTP methods.get-endpoint: Gets detailed information about a specific endpoint.get-request-body: Gets the request body schema.get-response-schema: Gets the response schema.get-path-parameters: Gets parameters for a specific path.list-components: Lists all schema components.get-component: Gets detailed definition for a specific component.list-security-schemes: Lists available security schemes.get-examples: Gets examples for components or endpoints.search-schema: Searches across paths, operations, and schemas.Q: What is the Model Context Protocol (MCP)? A: The Model Context Protocol is a mechanism that allows LLMs to interact with external tools and data sources, extending their capabilities beyond their initial training data.
Q: What types of OpenAPI schema files are supported? A: Both JSON and YAML OpenAPI schema files are supported.
Q: Can I use this with other LLMs besides Claude? A: While the examples focus on Claude, the underlying MCP concept is designed to be general. If another LLM supports the MCP, it should theoretically be compatible.
Q: How do I specify which OpenAPI schema file to use? A: You can specify the schema file via a command-line argument when running the server, or within the configuration files for Claude Desktop or Claude Code.
Q: What kind of questions can I ask the LLM about the API schema? A: You can ask questions like "What endpoints are available?", "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?", or "Search for anything related to "user" in this API."
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.
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
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:
~/Library/Application Support/Claude/claude_desktop_config.json$env:AppData\Claude\claude_desktop_config.jsonTo 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.yaml
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
Remove the server if needed
claude mcp remove openapi-schema
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:
-s or --scope flag with project (default) or global to specify where the configuration is storedThe 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 schemasExample 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.
Please log in to share your review and rating for this MCP.
Discover more MCP servers with similar functionality and use cases
by danny-avila
Provides a customizable ChatGPT‑like web UI that integrates dozens of AI models, agents, code execution, image generation, web search, speech capabilities, and secure multi‑user authentication, all open‑source and ready for self‑hosting.
by ahujasid
BlenderMCP integrates Blender with Claude AI via the Model Context Protocol (MCP), enabling AI-driven 3D scene creation, modeling, and manipulation. This project allows users to control Blender directly through natural language prompts, streamlining the 3D design workflow.
by pydantic
Enables building production‑grade generative AI applications using Pydantic validation, offering a FastAPI‑like developer experience.
by GLips
Figma-Context-MCP is a Model Context Protocol (MCP) server that provides Figma layout information to AI coding agents. It bridges design and development by enabling AI tools to directly access and interpret Figma design data for more accurate and efficient code generation.
by mcp-use
Easily create and interact with MCP servers using custom agents, supporting any LLM with tool calling and offering multi‑server, sandboxed, and streaming capabilities.
by sonnylazuardi
This project implements a Model Context Protocol (MCP) integration between Cursor AI and Figma, allowing Cursor to communicate with Figma for reading designs and modifying them programmatically.
by lharries
WhatsApp MCP Server is a Model Context Protocol (MCP) server for WhatsApp that allows users to search, read, and send WhatsApp messages (including media) through AI models like Claude. It connects directly to your personal WhatsApp account via the WhatsApp web multi-device API and stores messages locally in a SQLite database.
by idosal
GitMCP is a free, open-source remote Model Context Protocol (MCP) server that transforms any GitHub project into a documentation hub, enabling AI tools to access up-to-date documentation and code directly from the source to eliminate "code hallucinations."
by Klavis-AI
Klavis AI provides open-source Multi-platform Control Protocol (MCP) integrations and a hosted API for AI applications. It simplifies connecting AI to various third-party services by managing secure MCP servers and authentication.