Quickstart Guide
From zero to a working OpenAPI MCP tool in your assistant in under 5 minutes.
This guide gets you from an OpenAPI specification to a working tool in your AI assistant in under 5 minutes.
Prerequisites
- Node.js ≥ 18.17 (
node --version) - An MCP-compatible client: Claude Desktop, Cursor, Claude Code, OpenCode, Kiro, VS Code, or Windsurf
- An OpenAPI 3.0 or 3.1 document (local JSON/YAML file or HTTPS URL)
Step 1 — Test your spec with --list-tools
Before configuring your client, verify that your OpenAPI specification parses cleanly:
npx -y apibear \
--spec https://petstore3.swagger.io/api/v3/openapi.json \
--list-tools
npx downloads the apibear package on first run; there is nothing to clone or build.
You should see each converted tool printed to stdout:
listPets List all pets
createPet Create a pet
showPetById Info for a specific pet
If any operations lacked an explicit operationId, API Bear automatically synthesized clean identifiers (e.g., get_pets_petId).
Step 2 — Add API Bear to your client
Claude Desktop
Open your Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Add an entry under mcpServers:
{
"mcpServers": {
"petstore": {
"command": "npx",
"args": [
"-y",
"apibear",
"--spec", "https://petstore3.swagger.io/api/v3/openapi.json",
"--header", "Authorization: Bearer YOUR_TOKEN"
]
}
}
}
Windows Quoting Note: On Windows, always use forward slashes or double backslashes in local spec paths (
C:/specs/openapi.jsonorC:\\specs\\openapi.json), and place the argument list in separate array elements as shown above.
Step 3 — Restart your client and verify
- Completely quit and restart your MCP client (for Claude Desktop, choose Quit from the menu, then relaunch).
- Start a fresh chat.
- Look for the hammer icon — you should see your tools listed.
- Ask your assistant:
What tools do you have available?
The model will list listPets, createPet, and showPetById, complete with their input parameter descriptions.
Step 4 — Run your first tool call
Prompt the model:
Get pet details for pet ID 42.
Your assistant will format the parameters according to the OpenAPI schema, execute showPetById({ petId: "42" }), and present the resulting response.
Next Steps
- Client Setup: Setup instructions for Cursor, Claude Code, OpenCode, Kiro, VS Code, and Windsurf.
- Configuration & Auth: Learn how to inject tokens, override base URLs, and filter tools with
--only. - CLI Reference: Complete documentation of all command-line arguments.