MCP 备份服务器是一个专门的服务器,可提供 AI 代理和代码编辑工具的备份与恢复功能,在 Cursor 和 Windsurf 编辑器中均经过测试,能为开发者的代码和项目保驾护航。
MCP 备份服务器是一个专为开发人员设计的工具,旨在帮助你轻松管理代码和项目的备份。无论你是进行重大更改还是小修小补,这个工具都能为你提供可靠的保护。
# 示例命令行代码
# (请根据实际仓库地址进行替换)
克隆仓库:
git clone https://github.com/hexitex/MCP-Backup-Server.git
cd MCP-Backup-Server
安装依赖:
npm install
启动服务器:
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