vibekit-mcp 0.2.0 → 0.3.0
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 +71 -38
- package/dist/index.js +270 -238
- package/package.json +10 -35
package/README.md
CHANGED
|
@@ -1,68 +1,101 @@
|
|
|
1
1
|
# vibekit-mcp
|
|
2
2
|
|
|
3
|
-
MCP
|
|
3
|
+
MCP server for [VibeKit](https://vibekit.bot) — manage AI-powered apps as native tools in Claude Desktop, Cursor, Windsurf, and any MCP-compatible client.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Setup
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
npm install -g vibekit-mcp
|
|
9
|
-
```
|
|
7
|
+
### Claude Desktop
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
Add to your `claude_desktop_config.json`:
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"mcpServers": {
|
|
14
|
+
"vibekit": {
|
|
15
|
+
"command": "npx",
|
|
16
|
+
"args": ["-y", "vibekit-mcp"],
|
|
17
|
+
"env": {
|
|
18
|
+
"VIBEKIT_API_KEY": "vk_your_key_here"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Cursor
|
|
16
26
|
|
|
17
|
-
|
|
27
|
+
Add to `.cursor/mcp.json` in your project:
|
|
18
28
|
|
|
19
29
|
```json
|
|
20
30
|
{
|
|
21
31
|
"mcpServers": {
|
|
22
32
|
"vibekit": {
|
|
23
|
-
"command": "
|
|
33
|
+
"command": "npx",
|
|
34
|
+
"args": ["-y", "vibekit-mcp"],
|
|
24
35
|
"env": {
|
|
25
|
-
"VIBEKIT_API_KEY": "
|
|
36
|
+
"VIBEKIT_API_KEY": "vk_your_key_here"
|
|
26
37
|
}
|
|
27
38
|
}
|
|
28
39
|
}
|
|
29
40
|
}
|
|
30
41
|
```
|
|
31
42
|
|
|
32
|
-
|
|
43
|
+
Get your API key at [app.vibekit.bot/settings](https://app.vibekit.bot/settings).
|
|
33
44
|
|
|
34
45
|
## Available Tools
|
|
35
46
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
| `vibekit_list_tasks` | List recent tasks |
|
|
41
|
-
| `vibekit_wait_for_task` | Wait for a task to complete (polls until done) |
|
|
42
|
-
| `vibekit_create_schedule` | Create a recurring scheduled task |
|
|
43
|
-
| `vibekit_list_schedules` | List all scheduled tasks |
|
|
44
|
-
| `vibekit_delete_schedule` | Delete a scheduled task |
|
|
45
|
-
| `vibekit_account` | Get account info (plan, credits, usage) |
|
|
47
|
+
### Apps
|
|
48
|
+
- `vibekit_list_apps` — List all your hosted apps
|
|
49
|
+
- `vibekit_app_info` — Get app details
|
|
50
|
+
- `vibekit_start` / `vibekit_stop` / `vibekit_restart` — Container control
|
|
46
51
|
|
|
47
|
-
|
|
52
|
+
### AI Agent
|
|
53
|
+
- `vibekit_chat` — Send a message to your app's AI agent
|
|
54
|
+
- `vibekit_agent_status` — Agent status and model info
|
|
48
55
|
|
|
49
|
-
|
|
56
|
+
### Deploy
|
|
57
|
+
- `vibekit_deploy` — Trigger redeploy
|
|
58
|
+
- `vibekit_deploys` — Deploy history
|
|
59
|
+
- `vibekit_rollback` — Rollback to previous deploy
|
|
50
60
|
|
|
51
|
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
- "Create a weekly schedule to improve SEO on my repo"
|
|
61
|
+
### Logs & Files
|
|
62
|
+
- `vibekit_logs` — View app logs
|
|
63
|
+
- `vibekit_files` — Browse workspace files
|
|
55
64
|
|
|
56
|
-
|
|
65
|
+
### Environment
|
|
66
|
+
- `vibekit_env_list` / `vibekit_env_set` / `vibekit_env_delete` — Manage env vars
|
|
57
67
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
68
|
+
### Database
|
|
69
|
+
- `vibekit_db_status` — Database stats
|
|
70
|
+
- `vibekit_db_schema` — Tables, columns, types
|
|
71
|
+
- `vibekit_db_query` — Run read-only SQL
|
|
72
|
+
- `vibekit_db_table` — Browse table data
|
|
73
|
+
|
|
74
|
+
### Domain & QA
|
|
75
|
+
- `vibekit_set_domain` — Set custom domain
|
|
76
|
+
- `vibekit_qa` — Run QA audit
|
|
77
|
+
|
|
78
|
+
### Tasks
|
|
79
|
+
- `vibekit_submit_task` — Submit a headless coding task
|
|
80
|
+
- `vibekit_task_status` — Check task status
|
|
81
|
+
- `vibekit_account` — Plan, balance, usage
|
|
82
|
+
|
|
83
|
+
## Example Usage
|
|
84
|
+
|
|
85
|
+
Once connected, you can say things like:
|
|
86
|
+
|
|
87
|
+
- "List my VibeKit apps"
|
|
88
|
+
- "Show me the logs for my surf app"
|
|
89
|
+
- "Tell my agent to add a dark mode toggle"
|
|
90
|
+
- "Run a SQL query on my database"
|
|
91
|
+
- "Deploy my app"
|
|
62
92
|
|
|
63
93
|
## Links
|
|
64
94
|
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
|
|
95
|
+
- Website: https://vibekit.bot
|
|
96
|
+
- Dashboard: https://app.vibekit.bot
|
|
97
|
+
- CLI: https://www.npmjs.com/package/vibekit-cli
|
|
98
|
+
|
|
99
|
+
## License
|
|
100
|
+
|
|
101
|
+
MIT
|
package/dist/index.js
CHANGED
|
@@ -6,349 +6,381 @@ const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
|
6
6
|
const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
|
|
7
7
|
const API_BASE = process.env.VIBEKIT_API_URL || "https://vibekit.bot/api/v1";
|
|
8
8
|
const API_KEY = process.env.VIBEKIT_API_KEY || "";
|
|
9
|
-
const SKILLS_REGISTRY = "https://raw.githubusercontent.com/vibekit-apps/skills-registry/main";
|
|
10
|
-
// Skills cache (TTL: 5 minutes)
|
|
11
|
-
let skillsCache = null;
|
|
12
|
-
const CACHE_TTL = 5 * 60 * 1000;
|
|
13
9
|
if (!API_KEY) {
|
|
14
|
-
console.error("
|
|
15
|
-
console.error("Get one at https://t.me/the_vibe_kit_bot with /apikey command");
|
|
10
|
+
console.error("VIBEKIT_API_KEY is required. Get one at https://app.vibekit.bot/settings");
|
|
16
11
|
process.exit(1);
|
|
17
12
|
}
|
|
18
|
-
// API
|
|
19
|
-
async function
|
|
13
|
+
// ── API Helper ──────────────────────────────────────────────────────────────
|
|
14
|
+
async function api(method, path, body) {
|
|
20
15
|
try {
|
|
21
16
|
const res = await fetch(`${API_BASE}${path}`, {
|
|
22
17
|
method,
|
|
23
|
-
headers: {
|
|
24
|
-
"Authorization": `Bearer ${API_KEY}`,
|
|
25
|
-
"Content-Type": "application/json",
|
|
26
|
-
},
|
|
18
|
+
headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json" },
|
|
27
19
|
body: body ? JSON.stringify(body) : undefined,
|
|
28
20
|
});
|
|
21
|
+
if (res.status === 204)
|
|
22
|
+
return { ok: true, data: {} };
|
|
29
23
|
const data = await res.json();
|
|
30
|
-
if (!res.ok)
|
|
24
|
+
if (!res.ok)
|
|
31
25
|
return { ok: false, error: data.error || `HTTP ${res.status}` };
|
|
32
|
-
}
|
|
33
26
|
return { ok: true, data };
|
|
34
27
|
}
|
|
35
28
|
catch (err) {
|
|
36
|
-
return { ok: false, error: err
|
|
29
|
+
return { ok: false, error: err.message || "Request failed" };
|
|
37
30
|
}
|
|
38
31
|
}
|
|
39
|
-
// Tool
|
|
32
|
+
// ── Tool Definitions ────────────────────────────────────────────────────────
|
|
40
33
|
const tools = [
|
|
34
|
+
// Account
|
|
41
35
|
{
|
|
42
|
-
name: "
|
|
43
|
-
description: "
|
|
36
|
+
name: "vibekit_account",
|
|
37
|
+
description: "Get account info: plan, balance, session usage.",
|
|
38
|
+
inputSchema: { type: "object", properties: {} },
|
|
39
|
+
},
|
|
40
|
+
// Apps
|
|
41
|
+
{
|
|
42
|
+
name: "vibekit_list_apps",
|
|
43
|
+
description: "List all your hosted apps with status and URLs.",
|
|
44
|
+
inputSchema: { type: "object", properties: {} },
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "vibekit_app_info",
|
|
48
|
+
description: "Get details about a specific app.",
|
|
49
|
+
inputSchema: {
|
|
50
|
+
type: "object",
|
|
51
|
+
properties: { slug: { type: "string", description: "App subdomain slug or full UUID" } },
|
|
52
|
+
required: ["slug"],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
// Agent Chat
|
|
56
|
+
{
|
|
57
|
+
name: "vibekit_chat",
|
|
58
|
+
description: "Send a message to an app's AI agent. The agent can modify code, deploy, fix bugs, add features.",
|
|
44
59
|
inputSchema: {
|
|
45
60
|
type: "object",
|
|
46
61
|
properties: {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
description: "What you want built or changed. Be specific about features, design, and behavior.",
|
|
50
|
-
},
|
|
51
|
-
repo: {
|
|
52
|
-
type: "string",
|
|
53
|
-
description: "GitHub repo in format 'owner/repo'. Optional — will use user's current repo if not specified.",
|
|
54
|
-
},
|
|
55
|
-
branch: {
|
|
56
|
-
type: "string",
|
|
57
|
-
description: "Git branch to work on. Default: main",
|
|
58
|
-
},
|
|
59
|
-
deploy: {
|
|
60
|
-
type: "boolean",
|
|
61
|
-
description: "Auto-deploy to Vercel when done. Default: true",
|
|
62
|
-
},
|
|
63
|
-
callbackUrl: {
|
|
64
|
-
type: "string",
|
|
65
|
-
description: "Webhook URL to receive task completion notification.",
|
|
66
|
-
},
|
|
62
|
+
slug: { type: "string", description: "App subdomain slug" },
|
|
63
|
+
message: { type: "string", description: "Message for the AI agent" },
|
|
67
64
|
},
|
|
68
|
-
required: ["
|
|
65
|
+
required: ["slug", "message"],
|
|
69
66
|
},
|
|
70
67
|
},
|
|
71
68
|
{
|
|
72
|
-
name: "
|
|
73
|
-
description: "Get the status and
|
|
69
|
+
name: "vibekit_agent_status",
|
|
70
|
+
description: "Get the AI agent's status and model info for an app.",
|
|
71
|
+
inputSchema: {
|
|
72
|
+
type: "object",
|
|
73
|
+
properties: { slug: { type: "string", description: "App subdomain slug" } },
|
|
74
|
+
required: ["slug"],
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
// Deploy
|
|
78
|
+
{
|
|
79
|
+
name: "vibekit_deploy",
|
|
80
|
+
description: "Trigger a redeploy for an app.",
|
|
81
|
+
inputSchema: {
|
|
82
|
+
type: "object",
|
|
83
|
+
properties: { slug: { type: "string", description: "App subdomain slug" } },
|
|
84
|
+
required: ["slug"],
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "vibekit_deploys",
|
|
89
|
+
description: "List deploy history for an app.",
|
|
90
|
+
inputSchema: {
|
|
91
|
+
type: "object",
|
|
92
|
+
properties: { slug: { type: "string", description: "App subdomain slug" } },
|
|
93
|
+
required: ["slug"],
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "vibekit_rollback",
|
|
98
|
+
description: "Rollback an app to a previous deploy.",
|
|
74
99
|
inputSchema: {
|
|
75
100
|
type: "object",
|
|
76
101
|
properties: {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
description: "The task ID returned from vibekit_submit_task",
|
|
80
|
-
},
|
|
102
|
+
slug: { type: "string", description: "App subdomain slug" },
|
|
103
|
+
deployId: { type: "string", description: "Deploy ID to rollback to" },
|
|
81
104
|
},
|
|
82
|
-
required: ["
|
|
105
|
+
required: ["slug", "deployId"],
|
|
83
106
|
},
|
|
84
107
|
},
|
|
108
|
+
// Logs
|
|
85
109
|
{
|
|
86
|
-
name: "
|
|
87
|
-
description: "
|
|
110
|
+
name: "vibekit_logs",
|
|
111
|
+
description: "Get recent logs for an app.",
|
|
88
112
|
inputSchema: {
|
|
89
113
|
type: "object",
|
|
90
114
|
properties: {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
description: "Max number of tasks to return. Default: 10",
|
|
94
|
-
},
|
|
95
|
-
status: {
|
|
96
|
-
type: "string",
|
|
97
|
-
enum: ["pending", "running", "completed", "failed"],
|
|
98
|
-
description: "Filter by status",
|
|
99
|
-
},
|
|
115
|
+
slug: { type: "string", description: "App subdomain slug" },
|
|
116
|
+
lines: { type: "number", description: "Number of lines (default 50)" },
|
|
100
117
|
},
|
|
118
|
+
required: ["slug"],
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
// Container control
|
|
122
|
+
{
|
|
123
|
+
name: "vibekit_start",
|
|
124
|
+
description: "Start an app's container.",
|
|
125
|
+
inputSchema: {
|
|
126
|
+
type: "object",
|
|
127
|
+
properties: { slug: { type: "string", description: "App subdomain slug" } },
|
|
128
|
+
required: ["slug"],
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: "vibekit_stop",
|
|
133
|
+
description: "Stop an app's container.",
|
|
134
|
+
inputSchema: {
|
|
135
|
+
type: "object",
|
|
136
|
+
properties: { slug: { type: "string", description: "App subdomain slug" } },
|
|
137
|
+
required: ["slug"],
|
|
101
138
|
},
|
|
102
139
|
},
|
|
103
140
|
{
|
|
104
|
-
name: "
|
|
105
|
-
description: "
|
|
141
|
+
name: "vibekit_restart",
|
|
142
|
+
description: "Restart an app's container.",
|
|
143
|
+
inputSchema: {
|
|
144
|
+
type: "object",
|
|
145
|
+
properties: { slug: { type: "string", description: "App subdomain slug" } },
|
|
146
|
+
required: ["slug"],
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
// Env vars
|
|
150
|
+
{
|
|
151
|
+
name: "vibekit_env_list",
|
|
152
|
+
description: "List environment variables for an app.",
|
|
106
153
|
inputSchema: {
|
|
107
154
|
type: "object",
|
|
108
155
|
properties: {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
description: "The task ID to wait for",
|
|
112
|
-
},
|
|
113
|
-
timeoutSeconds: {
|
|
114
|
-
type: "number",
|
|
115
|
-
description: "Max seconds to wait. Default: 300 (5 minutes)",
|
|
116
|
-
},
|
|
156
|
+
slug: { type: "string", description: "App subdomain slug" },
|
|
157
|
+
reveal: { type: "boolean", description: "Show real values instead of masked" },
|
|
117
158
|
},
|
|
118
|
-
required: ["
|
|
159
|
+
required: ["slug"],
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: "vibekit_env_set",
|
|
164
|
+
description: "Set an environment variable.",
|
|
165
|
+
inputSchema: {
|
|
166
|
+
type: "object",
|
|
167
|
+
properties: {
|
|
168
|
+
slug: { type: "string", description: "App subdomain slug" },
|
|
169
|
+
key: { type: "string", description: "Variable name" },
|
|
170
|
+
value: { type: "string", description: "Variable value" },
|
|
171
|
+
},
|
|
172
|
+
required: ["slug", "key", "value"],
|
|
119
173
|
},
|
|
120
174
|
},
|
|
121
175
|
{
|
|
122
|
-
name: "
|
|
123
|
-
description: "
|
|
176
|
+
name: "vibekit_env_delete",
|
|
177
|
+
description: "Delete an environment variable.",
|
|
124
178
|
inputSchema: {
|
|
125
179
|
type: "object",
|
|
126
180
|
properties: {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
description: "What to do on each run. e.g., 'Improve SEO and page speed'",
|
|
130
|
-
},
|
|
131
|
-
repo: {
|
|
132
|
-
type: "string",
|
|
133
|
-
description: "GitHub repo in format 'owner/repo'",
|
|
134
|
-
},
|
|
135
|
-
cron: {
|
|
136
|
-
type: "string",
|
|
137
|
-
description: "Cron expression. e.g., '0 9 * * 1' for every Monday at 9am UTC",
|
|
138
|
-
},
|
|
139
|
-
name: {
|
|
140
|
-
type: "string",
|
|
141
|
-
description: "Friendly name for the schedule",
|
|
142
|
-
},
|
|
181
|
+
slug: { type: "string", description: "App subdomain slug" },
|
|
182
|
+
key: { type: "string", description: "Variable name to delete" },
|
|
143
183
|
},
|
|
144
|
-
required: ["
|
|
184
|
+
required: ["slug", "key"],
|
|
145
185
|
},
|
|
146
186
|
},
|
|
187
|
+
// Database
|
|
147
188
|
{
|
|
148
|
-
name: "
|
|
149
|
-
description: "
|
|
189
|
+
name: "vibekit_db_status",
|
|
190
|
+
description: "Get database status for an app (tables, size, connections).",
|
|
150
191
|
inputSchema: {
|
|
151
192
|
type: "object",
|
|
152
|
-
properties: {},
|
|
193
|
+
properties: { slug: { type: "string", description: "App subdomain slug" } },
|
|
194
|
+
required: ["slug"],
|
|
153
195
|
},
|
|
154
196
|
},
|
|
155
197
|
{
|
|
156
|
-
name: "
|
|
157
|
-
description: "
|
|
198
|
+
name: "vibekit_db_schema",
|
|
199
|
+
description: "Get database schema — tables, columns, types, foreign keys.",
|
|
200
|
+
inputSchema: {
|
|
201
|
+
type: "object",
|
|
202
|
+
properties: { slug: { type: "string", description: "App subdomain slug" } },
|
|
203
|
+
required: ["slug"],
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
name: "vibekit_db_query",
|
|
208
|
+
description: "Run a read-only SQL query against an app's database.",
|
|
158
209
|
inputSchema: {
|
|
159
210
|
type: "object",
|
|
160
211
|
properties: {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
description: "The schedule ID to delete",
|
|
164
|
-
},
|
|
212
|
+
slug: { type: "string", description: "App subdomain slug" },
|
|
213
|
+
sql: { type: "string", description: "SQL query (SELECT only)" },
|
|
165
214
|
},
|
|
166
|
-
required: ["
|
|
215
|
+
required: ["slug", "sql"],
|
|
167
216
|
},
|
|
168
217
|
},
|
|
169
218
|
{
|
|
170
|
-
name: "
|
|
171
|
-
description: "
|
|
219
|
+
name: "vibekit_db_table",
|
|
220
|
+
description: "Browse data in a specific table.",
|
|
221
|
+
inputSchema: {
|
|
222
|
+
type: "object",
|
|
223
|
+
properties: {
|
|
224
|
+
slug: { type: "string", description: "App subdomain slug" },
|
|
225
|
+
table: { type: "string", description: "Table name" },
|
|
226
|
+
limit: { type: "number", description: "Max rows (default 20)" },
|
|
227
|
+
},
|
|
228
|
+
required: ["slug", "table"],
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
// Files
|
|
232
|
+
{
|
|
233
|
+
name: "vibekit_files",
|
|
234
|
+
description: "Browse workspace files for an app.",
|
|
172
235
|
inputSchema: {
|
|
173
236
|
type: "object",
|
|
174
|
-
properties: {
|
|
237
|
+
properties: {
|
|
238
|
+
slug: { type: "string", description: "App subdomain slug" },
|
|
239
|
+
path: { type: "string", description: "Directory path (default: root)" },
|
|
240
|
+
},
|
|
241
|
+
required: ["slug"],
|
|
175
242
|
},
|
|
176
243
|
},
|
|
244
|
+
// QA
|
|
177
245
|
{
|
|
178
|
-
name: "
|
|
179
|
-
description: "
|
|
246
|
+
name: "vibekit_qa",
|
|
247
|
+
description: "Run a QA audit on an app — checks for bugs, accessibility, performance issues.",
|
|
248
|
+
inputSchema: {
|
|
249
|
+
type: "object",
|
|
250
|
+
properties: { slug: { type: "string", description: "App subdomain slug" } },
|
|
251
|
+
required: ["slug"],
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
// Domain
|
|
255
|
+
{
|
|
256
|
+
name: "vibekit_set_domain",
|
|
257
|
+
description: "Set a custom domain for an app.",
|
|
180
258
|
inputSchema: {
|
|
181
259
|
type: "object",
|
|
182
260
|
properties: {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
description: "Filter skills by tag (e.g., 'react', 'database', 'security')",
|
|
186
|
-
},
|
|
261
|
+
slug: { type: "string", description: "App subdomain slug" },
|
|
262
|
+
domain: { type: "string", description: "Custom domain (e.g. myapp.com)" },
|
|
187
263
|
},
|
|
264
|
+
required: ["slug", "domain"],
|
|
188
265
|
},
|
|
189
266
|
},
|
|
267
|
+
// Tasks (headless API)
|
|
190
268
|
{
|
|
191
|
-
name: "
|
|
192
|
-
description: "
|
|
269
|
+
name: "vibekit_submit_task",
|
|
270
|
+
description: "Submit a coding task. An AI agent will build code and deploy it.",
|
|
193
271
|
inputSchema: {
|
|
194
272
|
type: "object",
|
|
195
273
|
properties: {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
},
|
|
274
|
+
task: { type: "string", description: "What to build or change" },
|
|
275
|
+
repo: { type: "string", description: "GitHub repo (owner/repo)" },
|
|
276
|
+
branch: { type: "string", description: "Branch (default: main)" },
|
|
200
277
|
},
|
|
201
|
-
required: ["
|
|
278
|
+
required: ["task"],
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
name: "vibekit_task_status",
|
|
283
|
+
description: "Check status of a submitted task.",
|
|
284
|
+
inputSchema: {
|
|
285
|
+
type: "object",
|
|
286
|
+
properties: { taskId: { type: "string", description: "Task ID" } },
|
|
287
|
+
required: ["taskId"],
|
|
202
288
|
},
|
|
203
289
|
},
|
|
204
290
|
];
|
|
205
|
-
// Tool
|
|
291
|
+
// ── Tool Handlers ───────────────────────────────────────────────────────────
|
|
206
292
|
async function handleTool(name, args) {
|
|
207
293
|
let result;
|
|
294
|
+
const s = args.slug;
|
|
295
|
+
const h = `/hosting/app/${s}`;
|
|
208
296
|
switch (name) {
|
|
209
|
-
case "
|
|
210
|
-
result = await
|
|
211
|
-
task: args.task,
|
|
212
|
-
repo: args.repo,
|
|
213
|
-
branch: args.branch,
|
|
214
|
-
deploy: args.deploy ?? true,
|
|
215
|
-
callbackUrl: args.callbackUrl,
|
|
216
|
-
});
|
|
297
|
+
case "vibekit_account":
|
|
298
|
+
result = await api("GET", "/account");
|
|
217
299
|
break;
|
|
218
|
-
case "
|
|
219
|
-
result = await
|
|
300
|
+
case "vibekit_list_apps":
|
|
301
|
+
result = await api("GET", "/hosting/apps");
|
|
220
302
|
break;
|
|
221
|
-
case "
|
|
222
|
-
|
|
223
|
-
const params = new URLSearchParams();
|
|
224
|
-
if (args.limit)
|
|
225
|
-
params.set("limit", String(args.limit));
|
|
226
|
-
if (args.status)
|
|
227
|
-
params.set("status", String(args.status));
|
|
228
|
-
if (params.toString())
|
|
229
|
-
path += `?${params.toString()}`;
|
|
230
|
-
result = await apiRequest("GET", path);
|
|
303
|
+
case "vibekit_app_info":
|
|
304
|
+
result = await api("GET", h);
|
|
231
305
|
break;
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
const taskId = args.taskId;
|
|
235
|
-
const timeout = (args.timeoutSeconds || 300) * 1000;
|
|
236
|
-
const start = Date.now();
|
|
237
|
-
while (Date.now() - start < timeout) {
|
|
238
|
-
result = await apiRequest("GET", `/task/${taskId}`);
|
|
239
|
-
if (!result.ok)
|
|
240
|
-
break;
|
|
241
|
-
const task = result.data;
|
|
242
|
-
if (task.status === "completed" || task.status === "failed") {
|
|
243
|
-
break;
|
|
244
|
-
}
|
|
245
|
-
await new Promise((r) => setTimeout(r, 5000));
|
|
246
|
-
}
|
|
247
|
-
if (!result) {
|
|
248
|
-
result = { ok: false, error: "Timeout waiting for task" };
|
|
249
|
-
}
|
|
306
|
+
case "vibekit_chat":
|
|
307
|
+
result = await api("POST", `${h}/agent`, { message: args.message });
|
|
250
308
|
break;
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
result = await apiRequest("POST", "/schedule", {
|
|
254
|
-
task: args.task,
|
|
255
|
-
repo: args.repo,
|
|
256
|
-
cron: args.cron,
|
|
257
|
-
name: args.name,
|
|
258
|
-
});
|
|
309
|
+
case "vibekit_agent_status":
|
|
310
|
+
result = await api("GET", `${h}/agent/status`);
|
|
259
311
|
break;
|
|
260
|
-
case "
|
|
261
|
-
result = await
|
|
312
|
+
case "vibekit_deploy":
|
|
313
|
+
result = await api("POST", `${h}/redeploy`);
|
|
262
314
|
break;
|
|
263
|
-
case "
|
|
264
|
-
result = await
|
|
315
|
+
case "vibekit_deploys":
|
|
316
|
+
result = await api("GET", `${h}/deploys`);
|
|
265
317
|
break;
|
|
266
|
-
case "
|
|
267
|
-
result = await
|
|
318
|
+
case "vibekit_rollback":
|
|
319
|
+
result = await api("POST", `${h}/deploys/${args.deployId}/rollback`);
|
|
320
|
+
break;
|
|
321
|
+
case "vibekit_logs":
|
|
322
|
+
result = await api("GET", `${h}/logs?lines=${args.lines || 50}`);
|
|
323
|
+
break;
|
|
324
|
+
case "vibekit_start":
|
|
325
|
+
result = await api("POST", `${h}/start`);
|
|
326
|
+
break;
|
|
327
|
+
case "vibekit_stop":
|
|
328
|
+
result = await api("POST", `${h}/stop`);
|
|
329
|
+
break;
|
|
330
|
+
case "vibekit_restart":
|
|
331
|
+
result = await api("POST", `${h}/restart`);
|
|
332
|
+
break;
|
|
333
|
+
case "vibekit_env_list":
|
|
334
|
+
result = await api("GET", `${h}/env${args.reveal ? '?reveal=true' : ''}`);
|
|
335
|
+
break;
|
|
336
|
+
case "vibekit_env_set":
|
|
337
|
+
result = await api("POST", `${h}/env`, { vars: { [args.key]: args.value } });
|
|
338
|
+
break;
|
|
339
|
+
case "vibekit_env_delete":
|
|
340
|
+
result = await api("DELETE", `${h}/env/${args.key}`);
|
|
268
341
|
break;
|
|
269
|
-
case "
|
|
270
|
-
|
|
271
|
-
// Check cache
|
|
272
|
-
if (skillsCache && Date.now() - skillsCache.fetchedAt < CACHE_TTL) {
|
|
273
|
-
let skills = skillsCache.manifest.skills;
|
|
274
|
-
if (args.tag) {
|
|
275
|
-
skills = skills.filter((s) => s.tags?.includes(args.tag));
|
|
276
|
-
}
|
|
277
|
-
result = { ok: true, data: { skills } };
|
|
278
|
-
break;
|
|
279
|
-
}
|
|
280
|
-
// Fetch manifest
|
|
281
|
-
const res = await fetch(`${SKILLS_REGISTRY}/skills.json`);
|
|
282
|
-
if (!res.ok) {
|
|
283
|
-
result = { ok: false, error: `Failed to fetch skills: ${res.status}` };
|
|
284
|
-
break;
|
|
285
|
-
}
|
|
286
|
-
const manifest = await res.json();
|
|
287
|
-
skillsCache = { manifest, fetchedAt: Date.now() };
|
|
288
|
-
let skills = manifest.skills;
|
|
289
|
-
if (args.tag) {
|
|
290
|
-
skills = skills.filter((s) => s.tags?.includes(args.tag));
|
|
291
|
-
}
|
|
292
|
-
result = { ok: true, data: { skills, count: skills.length } };
|
|
293
|
-
}
|
|
294
|
-
catch (err) {
|
|
295
|
-
result = { ok: false, error: err instanceof Error ? err.message : "Unknown error" };
|
|
296
|
-
}
|
|
342
|
+
case "vibekit_db_status":
|
|
343
|
+
result = await api("GET", `${h}/database`);
|
|
297
344
|
break;
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
try {
|
|
301
|
-
const id = args.id;
|
|
302
|
-
if (!id) {
|
|
303
|
-
result = { ok: false, error: "Skill ID is required" };
|
|
304
|
-
break;
|
|
305
|
-
}
|
|
306
|
-
const res = await fetch(`${SKILLS_REGISTRY}/skills/${id}/SKILL.md`);
|
|
307
|
-
if (!res.ok) {
|
|
308
|
-
result = { ok: false, error: `Skill '${id}' not found (${res.status})` };
|
|
309
|
-
break;
|
|
310
|
-
}
|
|
311
|
-
const content = await res.text();
|
|
312
|
-
result = { ok: true, data: { id, content } };
|
|
313
|
-
}
|
|
314
|
-
catch (err) {
|
|
315
|
-
result = { ok: false, error: err instanceof Error ? err.message : "Unknown error" };
|
|
316
|
-
}
|
|
345
|
+
case "vibekit_db_schema":
|
|
346
|
+
result = await api("GET", `${h}/database/schema`);
|
|
317
347
|
break;
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
348
|
+
case "vibekit_db_query":
|
|
349
|
+
result = await api("POST", `${h}/database/query`, { sql: args.sql });
|
|
350
|
+
break;
|
|
351
|
+
case "vibekit_db_table":
|
|
352
|
+
result = await api("GET", `${h}/database/tables/${args.table}?limit=${args.limit || 20}`);
|
|
353
|
+
break;
|
|
354
|
+
case "vibekit_files":
|
|
355
|
+
result = await api("GET", `${h}/agent/files${args.path ? `?path=${encodeURIComponent(args.path)}` : ''}`);
|
|
356
|
+
break;
|
|
357
|
+
case "vibekit_qa":
|
|
358
|
+
result = await api("POST", `${h}/qa`);
|
|
359
|
+
break;
|
|
360
|
+
case "vibekit_set_domain":
|
|
361
|
+
result = await api("POST", `${h}/domain`, { domain: args.domain });
|
|
362
|
+
break;
|
|
363
|
+
case "vibekit_submit_task":
|
|
364
|
+
result = await api("POST", "/task", { prompt: args.task, repo: args.repo, branch: args.branch });
|
|
365
|
+
break;
|
|
366
|
+
case "vibekit_task_status":
|
|
367
|
+
result = await api("GET", `/task/${args.taskId}`);
|
|
368
|
+
break;
|
|
369
|
+
default: result = { ok: false, error: `Unknown tool: ${name}` };
|
|
321
370
|
}
|
|
322
|
-
const text = result.ok
|
|
323
|
-
? JSON.stringify(result.data, null, 2)
|
|
324
|
-
: `Error: ${result.error}`;
|
|
371
|
+
const text = result.ok ? JSON.stringify(result.data, null, 2) : `Error: ${result.error}`;
|
|
325
372
|
return { content: [{ type: "text", text }] };
|
|
326
373
|
}
|
|
327
|
-
//
|
|
328
|
-
const server = new index_js_1.Server({
|
|
329
|
-
|
|
330
|
-
version: "0.1.0",
|
|
331
|
-
}, {
|
|
332
|
-
capabilities: {
|
|
333
|
-
tools: {},
|
|
334
|
-
},
|
|
335
|
-
});
|
|
336
|
-
// Handle tool listing
|
|
337
|
-
server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => ({
|
|
338
|
-
tools,
|
|
339
|
-
}));
|
|
340
|
-
// Handle tool calls
|
|
374
|
+
// ── Server ──────────────────────────────────────────────────────────────────
|
|
375
|
+
const server = new index_js_1.Server({ name: "vibekit-mcp", version: "0.3.0" }, { capabilities: { tools: {} } });
|
|
376
|
+
server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => ({ tools }));
|
|
341
377
|
server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
342
378
|
const { name, arguments: args } = request.params;
|
|
343
379
|
return handleTool(name, (args || {}));
|
|
344
380
|
});
|
|
345
|
-
// Start server
|
|
346
381
|
async function main() {
|
|
347
382
|
const transport = new stdio_js_1.StdioServerTransport();
|
|
348
383
|
await server.connect(transport);
|
|
349
384
|
console.error("VibeKit MCP server running on stdio");
|
|
350
385
|
}
|
|
351
|
-
main().catch((err) => {
|
|
352
|
-
console.error("Fatal error:", err);
|
|
353
|
-
process.exit(1);
|
|
354
|
-
});
|
|
386
|
+
main().catch((err) => { console.error("Fatal:", err); process.exit(1); });
|
package/package.json
CHANGED
|
@@ -1,41 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibekit-mcp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "MCP server for VibeKit —
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "MCP server for VibeKit — manage AI-powered apps as tools in Claude Desktop, Cursor, Windsurf, etc.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"README.md"
|
|
12
|
-
],
|
|
13
|
-
"scripts": {
|
|
14
|
-
"build": "tsc",
|
|
15
|
-
"prepublishOnly": "npm run build"
|
|
16
|
-
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"mcp",
|
|
19
|
-
"vibekit",
|
|
20
|
-
"claude",
|
|
21
|
-
"ai",
|
|
22
|
-
"coding",
|
|
23
|
-
"tools",
|
|
24
|
-
"anthropic"
|
|
25
|
-
],
|
|
26
|
-
"author": "609.sol",
|
|
6
|
+
"bin": { "vibekit-mcp": "./dist/index.js" },
|
|
7
|
+
"files": ["dist/", "README.md"],
|
|
8
|
+
"scripts": { "build": "tsc", "prepublishOnly": "npm run build" },
|
|
9
|
+
"keywords": ["mcp", "vibekit", "claude", "cursor", "ai", "agent", "deploy", "model-context-protocol"],
|
|
10
|
+
"author": "VibeKit",
|
|
27
11
|
"license": "MIT",
|
|
28
|
-
"repository": {
|
|
29
|
-
"type": "git",
|
|
30
|
-
"url": "https://github.com/609NFT/vibekit.git",
|
|
31
|
-
"directory": "packages/mcp-server"
|
|
32
|
-
},
|
|
33
12
|
"homepage": "https://vibekit.bot",
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"@types/node": "^20.0.0",
|
|
39
|
-
"typescript": "^5.0.0"
|
|
40
|
-
}
|
|
13
|
+
"repository": { "type": "git", "url": "https://github.com/vibekit-apps/vibekit-mcp" },
|
|
14
|
+
"dependencies": { "@modelcontextprotocol/sdk": "^1.0.0" },
|
|
15
|
+
"devDependencies": { "typescript": "^5.0.0", "@types/node": "^22.0.0" }
|
|
41
16
|
}
|