home / mcp / openapi mcp server
Provides an MCP server to explore OpenAPI specs by querying endpoints, parameters, request bodies, and response schemas.
Configuration
View docs{
"mcpServers": {
"abumalick-openapi-mcp": {
"command": "npx",
"args": [
"-y",
"@abumalick/openapi-mcp"
]
}
}
}You can run an MCP server that lets you explore OpenAPI specifications with natural language. Load OpenAPI docs, ask about endpoints, parameters, request bodies, and response schemas, and get structured results as you chat with your agent.
Install the MCP server and run it alongside your preferred client. Connect your client to the local stdio server you configured, or to the HTTP endpoint if you choose a remote setup. You can then ask your language model to list loaded specs, inspect endpoints by tag, or fetch details for a specific operation. Use practical prompts like “What endpoints exist for pets?”, “Show me the details for GET /pet/{petId}”, or “Load the Petstore API spec” to begin querying your loaded specs.
Prerequisites: you need Node.js and npm installed on your system.
npm install -g @abumalick/openapi-mcpYou can preload OpenAPI specs at startup or load them on demand through your MCP client. The server supports two common local configurations and a workflow for adding specs at startup.
{
"mcp": {
"openapi": {
"type": "local",
"command": ["npx", "-y", "@abumalick/openapi-mcp"],
"enabled": true
}
}
}If you are using OpenCode, you can pre-load specs at startup by adding an mcp section that uses a local command to run the MCP server.
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"openapi": {
"type": "local",
"command": ["npx", "-y", "@abumalick/openapi-mcp"],
"enabled": true
}
}
}You can preload multiple specs by extending the command with --spec entries.
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"openapi": {
"type": "local",
"command": [
"npx", "-y", "@abumalick/openapi-mcp",
"--spec", "petstore=https://petstore3.swagger.io/api/v3/openapi.yaml",
"--spec", "myapi=https://api.example.com/openapi.json"
],
"enabled": true
}
}
}For Claude Desktop, add an mcpServers entry that runs the MCP server via a local command.
{
"mcpServers": {
"openapi": {
"command": "npx",
"args": ["-y", "@abumalick/openapi-mcp"]
}
}
}Pre-load a spec by passing --spec in the arguments.
{
"mcpServers": {
"openapi": {
"command": "npx",
"args": [
"-y", "@abumalick/openapi-mcp",
"--spec", "petstore=https://petstore3.swagger.io/api/v3/openapi.yaml"
]
}
}
}With pre-loaded specs, you can immediately query them from your chat agent. For example, ask what specs are available, list endpoints for a tag, or fetch detailed information about a specific operation.
OpenAPI versions supported include 3.0.x and 3.1.x. If you have Swagger 2.0 specs, convert them to OpenAPI 3.x format before loading.
Lists all currently loaded OpenAPI specs so you can see what is available.
Loads an OpenAPI spec from a URL or file path and assigns it an alias.
Lists endpoints with optional filtering by alias, tag, or search term.
Gets detailed information about a specific endpoint given alias, method, and path.