How we made every write of our MCP server undoable
Latter-Mix2317 · reddit · 2026-10-21
Privatrak shares how they added undo history to their MCP server so users can revert any agent change (a lightweight "version control"):
- Every write belongs to a "run"; the write tool auto-starts one if the agent doesn't, so nothing happens outside a run
- Each write stores full before/after state in the same transaction as the write
- Undo runs newest-first in one transaction, recreating deleted items with their original ids
The tricky part: when the user has already changed things in between, they skip modified steps and undo the rest — simple but effective. The authors say they haven't seen this elsewhere.
More from coding & agent
- Index Network open-sources Social Discovery Protocol: agents negotiate fit on your behalf — carsonfarmer · 2026-10-23
- Installed a formal-verification skill: it silently installed Java, MacBook runs 10 degrees hotter — zealcaiden · 2026-10-23
- OpenAI's Decisions API hits GA: near real-time routing up to 10x faster than GPT-6 Luna — OpenAIDevs · 2026-10-23
- Ruff author warns: upgrade Node/Bun now — --use-system-ca still accepts the eMudhra cert — charliermarsh · 2026-10-23
- Proof of Agent: paste one prompt and your AI mines, grades, and self-governs — adamamcbride · 2026-10-23
- DeepLearning.AI weekly: GPT-6.1 hits 97.9% byte parity on COBOL migration — DeepLearningAI · 2026-10-23