Use with Cursor

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

Config lives at ~/.cursor/mcp.json. The shape is the same mcpServers map.

  1. Unzip the project and run npm install inside it.
  2. Create ~/.cursor/mcp.json with the JSON below.
  3. Replace the path with your project's absolute path and add your key.
  4. Open Cursor's agent panel — your endpoints are now callable tools.

For your own API, the generated zip also contains clients/cursor-mcp.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"
      }
    }
  }
}