Undo a change or restore a client file
For anyone who applied something and wants it back the way it was: a server you just saved, an import, a skill install, or a client file that should be exactly what it was before Surjection wrote it. At the end, the store and your client files are back to the earlier state, and the undo itself is recorded, so you can redo it.
What you can undo
Every change to Surjection's store is a commit, and every apply backs up each client file before writing it. That gives three ways back:
| You want to | Use | What changes |
|---|---|---|
| Take back an apply (a save, an import, a toggle) | Undo this apply | The store goes back to before that apply, and the client files are written again to match |
| Go back to an earlier version of the store, or of one server | Restore this version or Restore entity... | The store, as a new commit; the previous state is tagged first |
| Put a client file back byte for byte | Client file backups, Restore | Only that file, from the backup taken before the apply |
Before you start
- Find the change: History lists every commit, newest first, with
Applied or Partly applied on apply runs. Filter by All,
User or Projects, or search for an entity such as
server/github.
Steps
Undo the change you just made
Right after you edit or delete something, the notification has Undo this apply. Choose it, and the change is rolled back and applied. After adding a server or installing a skill, the notification offers View instead; undo those from History (below).

Undo an apply from History
-
Open History and select the apply, for example "apply: 3 files (omp, claude-code)". Its actions appear under it.
-
Choose Undo this apply. For the latest apply it runs at once; if later applies changed the same entries, Surjection asks first ("Later applies changed the same entries.", Undo anyway).

-
A notification confirms it, for example "Undid apply 01J...". Entries you edited by hand since are not overwritten without asking.
The Pending changes drawer lists recent applies with Undo this apply too.
Restore a client file exactly
-
In History, open the Client file backups tab. Each apply run lists the files it backed up.
-
Choose Restore next to one file, or Restore all for the run.

-
The notification says how many files were restored, and each file is marked Restored. A backup that was removed because it held old secret values is reported as Backup removed.
Restoring a file does not change the store. If the file and the store
now differ, surject status shows it, and the next apply asks what to do
with the file (in the app, Resolve... in Pending changes).
Go back to an earlier version
Select any commit in History and choose Restore this version (the
whole store) or Restore entity... (only some servers, skills or
settings). The dialog lists what would change; confirm, and apply it when
asked. Your current state is tagged auto/pre-restore/... first, so you
can return to it.
On the command line
surject history # commits, with apply ids
surject rollback last # undo this machine's latest apply
surject rollback <APPLY-ID> # or an older one (asks first; --yes to skip)
surject restore --files <APPLY-ID> # client files back from that apply's backups
surject restore --files <APPLY-ID> --file ~/.claude.json # only one file
surject restore <REV> --path server/github --apply # one server from an earlier commit
Check that it worked
surject statusshows the entries as in sync (or lists those that differ after a file restore).surject historyshows the rollback or restore as a new commit.- Open the client file, or the client's MCP view, and check the server is back (or gone).
Undo the undo
A rollback and a restore are commits too: undo the rollback's own apply
the same way, or restore the auto/pre-rollback/... or
auto/pre-restore/... tag Surjection made before it.
More detail
- User guide, History, restore and remotes
- User guide, Clients and apply
- Concepts (store, ownership and drift)