khalilbalaree/Rewind-MCP
3.4
If you are the rightful owner of Rewind-MCP and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
Rewind MCP is a smart and lightweight checkpointing server designed for the Claude Code CLI, offering seamless project state management and restoration.
š 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
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-MCP
then,
npm install
npm run build
Claude 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": {}
}
}
}
EOF
Use 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 file for details.
šāāļø Support
- š Documentation
- š Issue Tracker
- š¬ Discussions
Built with ā¤ļø for the Claude Code ecosystem