Gives AI agents and code editors file and folder backup and restore, useful before risky code changes.
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
claude mcp add backup --env BACKUP_DIR='<BACKUP_DIR>' --env EMERGENCY_BACKUP_DIR='<EMERGENCY_BACKUP_DIR>' --env MAX_VERSIONS='<MAX_VERSIONS>' -- npx -y @smithery/cli install @hexitex/MCP-Backup-Server --client claude~/.codex/config.toml
[mcp_servers.backup]
command = "npx"
args = ["-y", "@smithery/cli", "install", "@hexitex/MCP-Backup-Server", "--client", "claude"]
env = { BACKUP_DIR = "<BACKUP_DIR>", EMERGENCY_BACKUP_DIR = "<EMERGENCY_BACKUP_DIR>", MAX_VERSIONS = "<MAX_VERSIONS>" }
# codex mcp add backup --env BACKUP_DIR='<BACKUP_DIR>' --env EMERGENCY_BACKUP_DIR='<EMERGENCY_BACKUP_DIR>' --env MAX_VERSIONS='<MAX_VERSIONS>' -- npx -y @smithery/cli install @hexitex/MCP-Backup-Server --client claude~/.cursor/mcp.json
{
"mcpServers": {
"backup": {
"command": "npx",
"args": [
"-y",
"@smithery/cli",
"install",
"@hexitex/MCP-Backup-Server",
"--client",
"claude"
],
"env": {
"BACKUP_DIR": "<BACKUP_DIR>",
"EMERGENCY_BACKUP_DIR": "<EMERGENCY_BACKUP_DIR>",
"MAX_VERSIONS": "<MAX_VERSIONS>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"backup": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@smithery/cli",
"install",
"@hexitex/MCP-Backup-Server",
"--client",
"claude"
],
"env": {
"BACKUP_DIR": "<BACKUP_DIR>",
"EMERGENCY_BACKUP_DIR": "<EMERGENCY_BACKUP_DIR>",
"MAX_VERSIONS": "<MAX_VERSIONS>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"backup": {
"command": "npx",
"args": [
"-y",
"@smithery/cli",
"install",
"@hexitex/MCP-Backup-Server",
"--client",
"claude"
],
"env": {
"BACKUP_DIR": "<BACKUP_DIR>",
"EMERGENCY_BACKUP_DIR": "<EMERGENCY_BACKUP_DIR>",
"MAX_VERSIONS": "<MAX_VERSIONS>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"backup": {
"command": "npx",
"args": [
"-y",
"@smithery/cli",
"install",
"@hexitex/MCP-Backup-Server",
"--client",
"claude"
],
"env": {
"BACKUP_DIR": "<BACKUP_DIR>",
"EMERGENCY_BACKUP_DIR": "<EMERGENCY_BACKUP_DIR>",
"MAX_VERSIONS": "<MAX_VERSIONS>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"backup": {
"command": "npx",
"args": [
"-y",
"@smithery/cli",
"install",
"@hexitex/MCP-Backup-Server",
"--client",
"claude"
],
"env": {
"BACKUP_DIR": "<BACKUP_DIR>",
"EMERGENCY_BACKUP_DIR": "<EMERGENCY_BACKUP_DIR>",
"MAX_VERSIONS": "<MAX_VERSIONS>"
}
}
}
}需要的环境变量
BACKUP_DIREMERGENCY_BACKUP_DIRMAX_VERSIONS
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。