Skip to content
AI assistants

Connect an API server to Claude Desktop

Add a generated Kubb MCP server to Claude Desktop so its tools can call your API.

Start with Claude Desktop installed and an MCP server generated from your API specification. Follow Run an MCP server to configure generation and install the runtime dependencies. Generation writes the start.ts entry point and a .mcp.json entry for it.

Register the server

Open Claude Desktop's Settings → Developer → Edit Config. This opens claude_desktop_config.json, the same file the Kubb MCP server uses. Add the generated entry from src/gen/mcp/.mcp.json to the file's mcpServers object. Keep existing server entries. Change the path in its args to the absolute path of the generated start.ts:

claude_desktop_config.json
{
  "mcpServers": {
    "Swagger PetStore - OpenAPI 3.0": {
      "type": "stdio",
      "command": "npx",
      "args": ["tsx", "/absolute/path/to/project/src/gen/mcp/start.ts"]
    }
  }
}

Replace the example path with your project path. In Windows JSON paths, escape each backslash as \\.

Use the generated tools

Quit Claude Desktop completely and reopen it. Open Manage connectors, select your server, and check that the tools match the operations in your specification. Ask Claude to run one of those operations and review its request before approving the API call.