Skip to content

Commit b2372b0

Browse files
committed
On Linux use XDG_CONFIG_HOME environment variable and fall back to $HOME/.config
1 parent 646b647 commit b2372b0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mcp/cli/claude.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Claude app integration utilities."""
22

33
import json
4+
import os
45
import sys
56
from pathlib import Path
67

@@ -18,7 +19,7 @@ def get_claude_config_path() -> Path | None:
1819
elif sys.platform == "darwin":
1920
path = Path(Path.home(), "Library", "Application Support", "Claude")
2021
elif sys.platform.startswith("linux"):
21-
path = Path(Path.home(), ".config", "Claude")
22+
path = Path(os.environ.get("XDG_CONFIG_HOME", Path.home() / ".config"))
2223
else:
2324
return None
2425

0 commit comments

Comments
 (0)