Skip to main content
Glama
landicefu

MCP Client Configuration Server

by landicefu

get_server_configuration

Retrieve specific server configurations for AI clients like Cline or Claude. Input client name and server details to fetch settings efficiently.

Instructions

Get the configuration for a specific server from a client configuration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientYesClient name (cline, roo_code, windsurf, claude)
server_nameYesName of the server to retrieve

Implementation Reference

  • The main execution logic for the 'get_server_configuration' tool. Validates input parameters, reads the client-specific configuration file using getConfigPath and readConfigFile helpers, retrieves the server configuration from config.mcpServers[server_name], and returns it as a formatted JSON string in the MCP tool response.
    case 'get_server_configuration': { const client = validateClient(args.client); const serverName = args.server_name; if (typeof serverName !== 'string') { throw new McpError(ErrorCode.InvalidParams, 'server_name must be a string'); } const configPath = getConfigPath(client); let config; try { config = await readConfigFile(configPath); } catch (error) { if (error instanceof McpError && error.code === ErrorCode.InternalError && error.message.includes('not found')) { throw new McpError(ErrorCode.InvalidParams, `Server '${serverName}' not found in ${client} configuration (configuration file does not exist)`); } else { throw error; } } // Check if the server exists if (!config.mcpServers || !config.mcpServers[serverName]) { throw new McpError(ErrorCode.InvalidParams, `Server '${serverName}' not found in ${client} configuration`); } return { content: [ { type: 'text', text: JSON.stringify(config.mcpServers[serverName], null, 2), }, ], }; }
  • Input schema defining the parameters for the get_server_configuration tool: client (string) and server_name (string), both required.
    inputSchema: { type: 'object', properties: { client: { type: 'string', description: 'Client name (cline, roo_code, windsurf, claude)', }, server_name: { type: 'string', description: 'Name of the server to retrieve', }, }, required: ['client', 'server_name'], },
  • src/index.ts:169-186 (registration)
    Registration of the get_server_configuration tool in the ListTools response, specifying name, description, and input schema.
    { name: 'get_server_configuration', description: 'Get the configuration for a specific server from a client configuration', inputSchema: { type: 'object', properties: { client: { type: 'string', description: 'Client name (cline, roo_code, windsurf, claude)', }, server_name: { type: 'string', description: 'Name of the server to retrieve', }, }, required: ['client', 'server_name'], }, },

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