MCP Backup Server

MCP Backup Server

Instant backup and restore solution for AI agents and code editors with context preservation.

12
Stars
5
Forks
12
Watchers
0
Issues
MCP Backup Server is a specialized server that enables instant and contextual backups for AI agents and code editing tools. It preserves agent context and reasoning, providing targeted and minimal backups without the complexity of traditional version control systems. The tool is designed for situations requiring quick, context-aware safety backups, supporting both file and folder operations and restore functions. It integrates with editors like Cursor and Windsurf using the Model Context Protocol.

Key Features

Preserves agent context and reasoning in backups
Supports instant creation of targeted backups
Backup and restore for both files and folders
Pattern-based filtering for folder backups
Operation tracking and history management
Allows cancellation of ongoing backup operations
Maintains a version limit for storage efficiency
Emergency backup directory configuration
Simple setup with Smithery or manual installation
Integration with Cursor and Windsurf editors using MCP

Use Cases

Creating quick safety backups before risky edits or refactoring
Restoring code and project state after accidental changes
Preserving agent thought process and intent for auditing code edits
Managing backups in single-operation critical code sessions
Providing emergency restore points during debugging
Backing up folder structures before major workspace reorganizations
Listing and managing backups without traditional version control
Protecting work when collaborating with AI code assistants
Minimizing interruption by enabling minimal, focused backups
Ensuring safe rollback before file or folder removal operations

README

MseeP.ai Security Assessment Badge

MCP Backup Server

smithery badge

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:

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

Installing Manually

bash
# 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:

json
{
  "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

  • backup_list_all: List all backups
  • mcp_cancel: Cancel operations

When to Use Backups

Only create backups when truly needed:

  1. Before Refactoring: When changing important code
  2. Before Removing Folders: When reorganizing project structure
  3. Multiple Related Changes: When updating several connected files
  4. Resuming Major Work: When continuing significant changes
  5. Before Restores: Create safety backup before restoring

Keep backups minimal and purposeful. Document why each backup is needed.

Rules for Copy-Paste

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.

For Human Users

Simple commands like these at the start you may have to mention MCP tool

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

Agent Examples

Quick Backups

json
// 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"
  }
}

Resume Session

json
// 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
  }
}

Core Changes

json
// 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"
  }
}

Restore Points

json
// 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
  }
}

Manage

json
// List recent
{
  "name": "mcp0_backup_list_all",
  "parameters": {
    "include_pattern": "src/**/*.js"
  }
}

// Stop backup
{
  "name": "mcp0_mcp_cancel",
  "parameters": {
    "operationId": "backup_1234"
  }
}

License

MIT

Star History

Star History Chart

Repository Owner

hexitex
hexitex

User

Repository Details

Language JavaScript
Default Branch main
Size 46 KB
Contributors 3
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

JavaScript
74.77%
TypeScript
24.43%
Dockerfile
0.8%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • YAMCP

    YAMCP

    Unified management and orchestration of Model Context Protocol servers via a local gateway workspace.

    YAMCP is a command-line tool that enables organizing and managing multiple MCP (Model Context Protocol) servers as unified workspaces. It allows users to connect to various local or remote MCP servers, group them by functionality or application, and expose them as a single MCP server gateway for AI applications. The tool simplifies monitoring and debugging by centralizing server communication logs and provides workspace management and runtime control. YAMCP facilitates seamless integration with AI applications by providing a consolidated configuration and context management interface.

    • 57
    • MCP
    • hamidra/yamcp
  • fast-filesystem-mcp

    fast-filesystem-mcp

    Advanced filesystem operations and large file management for Claude Desktop environments.

    fast-filesystem-mcp provides fast, memory-efficient file operations tailored for Claude Desktop using the Model Context Protocol. It supports chunked and streaming reads/writes, backup and recovery features, and advanced directory and file management tools. The implementation includes settings for debugging, logging, and error handling to seamlessly integrate with Claude Desktop's workflow.

    • 26
    • MCP
    • efforthye/fast-filesystem-mcp
  • Mastra

    Mastra

    A TypeScript framework for building scalable AI-powered agents and applications.

    Mastra is a modern TypeScript-based framework designed for developing AI-powered applications and autonomous agents. It offers model routing to integrate over 40 AI providers, a graph-based workflow engine, advanced context management, and production-ready tools for observability and evaluation. Mastra features built-in support for authoring Model Context Protocol (MCP) servers, enabling standardized exposure of agents, tools, and structured AI resources via the MCP interface.

    • 18,189
    • MCP
    • mastra-ai/mastra
  • ImageSorcery MCP

    ImageSorcery MCP

    Local image recognition and editing tools for AI assistants

    ImageSorcery MCP provides AI assistants with advanced image processing capabilities, all executed locally for privacy and efficiency. It offers a suite of tools for editing, analyzing, and enhancing images, including cropping, resizing, object detection, and OCR. The software leverages pre-trained models and OpenCV techniques to handle a wide range of image tasks without requiring cloud services. Designed for AI integration, it allows natural language prompts to control image manipulation and recognition workflows.

    • 236
    • MCP
    • sunriseapps/imagesorcery-mcp
  • Agentset MCP

    Agentset MCP

    Open-source MCP server for Retrieval-Augmented Generation (RAG) document applications.

    Agentset MCP provides a Model Context Protocol (MCP) server designed to power context-aware, document-based applications using Retrieval-Augmented Generation. It enables developers to rapidly integrate intelligent context retrieval into their workflows and supports integration with AI platforms such as Claude. The server is easily installable via major JavaScript package managers and supports environment configuration for namespaces, tenant IDs, and tool descriptions.

    • 22
    • MCP
    • agentset-ai/mcp-server
  • Thales CSM MCP Server

    Thales CSM MCP Server

    Intelligent secrets and key management server with AI-powered app security migration.

    Thales CSM MCP Server provides automated secrets and DFC key management through a Model Context Protocol-compliant HTTP server, integrating seamlessly with Thales CipherTrust and Akeyless. It supports intelligent app creation with built-in CipherTrust integration, as well as migration of existing apps by scanning for hardcoded secrets, classifying them, and updating code securely. The platform offers end-to-end workflows, from secret creation and management to account and analytics handling, all designed for compliance and developer empowerment.

    • 0
    • MCP
    • sanyambassi/thales-cdsp-csm-mcp-server
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results