get_configuration_path
Retrieve the path to the configuration file for a specific client on the MCP Client Configuration Server, ensuring accurate configuration management across AI assistant clients.
Instructions
Get the path to the configuration file for a specific client
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| client | Yes | Client name (cline, roo_code, windsurf, claude) |
Implementation Reference
- src/index.ts:239-251 (handler)Handler for the get_configuration_path tool. Validates the client argument and uses getConfigPath to compute and return the configuration file path.case 'get_configuration_path': { const client = validateClient(args.client); const configPath = getConfigPath(client); return { content: [ { type: 'text', text: configPath, }, ], }; }
- src/index.ts:131-139 (schema)Input schema for get_configuration_path tool, requiring a 'client' string parameter.type: 'object', properties: { client: { type: 'string', description: 'Client name (cline, roo_code, windsurf, claude)', }, }, required: ['client'], },
- src/index.ts:127-140 (registration)Tool registration in the list_tools response, defining name, description, and schema.{ name: 'get_configuration_path', description: 'Get the path to the configuration file for a specific client', inputSchema: { type: 'object', properties: { client: { type: 'string', description: 'Client name (cline, roo_code, windsurf, claude)', }, }, required: ['client'], }, },
- src/index.ts:18-53 (helper)Helper function that computes the platform and client-specific configuration file path.const getConfigPath = (client: ClientType): string => { const platform = os.platform(); const homeDir = os.homedir(); if (platform === 'win32') { // Windows paths switch (client) { case 'cline': return path.join(homeDir, 'AppData', 'Roaming', 'Code', 'User', 'globalStorage', 'saoudrizwan.claude-dev', 'settings', 'cline_mcp_settings.json'); case 'roo_code': return path.join(homeDir, 'AppData', 'Roaming', 'Code', 'User', 'globalStorage', 'rooveterinaryinc.roo-cline', 'settings', 'cline_mcp_settings.json'); case 'windsurf': return path.join(homeDir, 'AppData', 'Roaming', 'WindSurf', 'mcp_settings.json'); case 'claude': return path.join(homeDir, 'AppData', 'Roaming', 'Claude', 'claude_desktop_config.json'); default: throw new McpError(ErrorCode.InvalidParams, `Unsupported client: ${client}`); } } else if (platform === 'darwin') { // macOS paths switch (client) { case 'cline': return path.join(homeDir, 'Library', 'Application Support', 'Code', 'User', 'globalStorage', 'saoudrizwan.claude-dev', 'settings', 'cline_mcp_settings.json'); case 'roo_code': return path.join(homeDir, 'Library', 'Application Support', 'Code', 'User', 'globalStorage', 'rooveterinaryinc.roo-cline', 'settings', 'cline_mcp_settings.json'); case 'windsurf': return path.join(homeDir, '.codeium', 'windsurf', 'mcp_config.json'); case 'claude': return path.join(homeDir, 'Library', 'Application Support', 'Claude', 'claude_desktop_config.json'); default: throw new McpError(ErrorCode.InvalidParams, `Unsupported client: ${client}`); } } else { throw new McpError(ErrorCode.InternalError, `Unsupported platform: ${platform}`); } };
- src/index.ts:56-67 (helper)Helper function to validate the client parameter against allowed values.const validateClient = (client: unknown): ClientType => { if (typeof client !== 'string') { throw new McpError(ErrorCode.InvalidParams, 'Client must be a string'); } const validClients: ClientType[] = ['cline', 'roo_code', 'windsurf', 'claude']; if (!validClients.includes(client as ClientType)) { throw new McpError(ErrorCode.InvalidParams, `Invalid client: ${client}. Must be one of: ${validClients.join(', ')}`); } return client as ClientType; };