@kubb/mcp 5.0.0-beta.2 → 5.0.0-beta.20
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 +57 -20
- package/dist/index.cjs +322 -154
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +11 -2
- package/dist/index.js +316 -155
- package/dist/index.js.map +1 -1
- package/package.json +15 -11
- package/src/index.ts +5 -2
- package/src/schemas/generateSchema.ts +11 -10
- package/src/schemas/initSchema.ts +7 -0
- package/src/schemas/validateSchema.ts +5 -0
- package/src/server.ts +42 -41
- package/src/tools/generate.ts +113 -177
- package/src/tools/init.ts +37 -0
- package/src/tools/validate.ts +25 -0
- package/src/utils/loadUserConfig.ts +32 -31
- package/src/utils/resolveUserConfig.ts +5 -20
package/README.md
CHANGED
|
@@ -1,26 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
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
|
|
23
|
-
|
|
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,7 @@ 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
|
-
|
|
63
|
+
Using `kubb mcp`:
|
|
52
64
|
|
|
53
65
|
```json
|
|
54
66
|
{
|
|
@@ -61,7 +73,7 @@ Add to your MCP client configuration (e.g., [Claude Desktop](https://claude.ai/d
|
|
|
61
73
|
}
|
|
62
74
|
```
|
|
63
75
|
|
|
64
|
-
|
|
76
|
+
Using the standalone package:
|
|
65
77
|
|
|
66
78
|
```json
|
|
67
79
|
{
|
|
@@ -152,3 +164,28 @@ export default defineConfig({
|
|
|
152
164
|
plugins: [pluginOas(), pluginTs(), pluginClient()],
|
|
153
165
|
})
|
|
154
166
|
```
|
|
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/
|