api2ai 1.0.28 → 1.0.30
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 +82 -76
- package/package.json +237 -25
- package/src/cli.js +0 -103
- package/src/generate-mcp-use-server.js +0 -18
- package/src/generate.js +0 -90
- package/src/index.js +0 -15
- package/src/spec/classify-risk.js +0 -53
- package/src/spec/extract-tools.js +0 -110
- package/src/spec/load-spec.js +0 -55
- package/src/spec/schema-to-zod.js +0 -213
- package/src/templates/env.js +0 -46
- package/src/templates/http-client.js +0 -126
- package/src/templates/package-json.js +0 -21
- package/src/templates/policy.js +0 -69
- package/src/templates/readme.js +0 -124
- package/src/templates/server-index.js +0 -128
- package/src/templates/tools-config.js +0 -25
- package/src/versions.js +0 -16
package/README.md
CHANGED
|
@@ -1,29 +1,56 @@
|
|
|
1
1
|
|
|
2
2
|
<p align="center">
|
|
3
|
-
<img src="https://i.imgur.com/
|
|
4
|
-
<a href="https://npmjs.org/package/grab-url"><img alt="NPM Version" src="https://img.shields.io/npm/v/grab-url" /></a><a href="https://github.com/vtempest/GRAB-URL/discussions"><img alt="GitHub Discussions"
|
|
5
|
-
src="https://img.shields.io/github/discussions/vtempest/GRAB-URL" /></a><a href="https://github.blog/developer-skills/github/beginners-guide-to-github-creating-a-pull-request/"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"/></a>
|
|
3
|
+
<img width="600px" src="https://i.imgur.com/TTJBLxo.png" />
|
|
6
4
|
</p>
|
|
7
5
|
|
|
6
|
+
<!-- template-git-repo:badges:start -->
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://1computer.online/docs/packages/api2ai-mcp-generator"><img src="https://img.shields.io/badge/Docs-blue?logo=ReadTheDocs&logoColor=white" alt="Documentation" /></a>
|
|
9
|
+
<br />
|
|
10
|
+
<a href="https://github.com/OpenSourceAGI/dev-tools-starter-agent/stargazers"><img src="https://img.shields.io/github/stars/OpenSourceAGI/dev-tools-starter-agent" alt="GitHub Stars" /></a>
|
|
11
|
+
<a href="https://www.npmjs.com/package/api2ai"><img src="https://img.shields.io/npm/dm/api2ai.svg" alt="NPM Monthly Downloads" /></a>
|
|
12
|
+
<a href="https://www.npmjs.com/package/api2ai"><img src="https://img.shields.io/npm/v/api2ai.svg" alt="npm version" /></a>
|
|
13
|
+
<a href="https://www.npmjs.com/package/api2ai"><img src="https://img.shields.io/npm/dt/api2ai.svg" alt="NPM Total Downloads" /></a>
|
|
14
|
+
<a href="https://www.npmjs.com/package/api2ai"><img src="https://img.shields.io/npm/types/api2ai" alt="TypeScript types" /></a>
|
|
15
|
+
<a href="https://packagephobia.com/result?p=api2ai"><img src="https://packagephobia.com/badge?p=api2ai" alt="Install size" /></a>
|
|
16
|
+
<br />
|
|
17
|
+
<a href="https://github.com/OpenSourceAGI/dev-tools-starter-agent/issues"><img src="https://img.shields.io/github/issues/OpenSourceAGI/dev-tools-starter-agent?logo=github" alt="GitHub Issues" /></a>
|
|
18
|
+
<a href="https://github.com/OpenSourceAGI/dev-tools-starter-agent/pulls"><img src="https://img.shields.io/github/issues-pr/OpenSourceAGI/dev-tools-starter-agent?logo=github&label=PRs" alt="Open Pull Requests" /></a>
|
|
19
|
+
<a href="https://github.com/OpenSourceAGI/dev-tools-starter-agent/pulls?q=is%3Apr+is%3Aclosed"><img src="https://img.shields.io/github/issues-pr-closed/OpenSourceAGI/dev-tools-starter-agent?logo=github&label=PRs%20merged&color=8957e5" alt="Merged Pull Requests" /></a>
|
|
20
|
+
<a href="https://github.com/OpenSourceAGI/dev-tools-starter-agent/discussions"><img src="https://img.shields.io/github/discussions/OpenSourceAGI/dev-tools-starter-agent" alt="GitHub Discussions" /></a>
|
|
21
|
+
<a href="https://github.com/OpenSourceAGI/dev-tools-starter-agent/commits/master/"><img src="https://img.shields.io/github/last-commit/OpenSourceAGI/dev-tools-starter-agent.svg" alt="GitHub last commit" /></a>
|
|
22
|
+
<br />
|
|
23
|
+
<a href="https://stackblitz.com/github/OpenSourceAGI/dev-tools-starter-agent/tree/master/packages/api2ai-mcp-generator"><img height="20px" src="https://developer.stackblitz.com/img/open_in_stackblitz.svg" alt="Open in StackBlitz" /></a>
|
|
24
|
+
<img src="https://img.shields.io/badge/Bun-14151A?logo=bun&logoColor=white" alt="Bun" /> <img src="https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=white" alt="TypeScript" /> <img src="https://img.shields.io/badge/Next.js-black?logo=nextdotjs&logoColor=white" alt="Next.js" /> <img src="https://img.shields.io/badge/React-20232A?logo=react&logoColor=white" alt="React" /> <img src="https://img.shields.io/badge/Tailwind%20CSS-06B6D4?logo=tailwindcss&logoColor=white" alt="Tailwind CSS" /> <img src="https://img.shields.io/badge/shadcn%2Fui-000000?logo=shadcnui&logoColor=white" alt="shadcn/ui" /> <img src="https://img.shields.io/badge/Drizzle%20ORM-C5F74F?logo=drizzle&logoColor=white" alt="Drizzle ORM" /> <img src="https://img.shields.io/badge/better--auth-000000" alt="better-auth" /> <img src="https://img.shields.io/badge/Stripe-635BFF?logo=stripe&logoColor=white" alt="Stripe" /> <img src="https://img.shields.io/badge/Vercel%20AI%20SDK-black?logo=vercel&logoColor=white" alt="Vercel AI SDK" /> <img src="https://img.shields.io/badge/Zod-3E67B1?logo=zod&logoColor=white" alt="Zod" /> <img src="https://img.shields.io/badge/Fumadocs-000000" alt="Fumadocs" /> <img src="https://img.shields.io/badge/Vite-646CFF?logo=vite&logoColor=white" alt="Vite" /> <img src="https://img.shields.io/badge/Vitest-6E9F18?logo=vitest&logoColor=white" alt="Vitest" />
|
|
25
|
+
</p>
|
|
26
|
+
<!-- template-git-repo:badges:end -->
|
|
8
27
|
|
|
9
|
-
|
|
28
|
+
<!-- skills:install:start -->
|
|
29
|
+
**🤖 Agent skill** — `npx skills@latest add https://github.com/OpenSourceAGI/dev-tools-starter-agent --skill api2ai` ([what it covers](../../skills/api2ai/SKILL.md))
|
|
30
|
+
<!-- skills:install:end -->
|
|
10
31
|
|
|
11
|
-
|
|
32
|
+
<h3 align="center">
|
|
33
|
+
<a href="https://api-2-ai.vercel.app/"> 🌐 Live Site </a> |
|
|
34
|
+
<a href="https://github.com/vtempest/GRAB-URL/tree/master/api2ai/example-petstore"> 🎯 Example MCP Server </a>
|
|
35
|
+
</h3>
|
|
12
36
|
|
|
13
37
|
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
# API2AI: OpenAPI to MCP-Use Server
|
|
41
|
+
|
|
14
42
|
Generate production-ready MCP servers from any OpenAPI specification using the highly-used and convenient [mcp-use](https://mcp-use.com) framework (8k+ GitHub stars).
|
|
15
43
|
|
|
16
44
|
OpenAPI specs are easy to write and organize your code and have [100s of tools available](https://openapi.tools) such as the [OpenAPI Builder web UI](https://www.apibldr.com).
|
|
17
45
|
|
|
46
|
+
Try it in the browser at **[api-2-ai.vercel.app](https://api-2-ai.vercel.app/)** — the hosted site lets you design and validate OpenAPI specs visually, browse the docs, and see generated-server examples without installing anything.
|
|
18
47
|
|
|
19
48
|
## Features
|
|
20
49
|
|
|
21
50
|
- 🚀 **Modern Framework** - Uses mcp-use for clean, maintainable code
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
- 🏷️ **Tool Annotations** - `readOnlyHint` / `destructiveHint` / `idempotentHint` from the HTTP method
|
|
26
|
-
- 🔗 **`$ref`, `allOf`, nullable** - Local refs resolved, cycles cut, OpenAPI 3.0 and 3.1 nullability
|
|
51
|
+
- 🔍 **Built-in Inspector** - Test tools immediately at `/inspector`
|
|
52
|
+
- 📡 **Multiple Transports** - HTTP, SSE, and Streamable HTTP support
|
|
53
|
+
- 🎨 **UI Widgets** - Compatible with ChatGPT Apps SDK and MCP-UI
|
|
27
54
|
- 🔐 **Auth Support** - Bearer tokens, API keys, custom headers
|
|
28
55
|
- ✨ **Zod Schemas** - Type-safe parameter validation
|
|
29
56
|
- 🛡️ **Security Hardening** - Risk classification, policy enforcement, HTTP guardrails
|
|
@@ -41,28 +68,26 @@ npx api2ai \
|
|
|
41
68
|
# Install and run
|
|
42
69
|
cd petstore-mcp
|
|
43
70
|
npm install
|
|
44
|
-
npm start
|
|
45
|
-
npm run dev # hot reload + Inspector at http://localhost:3000/mcp/inspector
|
|
71
|
+
npm start
|
|
46
72
|
```
|
|
47
73
|
|
|
48
|
-
|
|
74
|
+
Open http://localhost:3000/inspector to test your tools!
|
|
49
75
|
|
|
50
76
|
## Usage
|
|
51
77
|
|
|
52
78
|
### CLI
|
|
53
79
|
|
|
54
80
|
```bash
|
|
55
|
-
|
|
81
|
+
node generate-mcp-use-server.js <openapi-spec> [output-folder] [options]
|
|
56
82
|
|
|
57
83
|
Options:
|
|
58
84
|
--name <name> Server name (default: api-mcp-server)
|
|
59
85
|
--base-url <url> Override API base URL
|
|
60
86
|
--port <port> Server port (default: 3000)
|
|
61
|
-
--allow-mutations Enable
|
|
87
|
+
--allow-mutations Enable POST/PUT/PATCH/DELETE tools by default
|
|
62
88
|
--include-tags <tags> Only include tools with these tags (comma-separated)
|
|
63
89
|
--exclude-tags <tags> Exclude tools with these tags (comma-separated)
|
|
64
|
-
--
|
|
65
|
-
--approve-writes Write REQUIRE_APPROVALS=false into the generated .env
|
|
90
|
+
--approve-writes Disable approval requirement for restricted tools
|
|
66
91
|
--help Show help
|
|
67
92
|
```
|
|
68
93
|
|
|
@@ -70,32 +95,32 @@ Options:
|
|
|
70
95
|
|
|
71
96
|
```bash
|
|
72
97
|
# From remote URL
|
|
73
|
-
|
|
98
|
+
node generate-mcp-use-server.js \
|
|
74
99
|
https://api.example.com/openapi.json \
|
|
75
100
|
./my-server \
|
|
76
101
|
--name my-api
|
|
77
102
|
|
|
78
103
|
# From local file
|
|
79
|
-
|
|
104
|
+
node generate-mcp-use-server.js \
|
|
80
105
|
./specs/my-api.yaml \
|
|
81
106
|
./my-mcp-server \
|
|
82
107
|
--port 8080
|
|
83
108
|
|
|
84
109
|
# With custom base URL
|
|
85
|
-
|
|
110
|
+
node generate-mcp-use-server.js \
|
|
86
111
|
./petstore.json \
|
|
87
112
|
./petstore \
|
|
88
113
|
--base-url https://petstore.example.com/v3
|
|
89
114
|
|
|
90
115
|
# Include only read-only tools tagged "public"
|
|
91
|
-
|
|
116
|
+
node generate-mcp-use-server.js \
|
|
92
117
|
./api.json \
|
|
93
118
|
./readonly-server \
|
|
94
119
|
--include-tags public \
|
|
95
120
|
--exclude-tags admin,internal
|
|
96
121
|
|
|
97
122
|
# Enable writes (mutations) explicitly
|
|
98
|
-
|
|
123
|
+
node generate-mcp-use-server.js \
|
|
99
124
|
./api.json \
|
|
100
125
|
./full-server \
|
|
101
126
|
--allow-mutations \
|
|
@@ -105,33 +130,30 @@ npx api2ai \
|
|
|
105
130
|
### Programmatic Usage
|
|
106
131
|
|
|
107
132
|
```javascript
|
|
108
|
-
import { generateMcpServer,
|
|
133
|
+
import { generateMcpServer, extractTools, loadOpenApiSpec } from './generate-mcp-use-server.js';
|
|
109
134
|
|
|
110
135
|
// Generate complete server
|
|
111
136
|
const result = await generateMcpServer(
|
|
112
|
-
|
|
113
|
-
|
|
137
|
+
'https://api.example.com/openapi.json',
|
|
138
|
+
'./output-folder',
|
|
114
139
|
{
|
|
115
|
-
serverName:
|
|
116
|
-
baseUrl:
|
|
140
|
+
serverName: 'my-api',
|
|
141
|
+
baseUrl: 'https://api.example.com/v1',
|
|
117
142
|
port: 3000,
|
|
118
143
|
allowMutations: false, // block POST/PUT/PATCH/DELETE by default
|
|
119
|
-
includeTags: [
|
|
120
|
-
excludeTags: [
|
|
144
|
+
includeTags: ['public'], // only include tools tagged "public"
|
|
145
|
+
excludeTags: ['admin'], // exclude tools tagged "admin"
|
|
121
146
|
}
|
|
122
147
|
);
|
|
123
148
|
|
|
124
149
|
console.log(`Generated ${result.toolCount} tools`);
|
|
125
150
|
|
|
126
151
|
// Or just extract tools for custom processing
|
|
127
|
-
const spec = await loadOpenApiSpec(
|
|
152
|
+
const spec = await loadOpenApiSpec('./my-spec.json');
|
|
128
153
|
const tools = extractTools(spec, {
|
|
129
|
-
filterFn: (tool) => tool.riskLevel ===
|
|
130
|
-
excludeOperationIds: [
|
|
154
|
+
filterFn: (tool) => tool.riskLevel === 'low', // only safe read-only tools
|
|
155
|
+
excludeOperationIds: ['deleteUser'],
|
|
131
156
|
});
|
|
132
|
-
|
|
133
|
-
// Or render every file in memory without writing to disk
|
|
134
|
-
const { files } = renderMcpServer(spec, { serverName: "my-api" });
|
|
135
157
|
```
|
|
136
158
|
|
|
137
159
|
## Security
|
|
@@ -167,9 +189,9 @@ The generated HTTP client enforces these on every request:
|
|
|
167
189
|
- **Response size cap** — configurable via `MAX_RESPONSE_BYTES` (default 10 MB)
|
|
168
190
|
- **No redirects** — `redirect: 'error'` prevents host-pivot attacks
|
|
169
191
|
- **Credential header protection** — tool arguments cannot override `Authorization`, `Cookie`, `X-API-Key`, or other credential headers; env-configured auth always wins
|
|
170
|
-
- **Host allowlist** —
|
|
192
|
+
- **Host allowlist** — `ALLOWED_API_HOSTS` restricts outbound calls to specific hostnames
|
|
171
193
|
|
|
172
|
-
> **Inspector note**:
|
|
194
|
+
> **Inspector note**: The built-in inspector at `/inspector` exposes all registered tools. In production, restrict access using a reverse proxy or firewall rule.
|
|
173
195
|
|
|
174
196
|
## Generated Output
|
|
175
197
|
|
|
@@ -193,21 +215,22 @@ my-mcp-server/
|
|
|
193
215
|
|
|
194
216
|
| Endpoint | Description |
|
|
195
217
|
|----------|-------------|
|
|
196
|
-
| `
|
|
197
|
-
| `
|
|
198
|
-
|
|
|
218
|
+
| `GET /inspector` | Interactive tool testing UI |
|
|
219
|
+
| `POST /mcp` | MCP protocol endpoint |
|
|
220
|
+
| `GET /sse` | Server-Sent Events endpoint |
|
|
221
|
+
| `GET /health` | Health check |
|
|
199
222
|
|
|
200
223
|
### Environment Variables
|
|
201
224
|
|
|
202
225
|
| Variable | Description | Default |
|
|
203
226
|
|----------|-------------|---------|
|
|
204
227
|
| `PORT` | Server port | `3000` |
|
|
205
|
-
| `
|
|
228
|
+
| `NODE_ENV` | `development` / `production` | `development` |
|
|
206
229
|
| `API_BASE_URL` | Base URL for API calls | From spec |
|
|
207
230
|
| `API_KEY` | Bearer token auth | — |
|
|
208
231
|
| `API_AUTH_HEADER` | Custom header (`Name:value`) | — |
|
|
209
|
-
| `MCP_URL` | Public URL
|
|
210
|
-
| `ALLOWED_ORIGINS` |
|
|
232
|
+
| `MCP_URL` | Public URL for widgets | — |
|
|
233
|
+
| `ALLOWED_ORIGINS` | CORS origins (production) | — |
|
|
211
234
|
| `ALLOW_RESTRICTED_TOOLS` | Allow medium/high-risk tools | `false` |
|
|
212
235
|
| `REQUIRE_APPROVALS` | Require approval for restricted tools | `true` |
|
|
213
236
|
| `ALLOWED_API_HOSTS` | Comma-separated allowed API hostnames | (spec's host) |
|
|
@@ -226,11 +249,9 @@ my-mcp-server/
|
|
|
226
249
|
}
|
|
227
250
|
```
|
|
228
251
|
|
|
229
|
-
### Connect to
|
|
252
|
+
### Connect to ChatGPT
|
|
230
253
|
|
|
231
|
-
|
|
232
|
-
claude mcp add --transport http my-api http://localhost:3000/mcp
|
|
233
|
-
```
|
|
254
|
+
The generated server supports the OpenAI Apps SDK out of the box.
|
|
234
255
|
|
|
235
256
|
## Advanced Options
|
|
236
257
|
|
|
@@ -238,7 +259,7 @@ claude mcp add --transport http my-api http://localhost:3000/mcp
|
|
|
238
259
|
|
|
239
260
|
```javascript
|
|
240
261
|
const result = await generateMcpServer(specUrl, outputDir, {
|
|
241
|
-
filterFn: (tool) => tool.riskLevel ===
|
|
262
|
+
filterFn: (tool) => tool.riskLevel === 'low',
|
|
242
263
|
});
|
|
243
264
|
```
|
|
244
265
|
|
|
@@ -246,7 +267,7 @@ const result = await generateMcpServer(specUrl, outputDir, {
|
|
|
246
267
|
|
|
247
268
|
```javascript
|
|
248
269
|
const result = await generateMcpServer(specUrl, outputDir, {
|
|
249
|
-
filterFn: (tool) => [
|
|
270
|
+
filterFn: (tool) => ['get', 'post'].includes(tool.method),
|
|
250
271
|
});
|
|
251
272
|
```
|
|
252
273
|
|
|
@@ -255,9 +276,9 @@ const result = await generateMcpServer(specUrl, outputDir, {
|
|
|
255
276
|
```javascript
|
|
256
277
|
const result = await generateMcpServer(specUrl, outputDir, {
|
|
257
278
|
excludeOperationIds: [
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
279
|
+
'deleteUser',
|
|
280
|
+
'deleteAllData',
|
|
281
|
+
'adminReset',
|
|
261
282
|
],
|
|
262
283
|
});
|
|
263
284
|
```
|
|
@@ -266,7 +287,7 @@ const result = await generateMcpServer(specUrl, outputDir, {
|
|
|
266
287
|
|
|
267
288
|
```javascript
|
|
268
289
|
const result = await generateMcpServer(specUrl, outputDir, {
|
|
269
|
-
filterFn: (tool) => tool.pathTemplate.startsWith(
|
|
290
|
+
filterFn: (tool) => tool.pathTemplate.startsWith('/api/v2/'),
|
|
270
291
|
});
|
|
271
292
|
```
|
|
272
293
|
|
|
@@ -274,11 +295,11 @@ const result = await generateMcpServer(specUrl, outputDir, {
|
|
|
274
295
|
|
|
275
296
|
```javascript
|
|
276
297
|
const result = await generateMcpServer(specUrl, outputDir, {
|
|
277
|
-
excludeOperationIds: [
|
|
298
|
+
excludeOperationIds: ['deleteUser'],
|
|
278
299
|
allowMutations: false,
|
|
279
|
-
filterFn: (tool) =>
|
|
280
|
-
tool.riskLevel ===
|
|
281
|
-
tool.pathTemplate.includes(
|
|
300
|
+
filterFn: (tool) =>
|
|
301
|
+
tool.riskLevel === 'low' &&
|
|
302
|
+
tool.pathTemplate.includes('/public/'),
|
|
282
303
|
});
|
|
283
304
|
```
|
|
284
305
|
|
|
@@ -288,6 +309,7 @@ const result = await generateMcpServer(specUrl, outputDir, {
|
|
|
288
309
|
|---------|---------------|---------|
|
|
289
310
|
| Code needed | ~50 lines | ~200+ lines |
|
|
290
311
|
| Inspector | ✅ Built-in | ❌ Manual |
|
|
312
|
+
| UI Widgets | ✅ Supported | ❌ Manual |
|
|
291
313
|
| Zod validation | ✅ Generated | ❌ Manual |
|
|
292
314
|
| Authentication | ✅ Configured | ❌ Manual |
|
|
293
315
|
| Risk classification | ✅ Automatic | ❌ Manual |
|
|
@@ -295,24 +317,8 @@ const result = await generateMcpServer(specUrl, outputDir, {
|
|
|
295
317
|
| HTTP hardening | ✅ Built-in | ❌ Manual |
|
|
296
318
|
| Production ready | ✅ Yes | ⚠️ Requires work |
|
|
297
319
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
```
|
|
301
|
-
src/
|
|
302
|
-
├── cli.js # the `api2ai` command
|
|
303
|
-
├── index.js # public API
|
|
304
|
-
├── generate.js # render + write a server
|
|
305
|
-
├── versions.js # mcp-use / zod versions written into generated servers
|
|
306
|
-
├── spec/ # load spec, OpenAPI → Zod, risk classification, tool extraction
|
|
307
|
-
└── templates/ # one module per generated file
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
```bash
|
|
311
|
-
node src/cli.js ./petstore.json ./out
|
|
312
|
-
# tests live in the repo's single Vitest suite
|
|
313
|
-
cd ../grab-url && npx vitest run test/api2ai.test.ts
|
|
314
|
-
```
|
|
320
|
+
---
|
|
315
321
|
|
|
316
|
-
|
|
322
|
+
[](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request)
|
|
317
323
|
|
|
318
|
-
|
|
324
|
+
Please star this repo for updates! 🌟
|
package/package.json
CHANGED
|
@@ -1,35 +1,247 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "api2ai",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Generate
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
3
|
+
"version": "1.0.30",
|
|
4
|
+
"description": "Generate production-ready MCP servers from any OpenAPI specification using the highly-used and convenient [mcp-use](https://mcp-use.com) framework",
|
|
5
|
+
"license": "rights.institute/prosper",
|
|
6
|
+
"author": "vtempest",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/OpenSourceAGI/dev-tools-starter-agent.git",
|
|
10
|
+
"directory": "packages/api2ai-mcp-generator"
|
|
8
11
|
},
|
|
9
|
-
"
|
|
12
|
+
"homepage": "https://github.com/OpenSourceAGI/dev-tools-starter-agent/tree/master/packages/api2ai-mcp-generator",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"mcp",
|
|
15
|
+
"mcp-server",
|
|
16
|
+
"model-context-protocol",
|
|
17
|
+
"openapi",
|
|
18
|
+
"api",
|
|
19
|
+
"ai",
|
|
20
|
+
"code-generator",
|
|
21
|
+
"zod"
|
|
22
|
+
],
|
|
10
23
|
"exports": {
|
|
11
|
-
".":
|
|
12
|
-
|
|
13
|
-
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"import": "./dist/index.mjs",
|
|
27
|
+
"require": "./dist/index.js"
|
|
28
|
+
}
|
|
14
29
|
},
|
|
15
|
-
"
|
|
16
|
-
|
|
30
|
+
"main": "dist/index.js",
|
|
31
|
+
"module": "dist/index.mjs",
|
|
32
|
+
"types": "dist/index.d.ts",
|
|
33
|
+
"files": [
|
|
34
|
+
"dist"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "next build",
|
|
38
|
+
"db:create": "npm create cloud-db",
|
|
39
|
+
"db:generate": "drizzle-kit generate",
|
|
40
|
+
"db:push": "drizzle-kit push",
|
|
41
|
+
"db:studio": "concurrently \"drizzle-kit studio\" \"wait-on https://local.drizzle.studio && opener https://local.drizzle.studio\"",
|
|
42
|
+
"dev": "concurrently \"next dev\" \"wait-on http://localhost:3000 && opener http://localhost:3000\"",
|
|
43
|
+
"docs:check": "fumadocs check",
|
|
44
|
+
"docs:generate": "fumadocs-mdx",
|
|
45
|
+
"make": "concurrently \"next build && next start \" \"wait-on http://localhost:3000 && opener http://localhost:3000\"",
|
|
46
|
+
"start": "next start",
|
|
47
|
+
"test": "vitest run",
|
|
48
|
+
"test:watch": "vitest",
|
|
49
|
+
"coverage": "vitest run --coverage"
|
|
17
50
|
},
|
|
18
|
-
"
|
|
19
|
-
"
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@ai-sdk/react": "3.0.3",
|
|
53
|
+
"@aws-sdk/client-rds-data": "latest",
|
|
54
|
+
"@better-auth/core": "latest",
|
|
55
|
+
"@better-auth/stripe": "^1.4.7",
|
|
56
|
+
"@cloudflare/workers-types": "latest",
|
|
57
|
+
"@electric-sql/pglite": "latest",
|
|
58
|
+
"@emotion/is-prop-valid": "latest",
|
|
59
|
+
"@fumadocs/mdx-remote": "^1.4.3",
|
|
60
|
+
"@langchain/core": "^1.1.5",
|
|
61
|
+
"@langchain/groq": "^1.0.2",
|
|
62
|
+
"@langchain/openai": "^1.2.0",
|
|
63
|
+
"@libsql/client": "^0.15.15",
|
|
64
|
+
"@libsql/client-wasm": "latest",
|
|
65
|
+
"@lynx-js/react": "latest",
|
|
66
|
+
"@mixedbread/sdk": "latest",
|
|
67
|
+
"@neondatabase/serverless": "latest",
|
|
68
|
+
"@op-engineering/op-sqlite": "latest",
|
|
69
|
+
"@opentelemetry/api": "latest",
|
|
70
|
+
"@orama/core": "latest",
|
|
71
|
+
"@planetscale/database": "latest",
|
|
72
|
+
"@prisma/client": "latest",
|
|
73
|
+
"@radix-ui/react-accordion": "1.2.12",
|
|
74
|
+
"@radix-ui/react-alert-dialog": "1.1.15",
|
|
75
|
+
"@radix-ui/react-aspect-ratio": "1.1.8",
|
|
76
|
+
"@radix-ui/react-avatar": "^1.1.11",
|
|
77
|
+
"@radix-ui/react-checkbox": "1.3.3",
|
|
78
|
+
"@radix-ui/react-collapsible": "^1.1.12",
|
|
79
|
+
"@radix-ui/react-context-menu": "2.2.16",
|
|
80
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
81
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
82
|
+
"@radix-ui/react-hover-card": "1.1.15",
|
|
83
|
+
"@radix-ui/react-label": "2.1.8",
|
|
84
|
+
"@radix-ui/react-menubar": "1.1.16",
|
|
85
|
+
"@radix-ui/react-navigation-menu": "1.2.14",
|
|
86
|
+
"@radix-ui/react-popover": "1.1.15",
|
|
87
|
+
"@radix-ui/react-presence": "1.1.5",
|
|
88
|
+
"@radix-ui/react-progress": "1.1.8",
|
|
89
|
+
"@radix-ui/react-radio-group": "^1.3.8",
|
|
90
|
+
"@radix-ui/react-scroll-area": "1.2.10",
|
|
91
|
+
"@radix-ui/react-select": "2.2.6",
|
|
92
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
93
|
+
"@radix-ui/react-slider": "1.3.6",
|
|
94
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
95
|
+
"@radix-ui/react-switch": "1.2.6",
|
|
96
|
+
"@radix-ui/react-tabs": "1.1.13",
|
|
97
|
+
"@radix-ui/react-toast": "1.2.15",
|
|
98
|
+
"@radix-ui/react-toggle": "1.1.10",
|
|
99
|
+
"@radix-ui/react-toggle-group": "1.1.11",
|
|
100
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
101
|
+
"@react-email/render": "latest",
|
|
102
|
+
"@react-three/drei": "^10.7.7",
|
|
103
|
+
"@react-three/fiber": "^9.4.2",
|
|
104
|
+
"@scalar/api-client-react": "latest",
|
|
105
|
+
"@scalar/api-reference": "^1.40.5",
|
|
106
|
+
"@scalar/api-reference-react": "^0.8.11",
|
|
107
|
+
"@shikijs/rehype": "^3.20.0",
|
|
108
|
+
"@shikijs/transformers": "^3.20.0",
|
|
109
|
+
"@silevis/reactgrid": "^4.1.17",
|
|
110
|
+
"@t3-oss/env-nextjs": "0.13.10",
|
|
111
|
+
"@tabler/icons-react": "^3.36.0",
|
|
112
|
+
"@tanstack/react-router": "latest",
|
|
113
|
+
"@tanstack/react-start": "latest",
|
|
114
|
+
"@tidbcloud/serverless": "latest",
|
|
115
|
+
"@types/better-sqlite3": "latest",
|
|
116
|
+
"@types/dompurify": "^3.2.0",
|
|
117
|
+
"@types/js-yaml": "^4.0.9",
|
|
118
|
+
"@types/marked": "^6.0.0",
|
|
119
|
+
"@types/pg": "latest",
|
|
120
|
+
"@types/sql.js": "latest",
|
|
121
|
+
"@upstash/redis": "latest",
|
|
122
|
+
"@vercel/analytics": "1.6.1",
|
|
123
|
+
"@vercel/postgres": "latest",
|
|
124
|
+
"@xata.io/client": "latest",
|
|
125
|
+
"ai": "6.0.3",
|
|
126
|
+
"algoliasearch": "latest",
|
|
127
|
+
"arktype": "latest",
|
|
128
|
+
"autoprefixer": "^10.4.22",
|
|
129
|
+
"axios": "^1.13.2",
|
|
130
|
+
"better-auth": "^1.4.7",
|
|
131
|
+
"better-sqlite3": "latest",
|
|
132
|
+
"bun-types": "latest",
|
|
133
|
+
"canvas": "latest",
|
|
134
|
+
"class-variance-authority": "^0.7.1",
|
|
135
|
+
"cli-highlight": "^2.1.11",
|
|
136
|
+
"clsx": "^2.1.1",
|
|
137
|
+
"cmdk": "^1.1.1",
|
|
138
|
+
"date-fns": "4.1.0",
|
|
139
|
+
"dompurify": "^3.3.1",
|
|
140
|
+
"dotenv": "^17.2.3",
|
|
141
|
+
"drizzle-orm": "^0.45.1",
|
|
142
|
+
"embla-carousel-react": "8.6.0",
|
|
143
|
+
"ethers": "^6.16.0",
|
|
144
|
+
"expo": "latest",
|
|
145
|
+
"expo-asset": "latest",
|
|
146
|
+
"expo-file-system": "latest",
|
|
147
|
+
"expo-gl": "latest",
|
|
148
|
+
"expo-sqlite": "latest",
|
|
149
|
+
"feed": "^5.1.0",
|
|
150
|
+
"fumadocs-core": "^16.2.5",
|
|
151
|
+
"fumadocs-mdx": "^14.1.1",
|
|
152
|
+
"fumadocs-openapi": "^10.1.4",
|
|
153
|
+
"fumadocs-twoslash": "^3.1.10",
|
|
154
|
+
"fumadocs-typescript": "^4.0.14",
|
|
155
|
+
"fumadocs-ui": "^16.2.5",
|
|
156
|
+
"gel": "latest",
|
|
157
|
+
"grab-url": "^1.0.15",
|
|
158
|
+
"hast-util-to-jsx-runtime": "2.3.6",
|
|
159
|
+
"highlight.js": "^11.11.1",
|
|
160
|
+
"jiti": "latest",
|
|
161
|
+
"js-yaml": "^4.1.1",
|
|
162
|
+
"jszip": "^3.10.1",
|
|
163
|
+
"katex": "^0.16.27",
|
|
164
|
+
"knex": "latest",
|
|
165
|
+
"kysely": "latest",
|
|
166
|
+
"langchain": "^1.2.0",
|
|
167
|
+
"less": "latest",
|
|
168
|
+
"lightningcss": "latest",
|
|
169
|
+
"linkedom": "^0.18.12",
|
|
170
|
+
"lucide-react": "^0.561.0",
|
|
171
|
+
"marked": "^17.0.1",
|
|
172
|
+
"mermaid": "^11.12.2",
|
|
173
|
+
"mongodb": "latest",
|
|
174
|
+
"motion": "^12.23.26",
|
|
175
|
+
"mysql2": "latest",
|
|
176
|
+
"next": "16.0.10",
|
|
177
|
+
"next-themes": "^0.4.6",
|
|
178
|
+
"pg": "latest",
|
|
179
|
+
"pinets": "^0.5.0",
|
|
180
|
+
"postgres": "latest",
|
|
181
|
+
"prisma": "latest",
|
|
182
|
+
"react": "19.2.3",
|
|
183
|
+
"react-day-picker": "9.12.0",
|
|
184
|
+
"react-dom": "19.2.3",
|
|
185
|
+
"react-hook-form": "^7.68.0",
|
|
186
|
+
"react-is": "^19.2.3",
|
|
187
|
+
"react-native": "latest",
|
|
188
|
+
"react-resizable-panels": "^3.0.6",
|
|
189
|
+
"react-router": "latest",
|
|
190
|
+
"rehype-katex": "^7.0.1",
|
|
191
|
+
"remark": "15.0.1",
|
|
192
|
+
"remark-gfm": "4.0.1",
|
|
193
|
+
"remark-math": "^6.0.0",
|
|
194
|
+
"remark-rehype": "11.1.2",
|
|
195
|
+
"resend": "^6.6.0",
|
|
196
|
+
"sass": "latest",
|
|
197
|
+
"sass-embedded": "latest",
|
|
198
|
+
"simplex-noise": "^4.0.3",
|
|
199
|
+
"siwe": "^3.0.0",
|
|
200
|
+
"solid-js": "latest",
|
|
201
|
+
"sonner": "^2.0.7",
|
|
202
|
+
"sql.js": "latest",
|
|
203
|
+
"sqlite3": "latest",
|
|
204
|
+
"stripe": "^20.0.0",
|
|
205
|
+
"stylus": "latest",
|
|
206
|
+
"sugarss": "latest",
|
|
207
|
+
"tailwind-merge": "^3.4.0",
|
|
208
|
+
"tailwindcss-animate": "^1.0.7",
|
|
209
|
+
"tavily": "^1.0.2",
|
|
210
|
+
"terser": "^5.44.1",
|
|
211
|
+
"three": "^0.182.0",
|
|
212
|
+
"three-globe": "^2.45.0",
|
|
213
|
+
"tsx": "latest",
|
|
214
|
+
"unist-util-visit": "5.0.0",
|
|
215
|
+
"valibot": "latest",
|
|
216
|
+
"vaul": "^1.1.2",
|
|
217
|
+
"viem": "^2.42.0",
|
|
218
|
+
"vitest": "latest",
|
|
219
|
+
"waku": "latest",
|
|
220
|
+
"yaml": "latest",
|
|
221
|
+
"zod": "4.1.13"
|
|
20
222
|
},
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
223
|
+
"devDependencies": {
|
|
224
|
+
"@fumadocs/cli": "^1.1.0",
|
|
225
|
+
"@tailwindcss/postcss": "^4.1.18",
|
|
226
|
+
"@types/node": "^25.0.2",
|
|
227
|
+
"@types/react": "^19.2.7",
|
|
228
|
+
"@types/react-dom": "^19.2.3",
|
|
229
|
+
"@types/three": "^0.182.0",
|
|
230
|
+
"@vitest/coverage-v8": "^4.1.0",
|
|
231
|
+
"concurrently": "^9.2.1",
|
|
232
|
+
"drizzle-kit": "^0.31.8",
|
|
233
|
+
"opener": "^1.5.2",
|
|
234
|
+
"postcss": "^8.5.6",
|
|
235
|
+
"tailwindcss": "^4.1.18",
|
|
236
|
+
"tw-animate-css": "1.4.0",
|
|
237
|
+
"typescript": "^5.9.3",
|
|
238
|
+
"vite": "^7.3.0",
|
|
239
|
+
"vite-plugin-dts": "^4.5.4",
|
|
240
|
+
"vitest": "^4.1.0",
|
|
241
|
+
"wait-on": "^9.0.3"
|
|
29
242
|
},
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"README.md"
|
|
243
|
+
"data": "dist/index.d.ts",
|
|
244
|
+
"trustedDependencies": [
|
|
245
|
+
"pg-native"
|
|
34
246
|
]
|
|
35
247
|
}
|