Skip to content

Commit ba5a02a

Browse files
author
LittleCoinCoin
committed
fix(claude-code): user-wide config file of the mcp
Fix the expected path for the Claude Strategy to point to `~/.claude.json` Use the presence of this file as a hint whether Claude Code is setup.
1 parent b04757a commit ba5a02a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

hatch/mcp_host_config/strategies.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ def get_config_path(self) -> Optional[Path]:
142142
"""Get Claude Code configuration path (workspace-specific)."""
143143
# Claude Code uses workspace-specific configuration
144144
# This would be determined at runtime based on current workspace
145-
return Path.cwd() / ".claude" / "mcp_config.json"
145+
return Path.home() / ".claude.json"
146146

147147
def is_host_available(self) -> bool:
148-
"""Check if Claude for VS Code extension is available."""
149-
# Check for VS Code workspace and Claude extension
150-
vscode_dir = Path.cwd() / ".vscode"
148+
"""Check if Claude Code is available."""
149+
# Check for Claude Code user configuration file
150+
vscode_dir = Path.home() / ".claude.json"
151151
return vscode_dir.exists()
152152

153153

0 commit comments

Comments
 (0)