claude-code-templates 1.14.8 → 1.14.9

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/package.json +1 -1
  2. package/src/index.js +9 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-templates",
3
- "version": "1.14.8",
3
+ "version": "1.14.9",
4
4
  "description": "CLI tool to setup Claude Code configurations with framework-specific commands, automation hooks and MCP Servers for your projects",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -419,12 +419,20 @@ async function installIndividualMCP(mcpName, targetDir, options) {
419
419
  console.log(chalk.yellow('📝 Existing .mcp.json found, merging configurations...'));
420
420
  }
421
421
 
422
- // Merge configurations
422
+ // Merge configurations with deep merge for mcpServers
423
423
  const mergedConfig = {
424
424
  ...existingConfig,
425
425
  ...mcpConfig
426
426
  };
427
427
 
428
+ // Deep merge mcpServers specifically to avoid overwriting existing servers
429
+ if (existingConfig.mcpServers && mcpConfig.mcpServers) {
430
+ mergedConfig.mcpServers = {
431
+ ...existingConfig.mcpServers,
432
+ ...mcpConfig.mcpServers
433
+ };
434
+ }
435
+
428
436
  // Write the merged configuration
429
437
  await fs.writeJson(targetMcpFile, mergedConfig, { spaces: 2 });
430
438