1.8 KiB
1.8 KiB
| id | type | title | tags | importance | confidence | created | updated | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| b3c2d454-3b8e-4d3d-b24c-6241f12d03e6 | fix | MCP manager was writing to wrong config path - ~/.claude/.mcp.json instead of project .mcp.json |
|
0.9 | 0.8 | 2026-02-20T03:52:57.247423+00:00 | 2026-02-20T03:52:57.247423+00:00 |
Problem
The mcp-manager skill's mcp_control.py was reading/writing ~/.claude/.mcp.json, but Claude Code does NOT read that file. Claude Code reads MCP config from two locations:
- Global:
~/.claude.json→mcpServerskey (always-on MCPs like cognitive-memory) - Project:
<project-root>/.mcp.json→mcpServerskey (on-demand MCPs)
This meant n8n-mcp was correctly configured in ~/.claude/.mcp.json but never loaded by Claude Code, even after multiple session restarts.
Root Cause
The original mcp_control.py had hardcoded:
MCP_CONFIG = CLAUDE_DIR / ".mcp.json" # ~/.claude/.mcp.json - WRONG
Fix
- Updated
mcp_control.pyto auto-detect project root viagit rev-parse --show-topleveland write to<project-root>/.mcp.json - Added
GLOBAL_CONFIGconstant pointing to~/.claude.jsonfor reference - Cleaned up stale MCP registry (removed Daniel Miessler's MCPs: httpx, naabu, apify, brightdata, Ref, stripe, content, daemon, Foundry)
- Added
n8n-mcpto the registry - Updated SKILL.md to document correct config locations
- Also found the project-level
.mcp.jsonat/mnt/NV2/Development/claude-home/.mcp.jsonhad"mcpServers": {}which was overriding global config
Key Lesson
Claude Code MCP config hierarchy:
~/.claude.json→ global, always loaded<project>/.mcp.json→ project-specific, merged with global~/.claude/.mcp.json→ NOT USED by Claude Code (was a mistake)