Skip to main content
The UniFi MCP Server gives your AI assistant the ability to manage the full backup lifecycle for your UniFi controller—creating backups on demand, scheduling automated runs, downloading backup files with integrity verification, and restoring from a previous backup when needed. Every destructive operation is protected by mandatory confirmation and dry-run preview.
Restore operations are destructive and will overwrite your current configuration. They may also cause the controller to restart and temporarily disconnect devices. Always use dry_run=True to preview a restore, and let the server create a pre-restore backup (enabled by default) so you can roll back if needed.

What you can do

Manual backups

Trigger network or full system backups on demand with configurable retention.

Automated scheduling

Set up daily, weekly, or monthly backup schedules with custom retention policies.

Download and verify

Download backup files to local storage with SHA-256 checksum verification.

Restore

Restore from any listed backup with automatic pre-restore safety backup.

Backup types

UniFi supports two backup types: For most environments, network backups are sufficient and faster to create and restore.

Creating a manual backup

Example prompts:
  • “Create a backup of the network configuration”
  • “Back up the controller now before I make changes”
1

Preview the backup

Response:
2

Create the backup

Response:
Pass retention_days: -1 to keep a backup indefinitely.

Listing and inspecting backups

Example prompts:
  • “List all available backups”
  • “Show me details about the backup from April 20th”
Response:
To see details about a specific backup file:

Downloading a backup

The download_backup tool saves a backup file to your local filesystem and optionally computes a SHA-256 checksum to verify file integrity. Example prompt: “Download the latest backup to /tmp/unifi-backup.unf and verify it”
Response:
Store the checksum value alongside your backup file to verify integrity before a restore.

Validating a backup

Before restoring, you can validate a backup to check file size, validity flags, and version compatibility.
Response:

Restoring from a backup

Restoring from a backup will overwrite your current UniFi configuration. The controller may restart and devices may temporarily disconnect during the restore process (typically 2–5 minutes). This operation requires confirm=True and cannot be undone without the pre-restore backup.
By default, restore_backup automatically creates a safety backup of your current configuration before applying the restore. This gives you a rollback point if something goes wrong. Example prompt: “Restore the controller from the backup made on April 20th”
Dry-run response:
Response:

Scheduling automated backups

The schedule_backups tool configures recurring backups on a daily, weekly, or monthly schedule. Example prompts:
  • “Schedule daily network backups at 3 AM”
  • “Set up weekly system backups on Sundays at 2 AM with 90-day retention”

Schedule parameters

View the current schedule

Deleting a backup

Backup deletion is permanent and cannot be undone. Download the file first if you might need it later.

Safety summary