uninstall_mcp
Remove MCP servers from client configurations like Claude Code, Cursor, or VS Code to manage your development environment.
Instructions
Remove an MCP from a client configuration.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mcp_id | Yes | MCP identifier to remove | |
| client | No | Client to remove from | claude-code |
Implementation Reference
- src/index.ts:301-320 (handler)Handler case within the CallToolRequestHandler that executes the uninstall_mcp tool logic by invoking removeMcpConfig and returning the result.case 'uninstall_mcp': { const mcpId = args?.mcp_id as string; const client = (args?.client as ClientType) || 'claude-code'; const removed = removeMcpConfig(client, mcpId); return { content: [{ type: 'text', text: JSON.stringify({ status: removed ? 'success' : 'not_found', mcp_id: mcpId, client, message: removed ? `Removed '${mcpId}' from ${client}` : `MCP '${mcpId}' was not installed in ${client}` }, null, 2) }] }; }
- src/index.ts:145-164 (schema)Tool definition including name, description, and input schema for the uninstall_mcp tool, used for registration and validation.{ name: 'uninstall_mcp', description: 'Remove an MCP from a client configuration.', inputSchema: { type: 'object', properties: { mcp_id: { type: 'string', description: 'MCP identifier to remove' }, client: { type: 'string', enum: ['claude-code', 'cursor', 'vscode'], description: 'Client to remove from', default: 'claude-code' } }, required: ['mcp_id'] } },
- src/clients.ts:133-143 (helper)Core helper function that reads the client settings, removes the specified MCP configuration if present, writes the updated settings, and returns success status.export function removeMcpConfig(client: ClientType, mcpId: string): boolean { const settings = readClientSettings(client); if (!settings.mcpServers || !(mcpId in settings.mcpServers)) { return false; } delete settings.mcpServers[mcpId]; writeClientSettings(client, settings); return true; }