MCPcopy Create free account
hub / github.com/MatterAIOrg/OrbCode / claudeDesktopConfigPath

Function claudeDesktopConfigPath

src/commands/migrate.ts:81–101  ·  view source on GitHub ↗

Cross-platform location of Claude Desktop's MCP config file.

()

Source from the content-addressed store, hash-verified

79
80/** Cross-platform location of Claude Desktop's MCP config file. */
81function claudeDesktopConfigPath(): string {
82 const home = os.homedir();
83 if (process.platform === "darwin") {
84 return path.join(
85 home,
86 "Library",
87 "Application Support",
88 "Claude",
89 "claude_desktop_config.json",
90 );
91 }
92 if (process.platform === "win32") {
93 const appData =
94 process.env.APPDATA || path.join(home, "AppData", "Roaming");
95 return path.join(appData, "Claude", "claude_desktop_config.json");
96 }
97 // Linux/WSL — best-effort XDG location; Claude Desktop doesn't have an
98 // official Linux build, but some forks (e.g. open-source wrappers) use it.
99 const xdg = process.env.XDG_CONFIG_HOME || path.join(home, ".config");
100 return path.join(xdg, "Claude", "claude_desktop_config.json");
101}
102
103function readJson(filePath: string): Record<string, unknown> | undefined {
104 try {

Callers 1

discoverSourcesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected