@vibesharingapp/mcp-server 0.6.1 → 0.7.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.
Files changed (2) hide show
  1. package/dist/index.js +142 -1
  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",
@@ -321,7 +330,7 @@ const client = new VibesharingClient(VIBESHARING_URL, VIBESHARING_TOKEN);
321
330
  // Create MCP server
322
331
  const server = new index_js_1.Server({
323
332
  name: "vibesharing",
324
- version: "0.6.1",
333
+ version: "0.7.0",
325
334
  }, {
326
335
  capabilities: {
327
336
  tools: {},
@@ -794,6 +803,36 @@ server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
794
803
  required: ["project_id"],
795
804
  },
796
805
  },
806
+ {
807
+ name: "diagnose",
808
+ 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.",
809
+ inputSchema: {
810
+ type: "object",
811
+ properties: {},
812
+ },
813
+ },
814
+ {
815
+ name: "send_support_request",
816
+ 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.",
817
+ inputSchema: {
818
+ type: "object",
819
+ properties: {
820
+ subject: {
821
+ type: "string",
822
+ description: "Short subject line for the support request",
823
+ },
824
+ description: {
825
+ type: "string",
826
+ description: "Detailed description of the issue or request",
827
+ },
828
+ context: {
829
+ type: "string",
830
+ description: "Optional: Session context, error messages, or relevant logs to help debug the issue",
831
+ },
832
+ },
833
+ required: ["subject", "description"],
834
+ },
835
+ },
797
836
  ],
798
837
  };
799
838
  });
@@ -1564,6 +1603,108 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
1564
1603
  content: [{ type: "text", text: lines.join("\n") }],
1565
1604
  };
1566
1605
  }
1606
+ case "diagnose": {
1607
+ const result = await client.diagnose();
1608
+ const lines = [
1609
+ "VibeSharing Health Check",
1610
+ "========================",
1611
+ ];
1612
+ // Token status
1613
+ if (result.token?.valid) {
1614
+ lines.push(`\u2713 Token: valid (org: ${result.token.org}, role: ${result.token.role})`);
1615
+ }
1616
+ else {
1617
+ lines.push(`\u2717 Token: invalid — ${result.token?.error || "unknown error"}`);
1618
+ }
1619
+ // GitHub status
1620
+ if (result.github?.connected) {
1621
+ lines.push(`\u2713 GitHub: connected (@${result.github.username})`);
1622
+ }
1623
+ else {
1624
+ lines.push(`\u2717 GitHub: not connected — connect at ${VIBESHARING_URL}/dashboard/account`);
1625
+ }
1626
+ // Deploy locks
1627
+ if (result.deploy_locks?.stuck > 0) {
1628
+ const cleared = result.deploy_locks.cleared || 0;
1629
+ const names = (result.deploy_locks.prototypes || [])
1630
+ .map((p) => p.name)
1631
+ .join(", ");
1632
+ if (cleared > 0) {
1633
+ lines.push(`\u2717 Deploy locks: ${result.deploy_locks.stuck} stuck lock(s) found on: ${names} — cleared ${cleared}`);
1634
+ }
1635
+ else {
1636
+ lines.push(`\u2717 Deploy locks: ${result.deploy_locks.stuck} stuck lock(s) on: ${names}`);
1637
+ }
1638
+ }
1639
+ else {
1640
+ lines.push(`\u2713 Deploy locks: none`);
1641
+ }
1642
+ // Recent deploys
1643
+ const successful = result.recent_deploys?.successful || 0;
1644
+ const failed = result.recent_deploys?.failed || 0;
1645
+ if (failed > 0) {
1646
+ lines.push(`\u26A0 Recent deploys (24h): ${successful} successful, ${failed} failed`);
1647
+ const errors = result.recent_deploys?.errors || [];
1648
+ for (const err of errors.slice(0, 3)) {
1649
+ lines.push(` - ${err.error_type}: ${err.error_message || "no details"}`);
1650
+ }
1651
+ }
1652
+ else {
1653
+ lines.push(`\u2713 Recent deploys (24h): ${successful} successful, 0 failed`);
1654
+ }
1655
+ // Prototypes
1656
+ const total = result.prototypes?.total || 0;
1657
+ const withoutUrl = result.prototypes?.without_url || 0;
1658
+ if (withoutUrl > 0 && total > 0) {
1659
+ lines.push(`\u26A0 Prototypes: ${withoutUrl} of ${total} not deployed yet`);
1660
+ }
1661
+ else {
1662
+ lines.push(`\u2713 Prototypes: ${total} total, all have deploy URLs`);
1663
+ }
1664
+ // Issues summary
1665
+ const issues = [];
1666
+ if (!result.token?.valid)
1667
+ issues.push("Token is invalid. Get a new one from Account Settings.");
1668
+ if (!result.github?.connected)
1669
+ issues.push("GitHub not connected. Connect at Account Settings to enable Push to Deploy.");
1670
+ if (result.deploy_locks?.cleared > 0) {
1671
+ issues.push(`${result.deploy_locks.cleared} stuck deploy lock(s) were cleared. Retry your deploy.`);
1672
+ }
1673
+ if (failed > 0)
1674
+ issues.push(`${failed} deploy error(s) in the last 24h. Check the errors above.`);
1675
+ if (issues.length > 0) {
1676
+ lines.push("", "Issues found:");
1677
+ for (const issue of issues) {
1678
+ lines.push(`- ${issue}`);
1679
+ }
1680
+ }
1681
+ else {
1682
+ lines.push("", "No issues found. Everything looks good!");
1683
+ }
1684
+ return {
1685
+ content: [{ type: "text", text: lines.join("\n") }],
1686
+ };
1687
+ }
1688
+ case "send_support_request": {
1689
+ const { subject, description, context } = args;
1690
+ if (!subject || !description) {
1691
+ return {
1692
+ content: [{ type: "text", text: "Error: subject and description are required." }],
1693
+ isError: true,
1694
+ };
1695
+ }
1696
+ const result = await client.sendSupportRequest({ subject, description, context });
1697
+ return {
1698
+ content: [
1699
+ {
1700
+ type: "text",
1701
+ text: result.sent
1702
+ ? `Support request sent!\n\nSubject: ${subject}\n\n${result.message}`
1703
+ : `Support request logged but email delivery had an issue.\n\nSubject: ${subject}\n\n${result.message}`,
1704
+ },
1705
+ ],
1706
+ };
1707
+ }
1567
1708
  default:
1568
1709
  return {
1569
1710
  content: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibesharingapp/mcp-server",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "description": "MCP server for VibeSharing - register prototypes and get feedback directly from Claude Code",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",