MCP Backup Server

by hexitex
Verified

local-only server

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

Integrations

  • Offers a complementary approach to Git with simpler, AI-focused backup capabilities for code. Unlike Git, the system creates instant backups with agent context without requiring commit messages or repository initialization, suitable for emergency 'save points' during edits.

  • Uses npm for installation and dependencies, with configuration settings for the MCP server that can be managed through npm scripts and environment variables.

  • Provides backup and restoration capabilities for TypeScript files, allowing targeted backups with pattern filtering (*.ts) and preserving agent context when making critical changes to TypeScript code.

MCP 백업 서버

AI 에이전트와 코드 편집 도구에 대한 백업 및 복원 기능을 제공하는 특수 MCP 서버입니다. Cursor 및 Windsurf 편집기에서 모두 테스트되었습니다.

저장소: https://github.com/hexitex/MCP-Backup-Server

왜 이것을 사용해야 하나요(Git이 아닌)

이 시스템은 Git과 다른 목적을 갖습니다.

장점:

  • 에이전트 컨텍스트를 사용하여 즉각적이고 타겟팅된 백업을 생성합니다.
  • 단일 작업 안전을 위해 Git보다 더 간단합니다.
  • 백업 시 사고 과정과 의도를 보존합니다.
  • 커밋 메시지나 브랜칭이 필요하지 않습니다.
  • 중요한 변경을 하는 AI 에이전트에게 더 좋습니다.
  • 저장소 초기화 없이 작동합니다.
  • 편집 중 긴급 "저장 지점"이 더 빠르게 처리됩니다.

단점:

  • 장기 버전 추적용이 아닙니다.
  • 제한된 협업 기능
  • 병합이나 갈등 해결 없음
  • 분산 백업 기능 없음
  • 적절한 버전 제어를 대체하지 않습니다
  • diff가 아닌 전체 파일 사본을 저장합니다.

사용 시기: 위험한 편집 전, 폴더 재구성 또는 맥락을 담은 빠르고 안전한 백업이 필요할 때.

대신 Git을 사용해야 하는 경우: 적절한 버전 기록, 협업 및 프로젝트 관리를 위해.

특징

  • 에이전트 컨텍스트와 추론을 보존합니다.
  • 타겟이 지정된 최소한의 백업을 생성합니다.
  • 파일 및 폴더 작업을 지원합니다
  • 버전 기록을 유지합니다
  • 안전을 복구합니다
  • 패턴 필터링을 사용합니다
  • 트랙 작업
  • 취소가 가능합니다

설정

지엑스피1

구성

환경:

  • BACKUP_DIR : 백업 디렉토리(./.code_backups)
  • EMERGENCY_BACKUP_DIR : 비상 백업(./.code_emergency_backups)
  • MAX_VERSIONS : 버전 제한(10)

편집기에서 구성:

Windsurf MCP 구성:

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

커서: 비슷한 구성으로 .cursor/mcp.json 생성합니다.

도구

파일 작업

  • backup_create : 컨텍스트를 사용하여 백업을 생성합니다.
  • backup_list : 사용 가능한 백업 목록
  • backup_restore : 안전 백업으로 복원

폴더 작업

  • backup_folder_create : 패턴 필터링을 통한 백업
  • backup_folder_list : 폴더 백업 목록
  • backup_folder_restore : 폴더 구조 복원

관리

  • backup_list_all : 모든 백업을 나열합니다
  • mcp_cancel : 작업 취소

백업을 사용해야 하는 경우

정말 필요할 때만 백업을 만드세요.

  1. 리팩토링 전 : 중요한 코드를 변경할 때
  2. 폴더 제거 전 : 프로젝트 구조를 재구성할 때
  3. 여러 관련 변경 사항 : 여러 개의 연결된 파일을 업데이트할 때
  4. 주요 작업 재개 : 중요한 변경 사항을 계속할 때
  5. 복원 전 : 복원하기 전에 안전 백업을 만드세요.

백업은 최소한으로, 목적에 맞게 실행하세요. 각 백업의 필요성을 문서화하세요.

복사-붙여넣기 규칙

Always try to use the backup MCP server for operations that require a backup, listing backups and restoring backups. Only backup before critical code changes, folder removal, changes to multiple related files, resuming major work, or restoring files. Keep backups minimal and focused only on files being changed. Always provide clear context for why a backup is being created. Use pattern filters to exclude irrelevant files from folder backups. Use relative file paths when creating backups. Create emergency backups before restore operations. Clean up old backups to maintain system efficiency. Backup tools: backup_create, backup_list, backup_restore, backup_folder_create, backup_folder_list, backup_folder_restore, backup_list_all, mcp_cancel.

인간 사용자를 위해

시작 부분에서 이와 같은 간단한 명령을 언급해야 할 수도 있습니다. MCP 도구

# Back up an important file "Back up my core file before refactoring" # Back up a folder before changes "Create backup of the API folder before restructuring" # Find previous backups "Show me my recent backups" # Restore a previous version "Restore my core file from this morning"

에이전트 예시

빠른 백업

// Before project changes { "name": "mcp0_backup_folder_create", "parameters": { "folder_path": "./src", "include_pattern": "*.{js,ts}", "exclude_pattern": "{node_modules,dist,test}/**", "agent_context": "Start auth changes" } } // Before core fix { "name": "mcp0_backup_create", "parameters": { "file_path": "./src/core.js", "agent_context": "Fix validation" } }

세션 재개

// View recent work { "name": "mcp0_backup_list_all", "parameters": { "include_pattern": "src/**/*.js" } } // Get last version { "name": "mcp0_backup_restore", "parameters": { "file_path": "./src/core.js", "timestamp": "20250310-055950-000", "create_emergency_backup": true } }

핵심 변경 사항

// Critical update { "name": "mcp0_backup_create", "parameters": { "file_path": "./src/core.js", "agent_context": "Add validation" } } // Module update { "name": "mcp0_backup_folder_create", "parameters": { "folder_path": "./src/api", "include_pattern": "*.js", "exclude_pattern": "test/**", "agent_context": "Refactor modules" } }

복원 지점

// Check versions { "name": "mcp0_backup_list", "parameters": { "file_path": "./src/core.js" } } { "name": "mcp0_backup_folder_list", "parameters": { "folder_path": "./src/api" } } // File restore { "name": "mcp0_backup_restore", "parameters": { "file_path": "./src/core.js", "timestamp": "20250310-055950-000", "create_emergency_backup": true } } // Folder restore { "name": "mcp0_backup_folder_restore", "parameters": { "folder_path": "./src/api", "timestamp": "20250310-055950-000", "create_emergency_backup": true } }

관리하다

// List recent { "name": "mcp0_backup_list_all", "parameters": { "include_pattern": "src/**/*.js" } } // Stop backup { "name": "mcp0_mcp_cancel", "parameters": { "operationId": "backup_1234" } }

특허

MIT

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

AI 에이전트와 코드 편집 도구에 대한 백업 및 복원 기능을 제공하는 전문 서버로, 컨텍스트를 보존하면서 즉각적인 대상 백업을 생성합니다.

  1. Why Use This (Not Git)
    1. Features
      1. Setup
        1. Config
          1. Tools
            1. File Operations
            2. Folder Operations
            3. Management
          2. When to Use Backups
            1. Rules for Copy-Paste
              1. For Human Users
                1. Agent Examples
                  1. Quick Backups
                  2. Resume Session
                  3. Core Changes
                  4. Restore Points
                  5. Manage
                2. License
                  ID: nghymq13i7