HM

hexitex/mcp-backup-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

12 stars 6 forks 质量 69 趋势 19MIT

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

概览

A specialized MCP server that provides backup and restoration capabilities for AI agents and code editing tools. Tested in both Cursor and Windsurf editors. Repository: https://github.com/hexitex/MCP-Backup-Server This system serves a different purpose than Git: - Creates instant, targeted backups with agent context - Simpler than Git for single-operation safety - Preserves thought process and intent in backups - No commit messages or branching required - Better for AI agents making critical changes - Works without repository initialization - Faster for emergency "save points" during edits - Not for long-term version tracking - Limited collaboration features - No merging or conflict resolution - No distributed backup capabilities - Not a replacement for proper version control - Stores complete file copies rather than diffs Before risky edits, folder restructuring, or when you need quick safety backups with context.

README

以下为原文 README 节选,完整内容请查看原文。

MCP Backup Server

A specialized MCP server that provides backup and restoration capabilities for AI agents and code editing tools. Tested in both Cursor and Windsurf editors.

Repository: https://github.com/hexitex/MCP-Backup-Server

Why Use This (Not Git)

This system serves a different purpose than Git:

Pros:

  • Creates instant, targeted backups with agent context
  • Simpler than Git for single-operation safety
  • Preserves thought process and intent in backups
  • No commit messages or branching required
  • Better for AI agents making critical changes
  • Works without repository initialization
  • Faster for emergency “save points” during edits

Cons:

  • Not for long-term version tracking
  • Limited collaboration features
  • No merging or conflict resolution
  • No distributed backup capabilities
  • Not a replacement for proper version control
  • Stores complete file copies rather than diffs

When to use: Before risky edits, folder restructuring, or when you need quick safety backups with context.

When to use Git instead: For proper version history, collaboration, and project management.

Features

  • Preserves agent context and reasoning
  • Creates targeted, minimal backups
  • Supports file and folder operations
  • Maintains version history
  • Provides restore safety
  • Uses pattern filtering
  • Tracks operations
  • Allows cancellation

Setup

Installing via Smithery

To install Backup Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @hexitex/MCP-Backup-Server --client claude

Installing Manually

# Install dependencies
npm install

# Build TypeScript files
npm run build

# Start the backup server
npm start

Config

Env:

  • BACKUP_DIR: Backup directory (./.code_backups)
  • EMERGENCY_BACKUP_DIR: Emergency backups (./.code_emergency_backups)
  • MAX_VERSIONS: Version limit (10)

Configure in editor:

Windsurf MCP config:

{
  "mcpServers": {
    "backup": {
      "command": "node",
      "args": ["./dist/index.js"],
      "env": {
        "BACKUP_DIR": "./.code_backups",
        "EMERGENCY_BACKUP_DIR": "./.code_emergency_backups",
        "MAX_VERSIONS": "20"
      }
    }
  }
}

Cursor: Create .cursor/mcp.json with similar config.

Tools

File Operations

  • backup_create: Create backup with context
  • backup_list: List available backups
  • backup_restore: Restore with safety backup

Folder Operations

  • backup_folder_create: Backup with pattern filtering
  • backup_folder_list: List folder backups
  • backup_folder_restore: Restore folder structure

Management

在 GitHub 查看完整 README

安装

npx -y @smithery/cli install @hexitex/MCP-Backup-Server --client claude
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "backup": { "command": "node", "args": ["./dist/index.js"], "env": { "BACKUP_DIR": "./.code_backups", "EMERGENCY_BACKUP_DIR": "./.code_emergency_backups", "MAX_VERSIONS": "20" } } } }