Skip to main content
Glama
landicefu

MCP Client Configuration Server

by landicefu

get_configuration_path

Retrieve the configuration file path for a specific MCP client to access or modify settings.

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 implementation for the 'get_configuration_path' tool. Validates the client parameter and returns the computed configuration path using the getConfigPath helper.
    case 'get_configuration_path': {
      const client = validateClient(args.client);
      const configPath = getConfigPath(client);
      
      return {
        content: [
          {
            type: 'text',
            text: configPath,
          },
        ],
      };
    }
  • src/index.ts:127-140 (registration)
    Tool registration in the ListTools response, including name, description, and input 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'],
      },
    },
  • Core helper function that computes the configuration file path based on the client type and operating system platform (Windows/macOS).
    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 supported types.
    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;
    };
  • Input schema definition for the get_configuration_path tool, specifying the required 'client' string parameter.
    inputSchema: {
      type: 'object',
      properties: {
        client: {
          type: 'string',
          description: 'Client name (cline, roo_code, windsurf, claude)',
        },
      },
      required: ['client'],
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states a read operation ('Get'), implying it's likely safe and non-destructive, but doesn't specify whether it requires authentication, returns absolute/relative paths, handles errors for invalid clients, or has any rate limits. This leaves significant behavioral gaps for the agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that efficiently conveys the core functionality without unnecessary words. It's front-loaded with the main action and resource, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for effective tool use. It doesn't explain what the returned path looks like (e.g., string format, filesystem type), error conditions, or how it differs from sibling tools. For a tool with one parameter but no structured output info, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the single parameter 'client' fully documented in the schema. The description adds minimal value beyond the schema by implying the client name is used to locate a configuration file, but doesn't provide additional context like file format or location constraints. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('path to the configuration file'), making it immediately understandable. However, it doesn't explicitly distinguish this tool from its sibling 'get_configuration' (which likely retrieves configuration content rather than just the file path), missing full sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_configuration' or 'get_server_configuration'. It mentions a 'specific client' but doesn't clarify if this is for client-side versus server-side configurations or when path retrieval is preferred over content retrieval.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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