MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / clientConfigPath

Function clientConfigPath

apps/desktop/src/main/mcp-integrations.ts:94–126  ·  view source on GitHub ↗
(descriptor: McpClientDescriptor)

Source from the content-addressed store, hash-verified

92}
93
94function clientConfigPath(descriptor: McpClientDescriptor): string {
95 switch (descriptor.id) {
96 case 'claude-code':
97 // Claude Code stores user-scope MCP servers in ~/.claude.json under
98 // the top-level `mcpServers` object.
99 return path.join(homeDir(), '.claude.json')
100 case 'claude-desktop':
101 // Claude Desktop\u2019s config location differs by OS.
102 if (process.platform === 'darwin') {
103 return path.join(
104 homeDir(),
105 'Library',
106 'Application Support',
107 'Claude',
108 'claude_desktop_config.json'
109 )
110 }
111 if (process.platform === 'win32') {
112 return path.join(
113 process.env.APPDATA || path.join(homeDir(), 'AppData', 'Roaming'),
114 'Claude',
115 'claude_desktop_config.json'
116 )
117 }
118 return path.join(xdgConfigHome(), 'Claude', 'claude_desktop_config.json')
119 case 'codex':
120 // Codex CLI reads from ~/.codex/config.toml.
121 return path.join(homeDir(), '.codex', 'config.toml')
122 case 'opencode':
123 // OpenCode global config lives at ~/.config/opencode/opencode.json.
124 return path.join(xdgConfigHome(), 'opencode', 'opencode.json')
125 }
126}
127
128/* ---------- JSON client (Claude Code + Claude Desktop) --------------- */
129

Callers 3

getMcpClientStatusesFunction · 0.85
installMcpForClientFunction · 0.85
uninstallMcpForClientFunction · 0.85

Calls 2

homeDirFunction · 0.85
xdgConfigHomeFunction · 0.85

Tested by

no test coverage detected