@vibesharingapp/mcp-server 0.6.1 → 0.7.1
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 +168 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -164,6 +164,15 @@ class VibesharingClient {
|
|
|
164
164
|
method: "DELETE",
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
|
+
async diagnose() {
|
|
168
|
+
return this.request("/api/diagnose");
|
|
169
|
+
}
|
|
170
|
+
async sendSupportRequest(params) {
|
|
171
|
+
return this.request("/api/support", {
|
|
172
|
+
method: "POST",
|
|
173
|
+
body: JSON.stringify(params),
|
|
174
|
+
});
|
|
175
|
+
}
|
|
167
176
|
async generateFeedbackTopics(projectId, topics) {
|
|
168
177
|
return this.request("/api/feedback-topics", {
|
|
169
178
|
method: "POST",
|
|
@@ -234,7 +243,7 @@ function fuzzyMatch(query, items, getName, threshold = 0.3) {
|
|
|
234
243
|
.sort((a, b) => b.score - a.score);
|
|
235
244
|
}
|
|
236
245
|
// ---- Version tracking & What's New ----
|
|
237
|
-
const CURRENT_VERSION = "0.
|
|
246
|
+
const CURRENT_VERSION = "0.7.1";
|
|
238
247
|
const WHATS_NEW = {
|
|
239
248
|
"0.6.0": [
|
|
240
249
|
"🆕 VibeSharing MCP v0.6.0 — What's New:",
|
|
@@ -317,11 +326,31 @@ if (VIBESHARING_TOKEN === "vs_your_token_here" || VIBESHARING_TOKEN.length < 10)
|
|
|
317
326
|
console.error(" claude mcp add vibesharing -s user -e VIBESHARING_TOKEN=vs_YOUR_TOKEN -- npx -y @vibesharingapp/mcp-server@latest");
|
|
318
327
|
process.exit(1);
|
|
319
328
|
}
|
|
329
|
+
// Check for updates (non-blocking — runs in background)
|
|
330
|
+
let updateNotice = null;
|
|
331
|
+
(async () => {
|
|
332
|
+
try {
|
|
333
|
+
const res = await fetch("https://registry.npmjs.org/@vibesharingapp/mcp-server/latest", {
|
|
334
|
+
signal: AbortSignal.timeout(3000),
|
|
335
|
+
});
|
|
336
|
+
if (res.ok) {
|
|
337
|
+
const data = await res.json();
|
|
338
|
+
const latest = data.version;
|
|
339
|
+
if (latest && latest !== CURRENT_VERSION) {
|
|
340
|
+
updateNotice = `⚠ VibeSharing MCP server update available: ${CURRENT_VERSION} → ${latest}\n Run: claude mcp remove vibesharing && claude mcp add vibesharing -s user -e VIBESHARING_TOKEN=$VIBESHARING_TOKEN -- npx -y @vibesharingapp/mcp-server@latest\n Then restart Claude Code.`;
|
|
341
|
+
console.error(`[vibesharing] Update available: ${CURRENT_VERSION} → ${latest}`);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
catch {
|
|
346
|
+
// Silently ignore — don't block startup for a version check
|
|
347
|
+
}
|
|
348
|
+
})();
|
|
320
349
|
const client = new VibesharingClient(VIBESHARING_URL, VIBESHARING_TOKEN);
|
|
321
350
|
// Create MCP server
|
|
322
351
|
const server = new index_js_1.Server({
|
|
323
352
|
name: "vibesharing",
|
|
324
|
-
version:
|
|
353
|
+
version: CURRENT_VERSION,
|
|
325
354
|
}, {
|
|
326
355
|
capabilities: {
|
|
327
356
|
tools: {},
|
|
@@ -794,6 +823,36 @@ server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
|
|
|
794
823
|
required: ["project_id"],
|
|
795
824
|
},
|
|
796
825
|
},
|
|
826
|
+
{
|
|
827
|
+
name: "diagnose",
|
|
828
|
+
description: "Run a comprehensive health check on the user's VibeSharing setup. Checks token validity, GitHub connection, stuck deploy locks (auto-clears them), recent deploy errors, and prototype status. Use this to troubleshoot issues.",
|
|
829
|
+
inputSchema: {
|
|
830
|
+
type: "object",
|
|
831
|
+
properties: {},
|
|
832
|
+
},
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
name: "send_support_request",
|
|
836
|
+
description: "Send a support request to the VibeSharing admin. Use this when the user has an issue you can't resolve, needs a configuration change, or wants to report a bug.",
|
|
837
|
+
inputSchema: {
|
|
838
|
+
type: "object",
|
|
839
|
+
properties: {
|
|
840
|
+
subject: {
|
|
841
|
+
type: "string",
|
|
842
|
+
description: "Short subject line for the support request",
|
|
843
|
+
},
|
|
844
|
+
description: {
|
|
845
|
+
type: "string",
|
|
846
|
+
description: "Detailed description of the issue or request",
|
|
847
|
+
},
|
|
848
|
+
context: {
|
|
849
|
+
type: "string",
|
|
850
|
+
description: "Optional: Session context, error messages, or relevant logs to help debug the issue",
|
|
851
|
+
},
|
|
852
|
+
},
|
|
853
|
+
required: ["subject", "description"],
|
|
854
|
+
},
|
|
855
|
+
},
|
|
797
856
|
],
|
|
798
857
|
};
|
|
799
858
|
});
|
|
@@ -1564,6 +1623,108 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
|
1564
1623
|
content: [{ type: "text", text: lines.join("\n") }],
|
|
1565
1624
|
};
|
|
1566
1625
|
}
|
|
1626
|
+
case "diagnose": {
|
|
1627
|
+
const result = await client.diagnose();
|
|
1628
|
+
const lines = [
|
|
1629
|
+
"VibeSharing Health Check",
|
|
1630
|
+
"========================",
|
|
1631
|
+
];
|
|
1632
|
+
// Token status
|
|
1633
|
+
if (result.token?.valid) {
|
|
1634
|
+
lines.push(`\u2713 Token: valid (org: ${result.token.org}, role: ${result.token.role})`);
|
|
1635
|
+
}
|
|
1636
|
+
else {
|
|
1637
|
+
lines.push(`\u2717 Token: invalid — ${result.token?.error || "unknown error"}`);
|
|
1638
|
+
}
|
|
1639
|
+
// GitHub status
|
|
1640
|
+
if (result.github?.connected) {
|
|
1641
|
+
lines.push(`\u2713 GitHub: connected (@${result.github.username})`);
|
|
1642
|
+
}
|
|
1643
|
+
else {
|
|
1644
|
+
lines.push(`\u2717 GitHub: not connected — connect at ${VIBESHARING_URL}/dashboard/account`);
|
|
1645
|
+
}
|
|
1646
|
+
// Deploy locks
|
|
1647
|
+
if (result.deploy_locks?.stuck > 0) {
|
|
1648
|
+
const cleared = result.deploy_locks.cleared || 0;
|
|
1649
|
+
const names = (result.deploy_locks.prototypes || [])
|
|
1650
|
+
.map((p) => p.name)
|
|
1651
|
+
.join(", ");
|
|
1652
|
+
if (cleared > 0) {
|
|
1653
|
+
lines.push(`\u2717 Deploy locks: ${result.deploy_locks.stuck} stuck lock(s) found on: ${names} — cleared ${cleared}`);
|
|
1654
|
+
}
|
|
1655
|
+
else {
|
|
1656
|
+
lines.push(`\u2717 Deploy locks: ${result.deploy_locks.stuck} stuck lock(s) on: ${names}`);
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
else {
|
|
1660
|
+
lines.push(`\u2713 Deploy locks: none`);
|
|
1661
|
+
}
|
|
1662
|
+
// Recent deploys
|
|
1663
|
+
const successful = result.recent_deploys?.successful || 0;
|
|
1664
|
+
const failed = result.recent_deploys?.failed || 0;
|
|
1665
|
+
if (failed > 0) {
|
|
1666
|
+
lines.push(`\u26A0 Recent deploys (24h): ${successful} successful, ${failed} failed`);
|
|
1667
|
+
const errors = result.recent_deploys?.errors || [];
|
|
1668
|
+
for (const err of errors.slice(0, 3)) {
|
|
1669
|
+
lines.push(` - ${err.error_type}: ${err.error_message || "no details"}`);
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
else {
|
|
1673
|
+
lines.push(`\u2713 Recent deploys (24h): ${successful} successful, 0 failed`);
|
|
1674
|
+
}
|
|
1675
|
+
// Prototypes
|
|
1676
|
+
const total = result.prototypes?.total || 0;
|
|
1677
|
+
const withoutUrl = result.prototypes?.without_url || 0;
|
|
1678
|
+
if (withoutUrl > 0 && total > 0) {
|
|
1679
|
+
lines.push(`\u26A0 Prototypes: ${withoutUrl} of ${total} not deployed yet`);
|
|
1680
|
+
}
|
|
1681
|
+
else {
|
|
1682
|
+
lines.push(`\u2713 Prototypes: ${total} total, all have deploy URLs`);
|
|
1683
|
+
}
|
|
1684
|
+
// Issues summary
|
|
1685
|
+
const issues = [];
|
|
1686
|
+
if (!result.token?.valid)
|
|
1687
|
+
issues.push("Token is invalid. Get a new one from Account Settings.");
|
|
1688
|
+
if (!result.github?.connected)
|
|
1689
|
+
issues.push("GitHub not connected. Connect at Account Settings to enable Push to Deploy.");
|
|
1690
|
+
if (result.deploy_locks?.cleared > 0) {
|
|
1691
|
+
issues.push(`${result.deploy_locks.cleared} stuck deploy lock(s) were cleared. Retry your deploy.`);
|
|
1692
|
+
}
|
|
1693
|
+
if (failed > 0)
|
|
1694
|
+
issues.push(`${failed} deploy error(s) in the last 24h. Check the errors above.`);
|
|
1695
|
+
if (issues.length > 0) {
|
|
1696
|
+
lines.push("", "Issues found:");
|
|
1697
|
+
for (const issue of issues) {
|
|
1698
|
+
lines.push(`- ${issue}`);
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
else {
|
|
1702
|
+
lines.push("", "No issues found. Everything looks good!");
|
|
1703
|
+
}
|
|
1704
|
+
return {
|
|
1705
|
+
content: [{ type: "text", text: lines.join("\n") }],
|
|
1706
|
+
};
|
|
1707
|
+
}
|
|
1708
|
+
case "send_support_request": {
|
|
1709
|
+
const { subject, description, context } = args;
|
|
1710
|
+
if (!subject || !description) {
|
|
1711
|
+
return {
|
|
1712
|
+
content: [{ type: "text", text: "Error: subject and description are required." }],
|
|
1713
|
+
isError: true,
|
|
1714
|
+
};
|
|
1715
|
+
}
|
|
1716
|
+
const result = await client.sendSupportRequest({ subject, description, context });
|
|
1717
|
+
return {
|
|
1718
|
+
content: [
|
|
1719
|
+
{
|
|
1720
|
+
type: "text",
|
|
1721
|
+
text: result.sent
|
|
1722
|
+
? `Support request sent!\n\nSubject: ${subject}\n\n${result.message}`
|
|
1723
|
+
: `Support request logged but email delivery had an issue.\n\nSubject: ${subject}\n\n${result.message}`,
|
|
1724
|
+
},
|
|
1725
|
+
],
|
|
1726
|
+
};
|
|
1727
|
+
}
|
|
1567
1728
|
default:
|
|
1568
1729
|
return {
|
|
1569
1730
|
content: [
|
|
@@ -1593,6 +1754,11 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
|
1593
1754
|
toolResult.content.unshift({ type: "text", text: pendingWhatsNew + "\n\n---\n" });
|
|
1594
1755
|
pendingWhatsNew = null;
|
|
1595
1756
|
}
|
|
1757
|
+
// Prepend update notice if a newer version is available
|
|
1758
|
+
if (updateNotice && !toolResult.isError) {
|
|
1759
|
+
toolResult.content.unshift({ type: "text", text: updateNotice + "\n\n---\n" });
|
|
1760
|
+
updateNotice = null; // Only show once per session
|
|
1761
|
+
}
|
|
1596
1762
|
return toolResult;
|
|
1597
1763
|
});
|
|
1598
1764
|
// List available resources (prototypes as resources)
|
package/package.json
CHANGED