Use with Claude Desktop

Two minutes from zip file to working tools. The snippet below uses the Petstore sample.

Config lives at ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows).

  1. Unzip the generated project and note its absolute path.
  2. Run npm install, then cp .env.example .env and add your key.
  3. Merge the JSON below into your config file.
  4. Fully quit and restart Claude Desktop; the server appears under available tools.

For your own API, the generated zip also contains clients/claude-desktop.json — copy that block in instead, replacing __ABS_PATH__ with the absolute path of the unzipped project.

{
  "mcpServers": {
    "petstore": {
      "command": "npx",
      "args": [
        "tsx",
        "/absolute/path/to/openapi2mcp-petstore/server.ts"
      ],
      "env": {
        "API_BASE_URL": "https://petstore3.swagger.io/api/v3",
        "API_KEY": "your-api-key"
      }
    }
  }
}