harmony-mcp 1.5.3 → 1.5.4

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/cli.js +46 -16
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -31603,9 +31603,6 @@ function mergeJsonFile(filePath, updates, options = {}) {
31603
31603
  if (updates.mcpServers && existing.mcpServers) {
31604
31604
  const existingServers = existing.mcpServers;
31605
31605
  const updateServers = updates.mcpServers;
31606
- if (existingServers.harmony && !options.force) {
31607
- return { path: filePath, action: "skip" };
31608
- }
31609
31606
  existing.mcpServers = { ...existingServers, ...updateServers };
31610
31607
  } else {
31611
31608
  Object.assign(existing, updates);
@@ -31795,6 +31792,38 @@ If pausing: \`harmony_end_agent_session\` with \`status: "paused"\`
31795
31792
 
31796
31793
  **AI:** \`harmony_generate_prompt\`, \`harmony_process_command\`
31797
31794
  `;
31795
+ async function registerMcpServer() {
31796
+ try {
31797
+ const { execSync } = await import("node:child_process");
31798
+ execSync("claude mcp add --transport stdio harmony -- harmony-mcp serve", {
31799
+ stdio: "pipe"
31800
+ });
31801
+ return true;
31802
+ } catch {
31803
+ return false;
31804
+ }
31805
+ }
31806
+ async function writeMcpConfigFallback(home) {
31807
+ const { readFileSync: readFileSync3, writeFileSync: writeFileSync3, mkdirSync: mkdirSync4, existsSync: existsSync5 } = await import("node:fs");
31808
+ const settingsPath = join3(home, ".claude", "settings.json");
31809
+ const settingsDir = dirname2(settingsPath);
31810
+ if (!existsSync5(settingsDir)) {
31811
+ mkdirSync4(settingsDir, { recursive: true });
31812
+ }
31813
+ let settings = {};
31814
+ if (existsSync5(settingsPath)) {
31815
+ try {
31816
+ settings = JSON.parse(readFileSync3(settingsPath, "utf-8"));
31817
+ } catch {}
31818
+ }
31819
+ const mcpServers = settings.mcpServers || {};
31820
+ mcpServers.harmony = {
31821
+ command: "npx",
31822
+ args: ["-y", "harmony-mcp@latest", "serve"]
31823
+ };
31824
+ settings.mcpServers = mcpServers;
31825
+ writeFileSync3(settingsPath, JSON.stringify(settings, null, 2));
31826
+ }
31798
31827
  async function validateApiKey(apiKey, apiUrl = API_URL) {
31799
31828
  try {
31800
31829
  const response = await fetch(`${apiUrl}/v1/workspaces`, {
@@ -31889,18 +31918,6 @@ ${HARMONY_WORKFLOW_PROMPT.replace("Your agent identifier", "claude-code").replac
31889
31918
  type: "text"
31890
31919
  });
31891
31920
  }
31892
- files.push({
31893
- path: join3(home, ".claude", "settings.json"),
31894
- content: JSON.stringify({
31895
- mcpServers: {
31896
- harmony: {
31897
- command: "npx",
31898
- args: ["-y", "harmony-mcp@latest", "serve"]
31899
- }
31900
- }
31901
- }, null, 2),
31902
- type: "json"
31903
- });
31904
31921
  break;
31905
31922
  }
31906
31923
  case "codex": {
@@ -32352,11 +32369,24 @@ async function runSetup(options = {}) {
32352
32369
  }
32353
32370
  }
32354
32371
  symlinkSync(symlink.target, symlink.link);
32355
- } catch (error49) {
32372
+ } catch {
32356
32373
  M2.warning(`Failed to create symlink: ${symlink.link}`);
32357
32374
  }
32358
32375
  }
32359
32376
  }
32377
+ if (needsSkills && selectedAgents.includes("claude")) {
32378
+ const mcpRegistered = await registerMcpServer();
32379
+ if (mcpRegistered) {
32380
+ console.log(` ${colors.success("✓")} ${colors.dim("MCP server registered via claude CLI")}`);
32381
+ } else {
32382
+ try {
32383
+ await writeMcpConfigFallback(home);
32384
+ console.log(` ${colors.success("✓")} ${colors.dim(formatPath(join3(home, ".claude", "settings.json"), home))} ${colors.dim("(updated)")}`);
32385
+ } catch {
32386
+ M2.warning("Could not register MCP server. Run manually: claude mcp add --transport stdio harmony -- harmony-mcp serve");
32387
+ }
32388
+ }
32389
+ }
32360
32390
  if (selectedWorkspaceId || selectedProjectId) {
32361
32391
  const localConfig = {};
32362
32392
  if (selectedWorkspaceId)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harmony-mcp",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "MCP server for Harmony Kanban board - enables AI coding agents to manage your boards",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",