Add smart Backup ability to coding agents like Windsurf, Cursor, Cluade Coder, etc
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
This system serves a different purpose than Git:
Pros:
Cons:
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.
To install Backup Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @hexitex/MCP-Backup-Server --client claude
# Install dependencies
npm install
# Build TypeScript files
npm run build
# Start the backup server
npm start
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:
{
"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.
backup_create
: Create backup with contextbackup_list
: List available backupsbackup_restore
: Restore with safety backupbackup_folder_create
: Backup with pattern filteringbackup_folder_list
: List folder backupsbackup_folder_restore
: Restore folder structurebackup_list_all
: List all backupsmcp_cancel
: Cancel operationsOnly create backups when truly needed:
Keep backups minimal and purposeful. Document why each backup is needed.
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.
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"
// 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
Provides access to your iTerm session, requiring iTerm2 and Node.js.
Provides the current UTC time from multiple verified sources.
A simple tool to pause execution for a specified number of seconds.
An MCP server that enables LLMs to create or update Notion pages and generate Markdown Books (mdbooks).
Automate browser actions using natural language commands. Powered by Playwright and supports multiple LLM providers.
An MCP server for interacting with a Paperless-NGX API server. This server provides tools for managing documents, tags, correspondents, and document types in your Paperless-NGX instance.
Interact with Home Assistant to control smart home devices, query states, manage automations, and troubleshoot your smart home setup.
An MCP server for Microsoft OneNote, allowing AI models to interact with notebooks, sections, and pages. Requires Azure credentials.
Integrates with the Scenext AI platform to generate educational videos on various topics.
Interact with Google Workspace services like Gmail and Google Calendar.