Skip to main content
Glama
landicefu

MCP Client Configuration Server

by landicefu

remove_server_configuration

Remove an MCP server configuration from a client's settings to manage AI assistant integrations.

Instructions

Remove a server configuration from a client configuration

Input Schema

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

Implementation Reference

  • Handler implementation for the 'remove_server_configuration' tool. It validates the client and server_name, reads the configuration file, removes the specified server from mcpServers if it exists, persists the updated config, and returns the removed configuration as JSON.
    case 'remove_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')) {
          // If the configuration file doesn't exist, there's nothing to remove
          return {
            content: [
              {
                type: 'text',
                text: `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]) {
        return {
          content: [
            {
              type: 'text',
              text: `Server '${serverName}' not found in ${client} configuration`,
            },
          ],
        };
      }
      
      // Store the removed configuration
      const removedConfig = config.mcpServers[serverName];
      
      // Remove the server configuration
      delete config.mcpServers[serverName];
      
      // Write the updated configuration
      await writeConfigFile(configPath, config);
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(removedConfig, null, 2),
          },
        ],
      };
    }
  • Tool schema definition including name, description, and inputSchema for parameters 'client' (string) and 'server_name' (string), both required.
    {
      name: 'remove_server_configuration',
      description: 'Remove a server configuration 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 remove',
          },
        },
        required: ['client', 'server_name'],
      },
    },
  • src/index.ts:126-233 (registration)
    Registration of the 'remove_server_configuration' tool in the ListTools response within the setupToolHandlers method.
      tools: [
        {
          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'],
          },
        },
        {
          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'],
          },
        },
        {
          name: 'list_servers',
          description: 'List all server names configured in a specific client',
          inputSchema: {
            type: 'object',
            properties: {
              client: {
                type: 'string',
                description: 'Client name (cline, roo_code, windsurf, claude)',
              },
            },
            required: ['client'],
          },
        },
        {
          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'],
          },
        },
        {
          name: 'add_server_configuration',
          description: 'Add or update a server configuration in 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 add or update',
              },
              json_config: {
                type: 'object',
                description: 'Server configuration in JSON format',
              },
              allow_override: {
                type: 'boolean',
                description: 'Whether to allow overriding an existing server configuration with the same name (default: false)',
                default: false,
              },
            },
            required: ['client', 'server_name', 'json_config'],
          },
        },
        {
          name: 'remove_server_configuration',
          description: 'Remove a server configuration 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 remove',
              },
            },
            required: ['client', 'server_name'],
          },
        },
      ],
    }));
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Remove' implies a destructive mutation, the description does not specify whether this action is reversible, what permissions are required, or the impact on the client configuration (e.g., if it affects functionality). It also omits details like error handling or response format, leaving significant gaps for a mutation tool.

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 directly states the tool's purpose without unnecessary words. It is front-loaded and efficiently conveys the core action, making it easy to understand at a glance.

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 that this is a destructive mutation tool with no annotations and no output schema, the description is incomplete. It fails to address critical aspects such as the consequences of removal, required permissions, error scenarios, or what the tool returns. For a tool that modifies configurations, more context is needed to ensure safe and correct usage.

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 input schema has 100% description coverage, with clear documentation for both parameters ('client' and 'server_name'). The description does not add any semantic details beyond what the schema provides, such as examples or constraints on parameter values. However, with high schema coverage, the baseline score of 3 is appropriate as the schema handles the parameter documentation adequately.

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 ('Remove') and the target ('a server configuration from a client configuration'), which is specific and actionable. However, it does not explicitly distinguish this tool from its siblings like 'remove_server_configuration' vs 'add_server_configuration' or 'get_server_configuration', which would require mentioning the destructive nature or contrasting with read operations.

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. It lacks context such as prerequisites (e.g., the server must exist in the configuration), when not to use it (e.g., if the server is critical), or references to sibling tools like 'add_server_configuration' or 'get_server_configuration' for comparison.

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