MCPcopy
hub / github.com/modelcontextprotocol/python-sdk / get_claude_config_path

Function get_claude_config_path

src/mcp/cli/claude.py:35–48  ·  view source on GitHub ↗

Get the Claude config directory based on platform.

()

Source from the content-addressed store, hash-verified

33
34
35def get_claude_config_path() -> Path | None: # pragma: no cover
36 """Get the Claude config directory based on platform."""
37 if sys.platform == "win32":
38 path = Path(Path.home(), "AppData", "Roaming", "Claude")
39 elif sys.platform == "darwin":
40 path = Path(Path.home(), "Library", "Application Support", "Claude")
41 elif sys.platform.startswith("linux"):
42 path = Path(os.environ.get("XDG_CONFIG_HOME", Path.home() / ".config"), "Claude")
43 else:
44 return None
45
46 if path.exists():
47 return path
48 return None
49
50
51def get_uv_path() -> str:

Callers 1

update_claude_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected