Skip to main content
Glama

undo-mcp

🔄 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 changes
  • undo(file) - Restore to previous checkpoint
  • list_undos() - Show available checkpoints
  • cleanup - clean up all the checkpoints
  • status() - Show current checkpoint status

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

MIT License - see LICENSE file for details.

🙋‍♂️ Support


Built with ❤️ for the Claude Code ecosystem

Deploy Server
-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

A smart, checkpoint‑based undo system for Claude Code. Automatically snapshots file states before modifications, deduplicates unchanged checkpoints, and enables lightning‑fast restoration so you can experiment confidently with AI‑driven edits.

  1. Features
    1. Example Agent Interaction
      1. 🚀 Quick Start
        1. Installation
        2. Claude Code Configuration
      2. Use Cases
        1. Available Functional Calls for Claude
          1. 🤝 Contributing
            1. 📄 License
              1. 🙋‍♂️ Support

                Related MCP Servers

                • -
                  security
                  A
                  license
                  -
                  quality
                  A comprehensive code analysis and management tool that integrates with Claude Desktop to analyze code at project and file levels, helping adapt changes to projects intelligently.
                  Last updated -
                  38
                  MIT License
                • A
                  security
                  A
                  license
                  A
                  quality
                  Provides intelligent transcript processing capabilities for Claude, featuring natural formatting, contextual repair, and smart summarization powered by Deep Thinking LLMs.
                  Last updated -
                  4
                  15
                  MIT License
                • A
                  security
                  F
                  license
                  A
                  quality
                  An intelligent MCP server that enables seamless restarting of Claude's MCP handler process without disrupting the UI, allowing for plugin reloading without closing the entire Claude Desktop application.
                  Last updated -
                  3
                  1
                  • Apple
                  • Linux
                • -
                  security
                  F
                  license
                  -
                  quality
                  Transforms Claude from a code generator into a programming partner capable of testing, debugging, and optimizing code automatically through a secure execution environment.
                  Last updated -

                View all related MCP servers

                MCP directory API

                We provide all the information about MCP servers via our MCP API.

                curl -X GET 'https://glama.ai/api/mcp/v1/servers/khalilbalaree/undo-mcp'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server