From 8230f2961dd8e1c82b6202e778fe17bfb13b4339 Mon Sep 17 00:00:00 2001 From: genius-0963 Date: Mon, 16 Nov 2026 22:12:26 +0530 Subject: [PATCH] fix(setup): bump add-mcp to 2.6.1 to fix deep-merge config corruption add-mcp 1.14.0 deep-merges server entries instead of replacing them atomically, leaving invalid hybrid stdio and remote settings in agent configurations such as Codex when reinstalling or updating from older stdio setups. Upstream resolved this in neon-solutions/add-mcp#86. Bump ADD_MCP_PACKAGE from add-mcp@1.14.0 to add-mcp@2.6.1 and update test expectations accordingly. Fixes #163 --- src/__tests__/commands/setup.test.ts | 10 +++++----- src/commands/setup.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/__tests__/commands/setup.test.ts b/src/__tests__/commands/setup.test.ts index d15e1bf1c1..b4937102d6 100644 --- a/src/__tests__/commands/setup.test.ts +++ b/src/__tests__/commands/setup.test.ts @@ -447,7 +447,7 @@ describe('handleSetupCommand', () => { 'npx', [ '-y', - 'add-mcp@1.14.0', + 'add-mcp@2.6.1', 'https://mcp.firecrawl.dev/v2/mcp', '--name', 'firecrawl', @@ -527,7 +527,7 @@ describe('handleSetupCommand', () => { 'npx', [ '-y', - 'add-mcp@1.14.0', + 'add-mcp@2.6.1', 'https://mcp.firecrawl.dev/v2/mcp', '--name', 'firecrawl', @@ -645,7 +645,7 @@ describe('handleSetupCommand', () => { 'npx', [ '-y', - 'add-mcp@1.14.0', + 'add-mcp@2.6.1', 'https://mcp.firecrawl.dev/v2/mcp', '--name', 'firecrawl', @@ -970,7 +970,7 @@ describe('handleSetupCommand', () => { const addMcpCalls = vi .mocked(execFileSync) .mock.calls.filter(([, args]) => - (args as string[])?.includes('add-mcp@1.14.0') + (args as string[])?.includes('add-mcp@2.6.1') ); expect(addMcpCalls).toHaveLength(8); expect(addMcpCalls.flat(2)).not.toContain('--global'); @@ -1496,7 +1496,7 @@ describe('handleSetupCommand', () => { expect(passthruArgs.slice(0, 3)).toEqual(['/d', '/s', '/c']); expect(opts?.windowsVerbatimArguments).toBe(true); expect(passthruArgs[3]).toContain(`^\"${path.join(bin, 'npx.CMD')}^\"`); - expect(passthruArgs[3]).toContain('add-mcp@1.14.0'); + expect(passthruArgs[3]).toContain('add-mcp@2.6.1'); expect(passthruArgs[3]).toContain( '^"Authorization: Bearer ${FIRECRAWL_API_KEY}^"' ); diff --git a/src/commands/setup.ts b/src/commands/setup.ts index c9869350b2..154c5ca8d7 100644 --- a/src/commands/setup.ts +++ b/src/commands/setup.ts @@ -90,7 +90,7 @@ export interface SetupOptions { skipAuthOffer?: boolean; } -const ADD_MCP_PACKAGE = 'add-mcp@1.14.0'; +const ADD_MCP_PACKAGE = 'add-mcp@2.6.1'; const ENV_API_KEY = 'FIRECRAWL_API_KEY'; const ADD_MCP_LAUNCH_AGENTS: Record = { 'claude-code': 'Claude Code',