@kubb/mcp 5.0.0-alpha.9 → 5.0.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,26 +1,38 @@
1
- # @kubb/mcp
2
-
3
- Model Context Protocol (MCP) server for Kubb.
4
-
5
- ## Overview
6
-
7
- This package provides an MCP server that exposes Kubb's code generation functionality through the [Model Context Protocol](https://modelcontextprotocol.io), allowing AI assistants like [Claude](https://claude.ai), [Cursor](https://cursor.sh), and other MCP-compatible clients to generate code from OpenAPI specifications using natural language.
8
-
9
- The server acts as a bridge between MCP clients (like [Claude Desktop](https://claude.ai/download)) and Kubb's build system, enabling conversational code generation workflows.
10
-
11
- ## Features
12
-
13
- - **Generate Tool**: Generate TypeScript types, API clients, and more from OpenAPI specs using your `kubb.config.ts`
14
- - **Real-time Progress Notifications**: Stream build events and progress updates to the MCP client
15
- - Uses `@kubb/core` build functionality directly
16
- - Lightweight and focused on code generation
1
+ <div align="center">
2
+ <h1>@kubb/mcp</h1>
3
+ <a href="https://kubb.dev" target="_blank" rel="noopener noreferrer">
4
+ <img width="180" src="https://raw.githubusercontent.com/kubb-labs/kubb/main/assets/logo.png" alt="Kubb logo">
5
+ </a>
6
+
7
+ [![npm version][npm-version-src]][npm-version-href]
8
+ [![npm downloads][npm-downloads-src]][npm-downloads-href]
9
+ [![Coverage][coverage-src]][coverage-href]
10
+ [![License][license-src]][license-href]
11
+ [![Sponsors][sponsors-src]][sponsors-href]
12
+
13
+ <h4>
14
+ <a href="https://kubb.dev/" target="_blank">Documentation</a>
15
+ <span> · </span>
16
+ <a href="https://github.com/kubb-labs/kubb/issues/" target="_blank">Report Bug</a>
17
+ <span> · </span>
18
+ <a href="https://github.com/kubb-labs/kubb/issues/" target="_blank">Request Feature</a>
19
+ </h4>
20
+ </div>
21
+
22
+ MCP server for Kubb. Exposes code generation as a tool over the [Model Context Protocol](https://modelcontextprotocol.io) so AI assistants like [Claude](https://claude.ai), [Cursor](https://cursor.sh), and other MCP-compatible clients can generate TypeScript types, API clients, and more from OpenAPI specs using natural language.
23
+
24
+ The server exposes a `generate` tool that runs a full Kubb build from a `kubb.config.ts`. It streams build events back to the client as real-time progress notifications. The server communicates over stdio and works with any MCP-compatible client.
17
25
 
18
26
  ## Installation
19
27
 
20
28
  Install as a dev dependency:
21
29
 
22
- ```bash [npm]
23
- npm install --save-dev @kubb/mcp
30
+ ```bash
31
+ bun add -D @kubb/mcp
32
+ # or
33
+ pnpm add -D @kubb/mcp
34
+ # or
35
+ npm install -D @kubb/mcp
24
36
  ```
25
37
 
26
38
  > [!IMPORTANT]
@@ -48,7 +60,8 @@ This starts an MCP server that communicates via stdio (standard input/output), m
48
60
 
49
61
  Add to your MCP client configuration (e.g., [Claude Desktop](https://claude.ai/download)'s `claude_desktop_config.json`):
50
62
 
51
- **Option 1: Using Kubb CLI (recommended):**
63
+ Using `kubb mcp`:
64
+
52
65
  ```json
53
66
  {
54
67
  "mcpServers": {
@@ -60,7 +73,8 @@ Add to your MCP client configuration (e.g., [Claude Desktop](https://claude.ai/d
60
73
  }
61
74
  ```
62
75
 
63
- **Option 2: Using standalone bin:**
76
+ Using the standalone package:
77
+
64
78
  ```json
65
79
  {
66
80
  "mcpServers": {
@@ -93,6 +107,7 @@ For project-specific configurations, you can specify the working directory:
93
107
  Generate code from OpenAPI/Swagger specifications using Kubb configuration.
94
108
 
95
109
  **Parameters:**
110
+
96
111
  - `config` (string, optional): Path to kubb.config.ts file. If not provided, looks for kubb.config.ts in current directory
97
112
  - `input` (string, optional): Path to OpenAPI/Swagger spec file (overrides config file setting)
98
113
  - `output` (string, optional): Output directory path (overrides config file setting)
@@ -101,6 +116,7 @@ Generate code from OpenAPI/Swagger specifications using Kubb configuration.
101
116
  **Examples:**
102
117
 
103
118
  Using default config file:
119
+
104
120
  ```json
105
121
  {
106
122
  "config": "./kubb.config.ts"
@@ -108,6 +124,7 @@ Using default config file:
108
124
  ```
109
125
 
110
126
  Overriding input and output:
127
+
111
128
  ```json
112
129
  {
113
130
  "config": "./kubb.config.ts",
@@ -117,6 +134,7 @@ Overriding input and output:
117
134
  ```
118
135
 
119
136
  With verbose logging:
137
+
120
138
  ```json
121
139
  {
122
140
  "config": "./kubb.config.ts",
@@ -131,7 +149,7 @@ The build tool looks for `kubb.config.ts` in the current directory by default. Y
131
149
  Example `kubb.config.ts`:
132
150
 
133
151
  ```typescript
134
- import { defineConfig } from '@kubb/core'
152
+ import { defineConfig } from 'kubb'
135
153
  import { pluginOas } from '@kubb/plugin-oas'
136
154
  import { pluginTs } from '@kubb/plugin-ts'
137
155
  import { pluginClient } from '@kubb/plugin-client'
@@ -143,11 +161,31 @@ export default defineConfig({
143
161
  output: {
144
162
  path: './src/generated',
145
163
  },
146
- plugins: [
147
- pluginOas(),
148
- pluginTs(),
149
- pluginClient(),
150
- ],
164
+ plugins: [pluginOas(), pluginTs(), pluginClient()],
151
165
  })
152
166
  ```
153
167
 
168
+ ## Supporting Kubb
169
+
170
+ Kubb is an open source project with its ongoing development made possible entirely by the support of Sponsors. If you would like to become a sponsor, please consider:
171
+
172
+ - [Become a Sponsor on GitHub](https://github.com/sponsors/stijnvanhulle)
173
+
174
+ <p align="center">
175
+ <a href="https://github.com/sponsors/stijnvanhulle">
176
+ <img src="https://raw.githubusercontent.com/stijnvanhulle/sponsors/main/sponsors.svg" alt="My sponsors" />
177
+ </a>
178
+ </p>
179
+
180
+ <!-- Badges -->
181
+
182
+ [npm-version-src]: https://img.shields.io/npm/v/@kubb/mcp?flat&colorA=18181B&colorB=f58517
183
+ [npm-version-href]: https://npmjs.com/package/@kubb/mcp
184
+ [npm-downloads-src]: https://img.shields.io/npm/dm/@kubb/mcp?flat&colorA=18181B&colorB=f58517
185
+ [npm-downloads-href]: https://npmjs.com/package/@kubb/mcp
186
+ [license-src]: https://img.shields.io/github/license/kubb-labs/kubb.svg?flat&colorA=18181B&colorB=f58517
187
+ [license-href]: https://github.com/kubb-labs/kubb/blob/main/LICENSE
188
+ [coverage-src]: https://img.shields.io/codecov/c/github/kubb-labs/kubb?style=flat&colorA=18181B&colorB=f58517
189
+ [coverage-href]: https://www.npmjs.com/package/@kubb/mcp
190
+ [sponsors-src]: https://img.shields.io/github/sponsors/stijnvanhulle?style=flat&colorA=18181B&colorB=f58517
191
+ [sponsors-href]: https://github.com/sponsors/stijnvanhulle/