@vibesharingapp/mcp-server 0.1.0 → 0.2.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/dist/index.js +67 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49,6 +49,17 @@ class VibesharingClient {
|
|
|
49
49
|
body: JSON.stringify({ projectId, content }),
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
+
async deployPrototype(params) {
|
|
53
|
+
return this.request("/api/deploy/code", {
|
|
54
|
+
method: "POST",
|
|
55
|
+
body: JSON.stringify({
|
|
56
|
+
code: params.code,
|
|
57
|
+
prototypeName: params.prototypeName,
|
|
58
|
+
prototypeId: params.prototypeId,
|
|
59
|
+
storageOption: "auto-delete", // Store source for 7 days for handoff
|
|
60
|
+
}),
|
|
61
|
+
});
|
|
62
|
+
}
|
|
52
63
|
}
|
|
53
64
|
// Get configuration from environment
|
|
54
65
|
const VIBESHARING_URL = process.env.VIBESHARING_URL || "https://vibesharing.app";
|
|
@@ -62,7 +73,7 @@ const client = new VibesharingClient(VIBESHARING_URL, VIBESHARING_TOKEN);
|
|
|
62
73
|
// Create MCP server
|
|
63
74
|
const server = new index_js_1.Server({
|
|
64
75
|
name: "vibesharing",
|
|
65
|
-
version: "0.
|
|
76
|
+
version: "0.2.0",
|
|
66
77
|
}, {
|
|
67
78
|
capabilities: {
|
|
68
79
|
tools: {},
|
|
@@ -139,6 +150,28 @@ server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
|
|
|
139
150
|
required: ["project_id", "content"],
|
|
140
151
|
},
|
|
141
152
|
},
|
|
153
|
+
{
|
|
154
|
+
name: "deploy_prototype",
|
|
155
|
+
description: "Deploy code directly to VibeSharing. This deploys your code to Vercel and registers it as a prototype in one step. Use this when you've just built something and want to share it with the team immediately.",
|
|
156
|
+
inputSchema: {
|
|
157
|
+
type: "object",
|
|
158
|
+
properties: {
|
|
159
|
+
code: {
|
|
160
|
+
type: "string",
|
|
161
|
+
description: "The React/Next.js page code to deploy (typically a page.tsx file)",
|
|
162
|
+
},
|
|
163
|
+
name: {
|
|
164
|
+
type: "string",
|
|
165
|
+
description: "Name for the prototype (e.g., 'Checkout Flow v2')",
|
|
166
|
+
},
|
|
167
|
+
prototype_id: {
|
|
168
|
+
type: "string",
|
|
169
|
+
description: "Optional: existing prototype ID to update (creates new if not provided)",
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
required: ["code", "name"],
|
|
173
|
+
},
|
|
174
|
+
},
|
|
142
175
|
],
|
|
143
176
|
};
|
|
144
177
|
});
|
|
@@ -228,6 +261,39 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
|
228
261
|
],
|
|
229
262
|
};
|
|
230
263
|
}
|
|
264
|
+
case "deploy_prototype": {
|
|
265
|
+
const { code, name, prototype_id } = args;
|
|
266
|
+
// If no prototype_id, first register a new prototype
|
|
267
|
+
let prototypeId = prototype_id;
|
|
268
|
+
if (!prototypeId) {
|
|
269
|
+
const registered = await client.registerPrototype({ name });
|
|
270
|
+
prototypeId = registered.prototype?.id;
|
|
271
|
+
}
|
|
272
|
+
if (!prototypeId) {
|
|
273
|
+
return {
|
|
274
|
+
content: [
|
|
275
|
+
{
|
|
276
|
+
type: "text",
|
|
277
|
+
text: "Error: Could not create prototype. Please try again.",
|
|
278
|
+
},
|
|
279
|
+
],
|
|
280
|
+
isError: true,
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
const result = await client.deployPrototype({
|
|
284
|
+
code,
|
|
285
|
+
prototypeName: name,
|
|
286
|
+
prototypeId,
|
|
287
|
+
});
|
|
288
|
+
return {
|
|
289
|
+
content: [
|
|
290
|
+
{
|
|
291
|
+
type: "text",
|
|
292
|
+
text: `Deployed successfully!\n\nLive URL: ${result.deployedUrl}\nVibeSharing: ${VIBESHARING_URL}/dashboard/projects/${prototypeId}\n\nYour team can now view the prototype and leave feedback.${result.contextImported ? "\n\nCLAUDE.md was automatically imported as context." : ""}`,
|
|
293
|
+
},
|
|
294
|
+
],
|
|
295
|
+
};
|
|
296
|
+
}
|
|
231
297
|
default:
|
|
232
298
|
return {
|
|
233
299
|
content: [
|
package/package.json
CHANGED