Back to MCP directory
publicPublicdnsLocal runtime

backup-server

一个专为AI代理和代码编辑工具设计的备份恢复服务器,提供快速安全备份功能,适用于高风险操作前的即时备份。

article

README

🚀 MCP 备份服务器

MCP 备份服务器是一个专门的服务器,可提供 AI 代理和代码编辑工具的备份与恢复功能,在 Cursor 和 Windsurf 编辑器中均经过测试,能为开发者的代码和项目保驾护航。

🚀 快速开始

MCP 备份服务器是一个专为开发人员设计的工具,旨在帮助你轻松管理代码和项目的备份。无论你是进行重大更改还是小修小补,这个工具都能为你提供可靠的保护。

✨ 主要特性

  • 文件备份:支持单个文件的备份。
  • 目录备份:支持整个目录及其包含文件的备份。
  • 过滤选项:可以根据模式包括或排除特定文件。
  • 上下文记录:在备份时记录操作的上下文信息,方便后续恢复和追溯。

📦 安装指南

通过 Smithery 安装:

# 示例命令行代码
# (请根据实际仓库地址进行替换)

手动安装:

  1. 克隆仓库:

    git clone https://github.com/hexitex/MCP-Backup-Server.git
    cd MCP-Backup-Server
    
  2. 安装依赖:

    npm install
    
  3. 启动服务器:

    node index.js
    

📚 详细文档

配置指南

环境变量配置:

# 示例环境变量配置
PORT=3000  # 服务运行端口,默认为3000
DB_URI=mongodb://localhost:27017/backupdb  # 数据库连接地址

配置文件示例:

// config.json
{
  "port": 3000,
  "database": {
    "uri": "mongodb://localhost:27017/backupdb",
    "collection": "backups"
  },
  "logging": {
    "level": "info",
    "file": "backup.log"
  }
}

💻 使用示例

基础用法

备份单个文件:

{
  "name": "mcp0_backup_create",
  "parameters": {
    "file_path": "./src/core.js",
    "agent_context": "修复验证逻辑"
  }
}

备份整个目录:

{
  "name": "mcp0_backup_folder_create",
  "parameters": {
    "folder_path": "./src/api",
    "include_pattern": "*.js",
    "exclude_pattern": "test/**",
    "agent_context": "重构模块"
  }
}

恢复文件:

{
  "name": "mcp0_backup_restore",
  "parameters": {
    "file_path": "./src/core.js",
    "timestamp": "20250310-055950-000",
    "create_emergency_backup": true
  }
}

📄 许可证

MIT License

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client