Skip to main content
Glama
landicefu

MCP Client Configuration Server

by landicefu

get_configuration

Retrieve the complete configuration for a specific client from the MCP Client Configuration Server, enabling efficient management and synchronization of settings across AI assistant clients.

Instructions

Get the entire configuration for a specific client

Input Schema

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

Implementation Reference

  • Handler logic for 'get_configuration' tool: validates client, computes config path, reads the JSON config file, and returns it as formatted JSON string in the MCP response format.
    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)
    Registration of the 'get_configuration' tool in the ListTools response, including 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'], }, },
  • Input schema definition for the 'get_configuration' tool: requires a 'client' string parameter.
    inputSchema: { type: 'object', properties: { client: { type: 'string', description: 'Client name (cline, roo_code, windsurf, claude)', }, }, required: ['client'], },
  • Helper function to read and parse the configuration JSON file from disk.
    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 validate the 'client' parameter against supported 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