undo-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@undo-mcp undo the last two checkpoints"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🔄 Rewind MCP
Smart and lightweight checkpointing mcp server for Claude Code CLI.
Features
🎯 Smart Checkpointing: Automatically checkpoint project states before agent wants to make any changes
🔄 Complete Undo Support: Restore modified files, recover deleted files, or remove unwanted files
⚡ Fast Multi-File Restore: Rewind changes across multiple files instantly
Related MCP server: claude-continuity-mcp
Example Agent Interaction
👤 User: "Add error handling..."
🤖 Agent: Creating checkpoint before modifications...
✅ Checkpoint: "Before adding error handling"
🤖 Agent: "I have added error handling to the code"
👤 User: "This breaks the flow, please rewind"
🤖 Agent: Restoring files from checkpoint...
✅ Files restored to state before error handling🚀 Quick Start
Installation
git clone https://github.com/khalilbalaree/Rewind-MCP.git
cd Rewind-MCPthen,
npm install
npm run buildClaude Code Configuration
Add this server to your Claude Code MCP configuration:
User-Based Configuration (Global)
Edit ~/Library/Application Support/Claude/claude_code_config.json:
{
"mcpServers": {
"Rewind-MCP": {
"command": "node",
"args": ["/absolute/path/to/Rewind-MCP/dist/index.js"],
"env": {}
}
}
}Project-Specific Configuration (Alternative)
For easier project sharing and version control, create a .mcp.json file in your project directory:
# In your project directory
cat > .mcp.json << 'EOF'
{
"mcpServers": {
"Rewind-MCP": {
"command": "node",
"args": ["/absolute/path/to/Rewind-MCP/dist/index.js"],
"env": {}
}
}
}
EOFUse Cases
👤 User: "Add error handling to my API"
🤖 Agent: I'll add comprehensive error handling to your API files.
[Agent modifies src/api/routes.js]
✅ Checkpoint created and pushed to stack: "Modified src/api/routes.js"
[Agent creates src/middleware/errorHandler.js]
✅ Checkpoint created and pushed to stack: "Created src/middleware/errorHandler.js"
🤖 Agent: I've added try-catch blocks and centralized error handling to your API routes and created a new error middleware.
👤 User: "Actually, I want to try a different approach. Can you show me what checkpoints are available?"
🤖 Agent: I'll show you the available checkpoints.
📋 Available checkpoints:
1. "Created src/middleware/errorHandler.js" - [Most Recent]
2. "Modified src/api/routes.js"
3. "Database schema update"
4. "Initial project setup"
👤 User: "Rewind the most recent changes"
🤖 Agent: I'll restore the files from the most recent checkpoints.
✅ Undone: "Created src/middleware/errorHandler.js"
✅ Undone: "Modified src/api/routes.js"
Restored files:
- src/api/routes.js (restored)
- src/middleware/errorHandler.js (deleted)
👤 User: "Perfect! Now implement error handling using a custom Error class instead"
🤖 Agent: I'll implement error handling using a custom Error class approach.
[Agent modifies src/api/routes.js]
✅ Checkpoint created and pushed to stack: "Modified src/api/routes.js"
[Agent creates src/utils/CustomError.js]
✅ Checkpoint created and pushed to stack: "Created src/utils/CustomError.js"
🤖 Agent: I've implemented error handling using a custom Error class that provides better error categorization and response formatting.Available Functional Calls for Claude
Just ask, and it will do the rest.
checkpoint(files, description)- Create checkpoint before changesundo(file)- Restore to previous checkpointlist_undos()- Show available checkpointscleanup- clean up all the checkpointsstatus()- Show current checkpoint status
🤝 Contributing
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
📄 License
MIT License - see LICENSE file for details.
🙋♂️ Support
Built with ❤️ for the Claude Code ecosystem
Available Tools
5 toolscheckpointA
MANDATORY: ALWAYS call this function FIRST before making ANY file modifications, deletions, or creations. This creates a checkpoint to enable undo functionality. This must be called before every single file operation - no exceptions. Never modify files without calling checkpoint first.
Inputs: files (required), description.
cleanupB
Clear all undo checkpoints from the stack
Inputs: no named parameters.
list_undosB
List all undo checkpoints in the stack
Inputs: no named parameters.
statusA
Get current status of the undo system (checkpoint count, number of checkpoints in the stack, and whether undo is possible)
Inputs: no named parameters.
undoA
Undo the last checkpoint (pops from stack and restores files). Each call removes the latest checkpoint from the stack. To undo multiple changes, call this function repeatedly until the desired state is reached.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose with no overlap: checkpoint creates a checkpoint, cleanup clears checkpoints, list_undos lists them, status provides system status, and undo performs the undo operation. The descriptions make it unambiguous which tool to use for each action.
All tools follow a consistent naming pattern: checkpoint, cleanup, list_undos, status, and undo. They use clear, imperative verbs that directly describe their function, with no mixing of conventions or styles.
With 5 tools, this server is well-scoped for its undo system purpose. Each tool serves a specific role in the checkpoint/undo lifecycle, and there are no extraneous or missing tools for this focused functionality.
The tool set provides complete coverage for the undo system domain: checkpoint creation, cleanup, listing, status checking, and undo execution. There are no gaps in the CRUD/lifecycle operations needed for this functionality.
Maintenance
Related MCP Connectors
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Your versioned prompt library: search, read, save and version prompts from Claude Code.
Shared work memory for Claude Code, Codex, Cursor and chat, scoped to each repository.
Every employee asks your codebase from Claude, without access to it. Statistics on each developer.
Related MCP Servers
AlicenseNot gradedqualityDmaintenanceGives AI agents memory, undo, and self-awareness by tracking file changes and enabling checkpoints and rollbacks.83 npm2MIT- AlicenseAqualityBmaintenancePersistent, shared memory for Claude across sessions and clients (Code, Desktop, Cowork) — deterministic diff reads, checkpoints, cross-client task handoff, and project-wide search. 100% local and deterministic, no API keys, no LLM summarization.6353 PyPI4MIT
- AlicenseNot gradedqualityBmaintenanceEnables coding agents and their users to roll back unwanted file changes by recording workspace state before, during, and after a turn and restoring it selectively. It supports undoing, redoing, and diffing turns across Claude Code, Codex, Gemini CLI, Cursor, OpenCode, and Antigravity CLI.67 npm1MIT
- AlicenseNot gradedqualityAmaintenanceProvides persistent context management for Claude AI coding assistants, enabling users to save, search, checkpoint, restore, and share project context across sessions and parallel sessions. It preserves work history, decisions, and progress so coding workflows survive compaction and context limits.243 npmMIT