Rewind
STDIOSmart checkpointing MCP server for Claude Code CLI with automatic project state management
Smart checkpointing MCP server for Claude Code CLI with automatic project state management
Smart and lightweight checkpointing mcp server for Claude Code CLI.
👤 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
git clone https://github.com/khalilbalaree/Rewind-MCP.git cd Rewind-MCP
then,
npm install npm run build
Add this server to your Claude Code MCP configuration:
Edit ~/Library/Application Support/Claude/claude_code_config.json:
{ "mcpServers": { "Rewind-MCP": { "command": "node", "args": ["/absolute/path/to/Rewind-MCP/dist/index.js"], "env": {} } } }
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": {} } } } EOF
👤 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.
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 statusgit checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)MIT License - see LICENSE file for details.
Built with ❤️ for the Claude Code ecosystem