Skip to main content
Glama
landicefu

MCP Client Configuration Server

by landicefu

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
NameRequiredDescriptionDefault
clientYesClient name (cline, roo_code, windsurf, claude)

Implementation Reference

  • 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, }, ], }; }
  • 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'], }, },
  • 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}`); } };
  • 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; };

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/landicefu/mcp-client-configuration-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server