Implementation:1mcp app Agent uninstallCommand
| Knowledge Sources | |
|---|---|
| Domains | CLI, MCP_Protocol |
| Last Updated | 2026-10-29 00:00 GMT |
Overview
Concrete CLI command for uninstalling an MCP server from the registry with config backup, optional config removal, and verbose output.
Description
The uninstallCommand function removes a registry-installed MCP server from the configuration. It supports force mode (skip confirmation), backup creation before removal, optional removal of the entire config entry, and verbose output. It delegates to the registry client to resolve the server identity and performs the removal through the server installation workflow.
Usage
Import this function when you need to:
- Remove a registry-installed server from the configuration
- Create a backup before removal
- Skip confirmation with force mode
- Remove the full config entry or just the registry metadata
Code Reference
Source Location
- Repository: 1MCP Agent
- File: src/commands/mcp/uninstall.ts (L22-60)
Signature
export interface UninstallCommandArgs extends GlobalOptions {
serverName: string;
force?: boolean;
backup?: boolean;
'remove-config'?: boolean;
verbose?: boolean;
}
export function buildUninstallCommand(yargs: Argv): Argv;
export async function uninstallCommand(argv: UninstallCommandArgs): Promise<void>;
Import
import { uninstallCommand, buildUninstallCommand } from '@src/commands/mcp/uninstall.js';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| serverName | string | Yes | Registry server name to uninstall |
| force | boolean | No | Skip confirmation |
| backup | boolean | No | Create backup before removal |
| remove-config | boolean | No | Remove full config entry |
Outputs
| Name | Type | Description |
|---|---|---|
| config file | side effect | Server entry removed |
| backup | file | Optional backup created |
Usage Examples
Uninstall
1mcp mcp uninstall filesystem
1mcp mcp uninstall filesystem --force --backup