OpenAPI to MCP Generator
Convert an OpenAPI 3.x JSON spec into MCP tool definitions, one per endpoint, and export config JSON or a TypeScript or Python server.
OpenAPI to MCP Generator
Endpoints (5/5)
{
"name": "Pet Store",
"version": "1.0.0",
"description": "A sample pet store API",
"tools": [
{
"name": "listpets",
"description": "List all pets — Returns a list of all pets in the store",
"inputSchema": {
"type": "object",
"properties": {
"limit": {
"type": "integer",
"default": 20,
"description": "Maximum number of pets to return"
},
"status": {
"type": "string",
"enum": [
"available",
"pending",
"sold"
],
"description": "Filter by status"
}
}
}
},
{
"name": "createpet",
"description": "Create a pet — Add a new pet to the store",
"inputSchema": {
"type": "object",
"properties": {
"body": {
"type": "object",
"description": "Request body",
"properties": {
"name": {
"type": "string",
"description": "The pet's name"
},
"species": {
"type": "string",
"enum": [
"dog",
"cat",
"bird",
"fish"
]
},
"age": {
"type": "integer",
"description": "Age in years",
"minimum": 0
},
"tags": {
"type": "array",
"description": "Optional tags",
"items": {
"type": "string"
}
}
},
"required": [
"name",
"species"
]
}
},
"required": [
"body"
]
}
},
{
"name": "getpet",
"description": "Get a pet by ID",
"inputSchema": {
"type": "object",
"properties": {
"petId": {
"type": "string",
"description": "The pet ID"
}
},
"required": [
"petId"
]
}
},
{
"name": "updatepet",
"description": "Update a pet",
"inputSchema": {
"type": "object",
"properties": {
"petId": {
"type": "string",
"description": "The pet ID"
},
"body": {
"type": "object",
"description": "Request body",
"properties": {
"name": {
"type": "string"
},
"species": {
"type": "string",
"enum": [
"dog",
"cat",
"bird",
"fish"
]
},
"age": {
"type": "integer",
"minimum": 0
},
"status": {
"type": "string",
"enum": [
"available",
"pending",
"sold"
]
}
}
}
},
"required": [
"petId",
"body"
]
}
},
{
"name": "deletepet",
"description": "Delete a pet",
"inputSchema": {
"type": "object",
"properties": {
"petId": {
"type": "string",
"description": "The pet ID"
}
},
"required": [
"petId"
]
}
}
]
}Related tools:AI CLI Generator|MCP Server Starter|OpenAPI Preview
Updated . Provided as is. Check the output before you rely on it in production.
How to use OpenAPI to MCP Generator
- 1
Paste your OpenAPI spec
Enter your OpenAPI 3.x specification in JSON format. You can also click Load Sample to see a working example.
- 2
Select endpoints
Use the endpoint checklist to choose which API endpoints to convert into MCP tools. By default, all endpoints are selected.
- 3
Choose output format
Select your preferred output: MCP Config JSON for direct use, TypeScript Server for a full server scaffold, or Python Server for a Python-based implementation.
- 4
Copy or download
Review the generated MCP tool definitions in the output panel. Click Copy to clipboard or Download to save the file directly.
Questions and answers
What is OpenAPI to MCP Generator?
What output formats are available?
Does it send my API spec to a server?
Does it handle $ref references in OpenAPI specs?
For AI agents: how to call this tool
Machine-readable contract, endpoints and examples. Humans can ignore this section.
Best Path For Builders
Browser workflow
Runs instantly in the browser with private local processing and copy/export-ready output.
Browser Workflow
This tool is optimized for instant in-browser execution with local data handling. Run it here and copy/export the output directly.
/openapi-to-mcp/
For automation planning, fetch the canonical contract at /api/tool/openapi-to-mcp.json.