Kubb MCP Server

Validate OpenAPI specs and generate TypeScript types and API clients with Kubb from chat

Official · Kubb TypeScript Local · stdio Developer tools

94 popularity score ★ 1.8k ↓ 96k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add kubb -- npx -y @kubb/mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "kubb": {
      "command": "npx",
      "args": [
        "-y",
        "@kubb/mcp"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "kubb": {
      "command": "npx",
      "args": [
        "-y",
        "@kubb/mcp"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "kubb": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@kubb/mcp"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.kubb]
command = "npx"
args = ["-y", "@kubb/mcp"]
Gemini CLITerminal
gemini mcp add --scope user kubb npx -- -y @kubb/mcp

What it does

@kubb/mcp is the MCP server for Kubb, the open source code generator that turns an API spec such as OpenAPI into TypeScript types, API clients, hooks, validators and mocks. It exposes Kubb's code generation as tools, so an assistant such as Claude or Cursor can validate a spec and generate code from the chat.

It has three tools: generate runs a full Kubb build from a kubb.config.ts and returns its build events, or its diagnostics when the build fails; validate checks an OpenAPI/Swagger spec from a path or URL; init writes a kubb.config.ts in the working directory without prompts.

The server runs locally over stdio, started with npx @kubb/mcp or npx kubb mcp (the kubb package includes the CLI command). It looks for kubb.config.* in the directory the client starts it in and rejects a config path outside that directory, so it should be registered from the project root. It needs no account or API key.

What it needs

RuntimeNode.js

Tools 3

generate
Runs a Kubb build from a kubb.config file; returns build events on success or diagnostics on failure. Optional config, input, output and logLevel overrides.
validate
Validates an OpenAPI/Swagger specification from a path or URL.
init
Writes a kubb.config.ts in the working directory without prompts; does not install packages and fails if the file already exists.

Similar servers