BackupForge provides a Model Context Protocol (MCP) server that allows AI assistants like Claude to interact with your backup system.
The Model Context Protocol (MCP) is an open protocol that standardizes how AI applications interact with external data sources and tools. With BackupForge's MCP server, you can:
- Create backups through natural language
- List and query snapshots
- Restore files using AI assistance
- Get storage statistics
- Create and manage backup jobs
- Access disaster recovery prompts and guidance
backup_directory- Backup a local directorylist_snapshots- List all backup snapshotsget_snapshot_info- Get details about a snapshotrestore_snapshot- Restore from a snapshotget_storage_stats- View storage statisticscreate_backup_job- Create scheduled backup jobsverify_backup- Verify backup integrityestimate_backup_size- Estimate backup size
backupforge://snapshots- List of all snapshotsbackupforge://jobs- Configured backup jobsbackupforge://storage/stats- Storage statisticsbackupforge://config- Current configuration
create_backup_plan- Get help creating a backup strategydisaster_recovery- Disaster recovery guidanceoptimize_storage- Storage optimization tips
cd /home/ajs/backup/backupforge
cargo build --release --bin backupforge-mcpThe binary will be at: target/release/backupforge-mcp
Edit your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
Add the BackupForge MCP server:
{
"mcpServers": {
"backupforge": {
"command": "/home/ajs/backup/backupforge/target/release/backupforge-mcp",
"env": {
"BACKUPFORGE_STORAGE": "/var/lib/backupforge/storage"
}
}
}
}Close and reopen Claude Desktop to load the MCP server.
BACKUPFORGE_STORAGE- Path to backup storage (default:/var/lib/backupforge/storage)RUST_LOG- Log level (debug, info, warn, error)
{
"mcpServers": {
"backupforge": {
"command": "/usr/local/bin/backupforge-mcp",
"args": [],
"env": {
"BACKUPFORGE_STORAGE": "/mnt/backups/storage",
"RUST_LOG": "info"
}
}
}
}Once configured, you can interact with BackupForge through Claude:
User: Backup my Documents folder using BackupForge with encryption
Claude: I'll backup your Documents folder with encryption enabled.
[Uses backup_directory tool]
✅ Backup completed successfully!
Snapshot ID: 550e8400-e29b-41d4-a716-446655440000
Files: 1,245
Total Size: 524288000 bytes
Compressed: 262144000 bytes (50.0% ratio)
User: Show me all my backups
Claude: Here are your backup snapshots:
[Uses list_snapshots tool]
...
User: How much storage am I using for backups?
Claude: Let me check your storage statistics.
[Uses get_storage_stats tool]
📊 Storage Statistics
Total Bytes: 10737418240
Deduplication Ratio: 45.2%
...
User: I need help recovering from ransomware
Claude: I'll guide you through ransomware recovery.
[Uses disaster_recovery prompt]
⚠️ CRITICAL: DO NOT PAY THE RANSOM
...
You can test the MCP server manually using stdio:
cd /home/ajs/backup/backupforge
cargo build --release --bin backupforge-mcp
# Run the server
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' | ./target/release/backupforge-mcpExpected response:
{
"jsonrpc": "2.0",
"result": {
"protocolVersion": "2024-11-05",
"capabilities": {
"tools": {},
"resources": {},
"prompts": {}
},
"serverInfo": {
"name": "backupforge-mcp",
"version": "0.1.0"
}
},
"id": 1
}echo '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | ./target/release/backupforge-mcpecho '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"estimate_backup_size","arguments":{"source_path":"/home/user/test"}}}' | ./target/release/backupforge-mcpSet the RUST_LOG environment variable:
{
"mcpServers": {
"backupforge": {
"command": "/usr/local/bin/backupforge-mcp",
"env": {
"RUST_LOG": "debug"
}
}
}
}Logs will be written to stderr and can be viewed in Claude Desktop's logs.
macOS:
tail -f ~/Library/Logs/Claude/mcp*.logLinux:
tail -f ~/.config/Claude/logs/mcp*.log- Check that the binary path is correct
- Ensure the binary is executable:
chmod +x /path/to/backupforge-mcp - Verify environment variables are set
- Check Claude Desktop logs for errors
Ensure the MCP server has permission to access storage:
sudo chown -R $USER:$USER /var/lib/backupforge
chmod 700 /var/lib/backupforge/storage- Check that storage path exists
- Verify you have read/write permissions
- Ensure enough disk space is available
- File System Access: The MCP server runs with your user permissions and can access any files you can access
- Storage Path: Ensure the storage path is on a secure, backed-up volume
- Encryption: Use encryption for sensitive data
- Network: The MCP server uses stdio (no network exposure)
{
"mcpServers": {
"backupforge": {
"command": "/usr/local/bin/backupforge-mcp",
"env": {
"BACKUPFORGE_STORAGE": "/mnt/nas/backups"
}
}
}
}You can configure multiple MCP servers for different backup repositories:
{
"mcpServers": {
"backupforge-personal": {
"command": "/usr/local/bin/backupforge-mcp",
"env": {
"BACKUPFORGE_STORAGE": "/home/user/backups"
}
},
"backupforge-work": {
"command": "/usr/local/bin/backupforge-mcp",
"env": {
"BACKUPFORGE_STORAGE": "/mnt/work-backups"
}
}
}
}Current version (v0.1.0) limitations:
- Snapshot listing requires database integration (coming in v0.2.0)
- Restore functionality requires database integration (coming in v0.2.0)
- Job scheduling requires server component (coming in v0.2.0)
- Read the BackupForge Documentation
- Learn about MCP Protocol
- Join the Discussion
Found a bug or have a feature request? Open an issue!