Get the FREE Ultimate OpenClaw Setup Guide →

MCP-Backup

A Model Context Protocol (MCP) server implementation that provides file backup and restoration capabilities

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio hexitex-mcp-backup-server node ./dist/index.js \
  --env BACKUP_DIR="./.code_backups" \
  --env MAX_VERSIONS="20" \
  --env EMERGENCY_BACKUP_DIR="./.code_emergency_backups"

How to use

MCP-Backup is a specialized server designed to create targeted backups of your AI agent and code editing sessions, along with safe restoration capabilities. It supports file and folder backups, pattern-filtered directory backups, and a set of management commands to list, restore, and cancel operations. You can run backups from within editor integrations (Windsurf or Cursor) and control backup behavior via environment variables and MCP tool commands. Use this server to capture precise save points before risky edits, refactors, or folder reorganizations, and restore quickly if needed while preserving context and agent reasoning.

To use it, configure the MCP client in your editor to point to the backup MCP server (usually named backup). Then leverage commands like backup_create, backup_list, backup_restore, backup_folder_create, backup_folder_list, backup_folder_restore, and backup_list_all to manage backups. For folder backups, you can apply include and exclude patterns to focus backups on relevant files, and you can customize where backups are stored by adjusting BACKUP_DIR and related environment variables in the editor configuration.

How to install

Prerequisites:

  • Node.js and npm installed on your system
  • Access to the MCP server repository or package

Installation steps:

  1. Install dependencies and build the project (from the repository root): npm install npm run build

  2. Start the backup server (development or production): npm start

  3. If you prefer installing via Smithery (as shown in the README): npx -y @smithery/cli install @hexitex/MCP-Backup-Server --client claude

  4. Confirm the server is running and listening on the configured port, and verify environment variables are set as described in the Config section (BACKUP_DIR, EMERGENCY_BACKUP_DIR, MAX_VERSIONS).

Additional notes

Notes and tips:

  • The backup system stores complete file copies (not diffs) for quick restoration points. Use MAX_VERSIONS to cap storage.
  • Set BACKUP_DIR and EMERGENCY_BACKUP_DIR to appropriate locations to suit your workspace and retention needs.
  • For editor integrations, ensure the Windsurf or Cursor MCP config points to the backup server’s command and arguments (node ./dist/index.js).
  • When performing folder backups, use include_pattern and exclude_pattern to keep backups focused and efficient.
  • Always create an emergency backup before performing a restore operation to guard against unintended changes.
  • If you encounter permission issues, verify filesystem permissions for the backup directories and ensure Node has access to write there.

Related MCP Servers

Sponsor this space

Reach thousands of developers