npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kubb/mcp

v4.22.3

Published

Model Context Protocol (MCP) server for Kubb, enabling AI assistants to generate code from OpenAPI specifications.

Downloads

7,314

Readme

@kubb/mcp

Model Context Protocol (MCP) server for Kubb.

Overview

This package provides an MCP server that exposes Kubb's code generation functionality through the Model Context Protocol, allowing AI assistants like Claude, Cursor, and other MCP-compatible clients to generate code from OpenAPI specifications using natural language.

The server acts as a bridge between MCP clients (like Claude Desktop) and Kubb's build system, enabling conversational code generation workflows.

Features

  • Generate Tool: Generate TypeScript types, API clients, and more from OpenAPI specs using your kubb.config.ts
  • Real-time Progress Notifications: Stream build events and progress updates to the MCP client
  • Uses @kubb/core build functionality directly
  • Lightweight and focused on code generation

Installation

Install as a dev dependency:

npm install --save-dev @kubb/mcp

[!IMPORTANT] You also need to install @kubb/cli to use the kubb mcp command.

Usage

Start the MCP Server

Start the server using the Kubb CLI:

npx kubb mcp

Or run it directly as a standalone package:

npx @kubb/mcp

This starts an MCP server that communicates via stdio (standard input/output), making it compatible with MCP clients.

Configure MCP Client

Add to your MCP client configuration (e.g., Claude Desktop's claude_desktop_config.json):

Option 1: Using Kubb CLI (recommended):

{
  "mcpServers": {
    "kubb": {
      "command": "npx",
      "args": ["kubb", "mcp"]
    }
  }
}

Option 2: Using standalone bin:

{
  "mcpServers": {
    "kubb": {
      "command": "npx",
      "args": ["@kubb/mcp"]
    }
  }
}

For project-specific configurations, you can specify the working directory:

{
  "mcpServers": {
    "kubb-petstore": {
      "command": "npx",
      "args": ["@kubb/mcp"],
      "cwd": "/path/to/your/project"
    }
  }
}

Available Tools

generate

Generate code from OpenAPI/Swagger specifications using Kubb configuration.

Parameters:

  • config (string, optional): Path to kubb.config.ts file. If not provided, looks for kubb.config.ts in current directory
  • input (string, optional): Path to OpenAPI/Swagger spec file (overrides config file setting)
  • output (string, optional): Output directory path (overrides config file setting)
  • logLevel (enum, optional): Control logging verbosity - 'silent', 'error', 'warn', 'info', 'verbose', 'debug' (default: 'info')

Examples:

Using default config file:

{
  "config": "./kubb.config.ts"
}

Overriding input and output:

{
  "config": "./kubb.config.ts",
  "input": "./specs/petstore.yaml",
  "output": "./src/generated"
}

With verbose logging:

{
  "config": "./kubb.config.ts",
  "logLevel": "verbose"
}

Configuration

The build tool looks for kubb.config.ts in the current directory by default. You can also provide an inline configuration or path to a config file.

Example kubb.config.ts:

import { defineConfig } from '@kubb/core'
import { pluginOas } from '@kubb/plugin-oas'
import { pluginTs } from '@kubb/plugin-ts'
import { pluginClient } from '@kubb/plugin-client'

export default defineConfig({
  input: {
    path: './petstore.yaml',
  },
  output: {
    path: './src/generated',
  },
  plugins: [
    pluginOas(),
    pluginTs(),
    pluginClient(),
  ],
})

License

MIT