Compare commits

...

2 Commits

2 changed files with 53 additions and 0 deletions

View File

@ -199,3 +199,7 @@ Files edited (3):
- **Memory:** [homelab-session-debugging-901268](graph/fixes/homelab-session-debugging-901268.md)
- **Summary:** Errors encountered (1):
- The user doesn't want to proceed with this tool use. The tool use was
## 11:30 - MCP server user-scope config: ~/.claude.json + one-time /mcp enable
- **Type:** configuration
- **Tags:** claude-code, mcp, configuration, n8n

View File

@ -0,0 +1,49 @@
---
id: a2488459-bc9e-4005-969c-44eef486ebc2
type: configuration
title: "MCP server user-scope config: ~/.claude.json + one-time /mcp enable"
tags: [claude-code, mcp, configuration, n8n]
importance: 0.7
confidence: 0.8
created: "2026-02-20T17:30:17.952797+00:00"
updated: "2026-02-20T17:30:17.952797+00:00"
---
## Adding User-Scope MCP Servers in Claude Code
### Correct Location
- **User MCP servers go in `~/.claude.json`** under the `mcpServers` key
- NOT in `~/.claude/settings.json` (that `mcpServers` key doesn't work)
- NOT in `~/.claude/.mcp.json` (legacy location, still works for cognitive-memory but being phased out)
### Activation Flow
1. Add server config to `~/.claude.json``mcpServers``server-name`
2. Start a new Claude Code session → server shows as **disabled** in `/mcp`
3. Open `/mcp` menu, select the server, press Enter to enable
4. Server persists as **connected** across all future sessions automatically
### Settings.json MCP Fields
- `enableAllProjectMcpServers` — only for **project-level** `.mcp.json` servers
- `enabledMcpjsonServers` — only for **project-level** `.mcp.json` servers
- Neither affects user-scoped servers in `~/.claude.json`
### Example Config (~/.claude.json)
```json
{
"mcpServers": {
"cognitive-memory": {
"command": "python3",
"args": ["/home/cal/.claude/skills/cognitive-memory/mcp_server.py"]
},
"n8n-mcp": {
"command": "npx",
"args": ["n8n-mcp"],
"env": {
"MCP_MODE": "stdio",
"N8N_API_URL": "http://10.10.0.210:5678",
"N8N_API_KEY": "<from ~/.claude/secrets/n8n_api_key>"
}
}
}
}
```