MCP-Backup
A Model Context Protocol (MCP) server implementation that provides file backup and restoration capabilities
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:
-
Install dependencies and build the project (from the repository root): npm install npm run build
-
Start the backup server (development or production): npm start
-
If you prefer installing via Smithery (as shown in the README): npx -y @smithery/cli install @hexitex/MCP-Backup-Server --client claude
-
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
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.