@tekyzinc/gsd-t 2.55.10 → 2.55.11

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/bin/gsd-t.js +24 -14
  2. package/package.json +1 -1
package/bin/gsd-t.js CHANGED
@@ -520,28 +520,38 @@ function configureAutoRouteHook(scriptPath) {
520
520
  // ─── Figma MCP ──────────────────────────────────────────────────────────────
521
521
 
522
522
  const FIGMA_MCP_URL = "https://mcp.figma.com/mcp";
523
+ const CLAUDE_JSON = path.join(os.homedir(), ".claude.json");
523
524
 
524
525
  function configureFigmaMcp() {
525
- const parsed = readSettingsJson();
526
- if (parsed === null && fs.existsSync(SETTINGS_JSON)) {
527
- warn("settings.json has invalid JSON — cannot configure Figma MCP");
528
- return;
529
- }
530
- const settings = parsed || {};
526
+ // Check ~/.claude.json (where `claude mcp add` stores servers)
527
+ try {
528
+ if (fs.existsSync(CLAUDE_JSON)) {
529
+ const cj = JSON.parse(fs.readFileSync(CLAUDE_JSON, "utf8"));
530
+ if (cj.mcpServers && cj.mcpServers.figma) {
531
+ info("Figma MCP already configured");
532
+ return;
533
+ }
534
+ }
535
+ } catch { /* ignore parse errors */ }
531
536
 
537
+ // Also check settings.json (legacy location)
538
+ const settings = readSettingsJson() || {};
532
539
  if (settings.mcpServers && settings.mcpServers.figma) {
533
- info("Figma MCP already configured");
540
+ info("Figma MCP already configured (settings.json)");
534
541
  return;
535
542
  }
536
543
 
537
- if (!settings.mcpServers) settings.mcpServers = {};
538
- settings.mcpServers.figma = { url: FIGMA_MCP_URL };
539
-
540
- if (!isSymlink(SETTINGS_JSON)) {
541
- fs.writeFileSync(SETTINGS_JSON, JSON.stringify(settings, null, 2));
544
+ // Add via `claude mcp add` for proper OAuth registration
545
+ try {
546
+ execFileSync("claude", ["mcp", "add", "--transport", "http", "-s", "user", "figma", FIGMA_MCP_URL], {
547
+ encoding: "utf8",
548
+ timeout: 10000,
549
+ });
542
550
  success("Figma MCP configured (remote: " + FIGMA_MCP_URL + ")");
543
- } else {
544
- warn("Skipping settings.json write — target is a symlink");
551
+ info("Authenticate with Figma on next session start (browser OAuth)");
552
+ } catch {
553
+ warn("Could not auto-configure Figma MCP — add manually:");
554
+ log(` ${DIM}$${RESET} claude mcp add --transport http -s user figma ${FIGMA_MCP_URL}`);
545
555
  }
546
556
  }
547
557
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekyzinc/gsd-t",
3
- "version": "2.55.10",
3
+ "version": "2.55.11",
4
4
  "description": "GSD-T: Contract-Driven Development for Claude Code — 51 slash commands with headless CI/CD mode, graph-powered code analysis, real-time agent dashboard, execution intelligence, task telemetry, doc-ripple enforcement, backlog management, impact analysis, test sync, milestone archival, and PRD generation",
5
5
  "author": "Tekyz, Inc.",
6
6
  "license": "MIT",