Undo MCP server

Provides checkpoint-based version control with intelligent undo functionality that tracks file changes, creates restoration points before modifications, and enables precise rollback of changes or removal of newly created files through automated deduplication.
Back to servers
Setup instructions
Provider
khalilbalaree
Release date
Aug 24, 2025
Stats
7 stars

Rewind MCP is a smart and lightweight checkpointing server for Claude Code CLI that automatically creates checkpoints before code modifications. It provides complete undo support, allowing you to restore modified files, recover deleted files, or remove unwanted files across your project with just a few commands.

Installation

To install the Rewind MCP server:

git clone https://github.com/khalilbalaree/Rewind-MCP.git
cd Rewind-MCP
npm install
npm run build

Configuration

You need to add the Rewind MCP server to your Claude Code MCP configuration using one of these methods:

User-Based Configuration (Global)

Edit your Claude configuration file at ~/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

For easier sharing, 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

Usage

Rewind MCP automatically creates checkpoints before Claude makes changes to your code. Here's how you can interact with it:

Available Commands

You can ask Claude to perform these checkpoint operations:

  • 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

Example Workflow

Here's a typical workflow with Rewind MCP:

👤 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"

Features

  • Smart Checkpointing: Automatically captures project states before Claude makes changes
  • Complete Undo Support: Restore modified files, recover deleted files, or remove unwanted files
  • Fast Multi-File Restore: Rewind changes across multiple files instantly

The Rewind MCP server integrates seamlessly with Claude Code, giving you peace of mind when making complex code changes with an AI assistant.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "Rewind-MCP" '{"command":"node","args":["/absolute/path/to/Rewind-MCP/dist/index.js"],"env":[]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "Rewind-MCP": {
            "command": "node",
            "args": [
                "/absolute/path/to/Rewind-MCP/dist/index.js"
            ],
            "env": []
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "Rewind-MCP": {
            "command": "node",
            "args": [
                "/absolute/path/to/Rewind-MCP/dist/index.js"
            ],
            "env": []
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later