Skip to main content
Glama
landicefu

MCP Client Configuration Server

by landicefu

get_configuration

Retrieve complete configuration settings for a specific AI assistant client to manage and synchronize MCP server setups.

Instructions

Get the entire configuration for a specific client

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientYesClient name (cline, roo_code, windsurf, claude)

Implementation Reference

  • Main handler for 'get_configuration' tool: validates client input, computes config path, reads and parses config file, returns pretty-printed JSON.
    case 'get_configuration': {
      const client = validateClient(args.client);
      const configPath = getConfigPath(client);
      const config = await readConfigFile(configPath);
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(config, null, 2),
          },
        ],
      };
    }
  • src/index.ts:141-154 (registration)
    Tool registration in ListToolsRequestSchema response, defining name, description, and input schema.
    {
      name: 'get_configuration',
      description: 'Get the entire configuration for a specific client',
      inputSchema: {
        type: 'object',
        properties: {
          client: {
            type: 'string',
            description: 'Client name (cline, roo_code, windsurf, claude)',
          },
        },
        required: ['client'],
      },
    },
  • Helper function that reads the configuration file at the given path and parses it as JSON, throwing MCP errors on failure. Used directly in the handler.
    const readConfigFile = async (configPath: string): Promise<any> => {
      try {
        const data = await fs.readFile(configPath, 'utf8');
        return JSON.parse(data);
      } catch (error: unknown) {
        if (error instanceof Error && 'code' in error && error.code === 'ENOENT') {
          throw new McpError(ErrorCode.InternalError, `Configuration file not found: ${configPath}`);
        }
        const errorMessage = error instanceof Error ? error.message : String(error);
        throw new McpError(ErrorCode.InternalError, `Error reading configuration file: ${errorMessage}`);
      }
    };
  • Helper function to determine the exact file path for a client's MCP configuration based on OS platform and client type. Called by the handler.
    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 and type-check the client parameter. Used at the start of the handler.
    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;
    };
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 this is a 'Get' operation, implying read-only behavior, but doesn't clarify permissions, rate limits, error handling, or what 'entire configuration' entails (e.g., format, size). This leaves significant gaps for a tool with no annotation coverage.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, 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 no annotations and no output schema, the description is incomplete. It doesn't explain what the 'entire configuration' returns (e.g., structure, data types) or address potential complexities like authentication needs or error cases, which are critical for a configuration retrieval tool.

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%, so the input schema fully documents the 'client' parameter. The description adds no additional meaning beyond implying the parameter selects a client, which is already clear from the schema. 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 action ('Get') and resource ('entire configuration for a specific client'), making the purpose understandable. It doesn't explicitly differentiate from sibling tools like 'get_configuration_path' or 'get_server_configuration', which prevents a perfect score.

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?

No guidance is provided on when to use this tool versus alternatives like 'get_configuration_path' or 'get_server_configuration'. The description implies usage for client configurations but doesn't specify exclusions or prerequisites, leaving the agent to infer context.

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