๐ง MCP Installation Deep Merge Fix
This release addresses a critical issue with MCP (Model Context Protocol) server installation that was overwriting existing configurations.
๐ Bug Fixes
MCP Installation Overwriting Fix
- Fixed individual MCP installations (
--mcp=<name>
) overwriting existing.mcp.json
configurations - Implemented deep merge logic specifically for
mcpServers
key to preserve existing MCP entries - Ensured sequential MCP installations properly accumulate without data loss
๐ง Technical Details
Problem: When installing MCPs individually, the shallow merge behavior was overwriting the entire mcpServers
object instead of merging individual MCP configurations.
Solution: Added deep merge logic that preserves existing MCP server configurations while adding new ones:
// Deep merge mcpServers specifically to avoid overwriting existing servers
if (existingConfig.mcpServers && mcpConfig.mcpServers) {
mergedConfig.mcpServers = {
...existingConfig.mcpServers,
...mcpConfig.mcpServers
};
}
๐งช Verification
โ Multiple MCP Installation Test:
# Install first MCP
npx claude-code-templates@latest --mcp=memory-integration --yes
# Install second MCP (preserves first)
npx claude-code-templates@latest --mcp=filesystem-access --yes
# Result: Both MCPs correctly present in .mcp.json
๐ฆ Components Included
This release includes our expanded component library:
- ๐ค Agents: 51 specialized AI agents (3 original + 48 from wshobson/agents)
- โก Commands: 23 slash commands (2 original + 21 from awesome-claude-code)
- ๐ MCPs: 10 Model Context Protocol integrations
- ๐ฆ Templates: Multi-language project templates
๐ Installation
# Latest version with MCP fix
npx claude-code-templates@latest
# Install specific MCP (now works correctly)
npx claude-code-templates@latest --mcp=memory-integration --yes
npx claude-code-templates@latest --mcp=github-integration --yes
๐ Resources
- ๐ Browse Components - Interactive component browser
- ๐ Documentation - Comprehensive guides
- ๐ Tracking System Architecture - Technical documentation
๐ Migration Notes
No breaking changes - This is a bug fix release that improves existing functionality without changing the API.
For users with existing MCP configurations: Your existing .mcp.json
files will now be properly preserved when installing additional MCPs.
Privacy First: All tracking remains anonymous and optional with multiple opt-out mechanisms (CCT_NO_TRACKING
, CCT_NO_ANALYTICS
, CI=true
).
๐ค Automated Quality: Generated with comprehensive testing and validation.