l4 mcp uninstall
l4 mcp uninstall removes the entry l4 mcp install wrote from every client that carries it.
l4 mcp uninstall [flags]With no --client, it cleans every client carrying an entry under --name, and leaves alone any client that is installed but carries none.
On a terminal it asks you to confirm first. Declining prints Aborted. and exits 0. In CI or through a pipe stdin is not a terminal, so it proceeds without asking. Pass --yes there to make that explicit in the script.
Flags
| Flag | Description |
|---|---|
--client | Client to clean: claude-code, claude-desktop, cursor, vscode, windsurf. Repeatable. Defaults to every client carrying the entry |
--name | Name of the server entry to remove. Defaults to levelfour |
--purge-backups | Also delete the dated .l4-backup-* copies |
-y, --yes | Skip the confirmation prompt |
Global flags (--json, --jq, --template, --quiet, --token, --api) apply. See CLI overview.
What it touches
Only the entry under --name. It leaves every other MCP server in the same file exactly as it was, and takes a dated backup before rewriting anything.
An install made under a different name survives. If you installed a second organization as levelfour-org-b, remove it by name:
l4 mcp uninstall --name levelfour-org-bThe backups it leaves behind
l4 mcp install backs up a config file before rewriting it.
By default the backups stay and the command tells you how many are left:
Cursor: removed entry "levelfour"
Backup: /Users/you/.cursor/mcp.json.l4-backup-20260829-141207
2 backup file(s) left in place. A backup taken over an existing install still holds
that credential; --purge-backups deletes them.To delete them as it removes the entry:
l4 mcp uninstall --purge-backupsExamples
Remove it everywhere:
l4 mcp uninstallOne client:
l4 mcp uninstall --client cursorUnattended, deleting the backups as it goes:
l4 mcp uninstall --yes --purge-backupsErrors
| Exit | Symptom | Cause |
|---|---|---|
1 | no client carries an entry named "levelfour". Nothing to remove | Nothing to do. Check the name with l4 mcp status |
1 | N of M clients failed | It cleaned some and not others. The message names each failure |
1 | unknown client | --client was given a name outside the supported set |
Related
l4 mcp install: what this reversesl4 mcp status: which clients carry an entry- Approving a connection: closing a connection you signed in for