Talk to any OpenAPI (v3.1) compliant API through Claude Desktop!
This tool creates a Model Context Protocol (MCP) server that acts as a proxy for any API that has an OpenAPI v3.1 specification. This allows you to use Claude Desktop to easily interact with both local and remote server APIs.
If you're having trouble with Claude crashing or specs not working put them through our spec cleaner app this tidies up some open api schemas to help them be LLM-readable.
This proxy automatically converts OpenAPI endpoints into Claude tools, allowing Claude to:
For example, if you have a Petstore API with this endpoint:
/pets/{petId}:
get:
operationId: getPetById
summary: Returns a pet by ID
parameters:
- name: petId
in: path
description: ID of pet to return
required: true
schema:
type: integer
Claude will see this as a tool it can use:
You can then ask Claude natural questions like:
Claude will understand the context and make the appropriate API calls.
The proxy supports file uploads for APIs that accept multipart/form-data. When an endpoint accepts file uploads (indicated by type: string, format: binary
in the OpenAPI spec), you can provide local file paths and the proxy will handle reading and uploading the files.
/users/{userId}/avatar:
post:
summary: Upload a user's profile picture
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
avatar:
type: string
format: binary
description: Profile picture (JPEG/PNG)
cropInfo:
type: object
properties:
x: { type: number }
y: { type: number }
width: { type: number }
height: { type: number }
You can ask Claude:
/documents:
post:
summary: Upload documents for processing
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
document:
type: string
format: binary
description: PDF or Word document
language:
type: string
enum: [en, es, fr]
description: Document language
processOCR:
type: boolean
description: Whether to extract text using OCR
Natural language commands:
/batch-upload:
post:
summary: Upload multiple files in one request
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
files:
type: array
items:
type: string
format: binary
tags:
type: array
items:
type: string
You can say:
Security
Performance
Limitations
Configure Claude Desktop:
Add this to your claude_desktop_config.json
:
{
"mcpServers": {
"petstore-api": {
"command": "npx",
"args": ["openapi-mcp-server", "/abs/path/to/petstore-openapi.json"]
}
}
}
Restart Claude Desktop and start interacting with your API!
This repository includes a complete example of a Petstore API server that you can use to test the OpenAPI MCP Server. The example server implements a basic CRUD API for managing pets, making it perfect for learning how to use this tool.
See examples/README.md for instructions on running the example server.
Local Development
API Integration
Documentation
Outstanding tasks are listed in TODO.md.
Basics:
# Install dependencies
pnpm install
# Run tests
pnpm test
# Build the project
pnpm build
# Link the project to your global node_modules so that npx works
npm link
# Now start claude desktop to use
# After making changes run build again before restarting claude desktop
pnpm build
# Now restart claude desktop to run with latest changes
MIT
Built with ❤️ for making APIs more accessible through natural language.
{
"mcpServers": {
"petstore-api": {
"env": {},
"args": [
"openapi-mcp-server",
"/abs/path/to/petstore-openapi.json"
],
"command": "npx"
}
}
}
Seamless access to top MCP servers powering the future of AI integration.