backrest-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOG_FILE | No | Log file path | stderr |
| LOG_LEVEL | No | Logging verbosity | INFO |
| BACKREST_URL | No | Backrest base URL | http://localhost:9898 |
| INFLUXDB_ORG | No | Organization | |
| INFLUXDB_URL | No | InfluxDB write URL | |
| INFLUXDB_TOKEN | No | Auth token | |
| INFLUXDB_BUCKET | No | Bucket | backrest |
| BACKREST_PASSWORD | No | Basic Auth password | |
| BACKREST_READONLY | No | Disable all write tools | true |
| BACKREST_USERNAME | No | Basic Auth username (optional) | |
| BACKREST_AUDIT_LOG | No | JSONL audit log for write ops | |
| REQUESTS_CA_BUNDLE | No | Path to CA certificate for HTTPS | |
| BACKREST_ALLOW_DESTRUCTIVE | No | Enable forget/restore (requires READONLY=false) | false |
| BACKREST_RESTORE_ALLOWED_PREFIX | No | Restore target path guard | /tmp/backrest-restore/ |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Backrest MCP server — read/manage the Backrest backup manager running on forge (http://localhost:9898). Provides read access to backup operations, snapshots, configuration, dashboard stats, and operation logs. Start with get_health to confirm the instance is reachable and credentials are valid. To answer 'is this path backed up?' call find_plan_for_path; to see what each plan covers call list_plans; to check for missed or failing backups call get_backup_freshness. Use get_config only when you need repo settings too. Write tools (trigger_backup, do_repo_task, cancel_operation) are only registered when BACKREST_READONLY=false. Destructive tools (forget_snapshot, restore_snapshot) additionally require BACKREST_ALLOW_DESTRUCTIVE=true. RunCommand/SetConfig/AddRepo/RemoveRepo/ClearHistory are intentionally not exposed.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_healthA | Check that Backrest is reachable and credentials are valid. Wraps GetConfig — the call that returns 200 with valid credentials and 401 when they drift. Returns status "ok", "auth_failed", or "unreachable", plus the configured URL and a repo/plan count when healthy. Read-only; safe to poll. |
| get_configA | Read a secret-free view of the Backrest configuration (repos, plans, auth). Returns an allowlist projection, not the raw config:
Never included: repo passwords, env values, restic flags, hook commands and targets (webhook URLs, tokens), user password hashes, the multihost sync block (identity, pairing secrets), or any field not listed above. |
| list_plansA | List the backup plans: which paths each backs up, to which repo, and when. Returns the same secret-free projection of each plan as get_config: id, repo, paths, excludes, iexcludes, schedule, retention, skipIfUnchanged, backupFlagCount and hooks (action type names only). Prefer this to get_config when you only need plans. |
| find_plan_for_pathA | Find which backup plans cover an absolute path, and whether an exclude drops it. |
| get_backup_freshnessB | Report, per plan, when it last backed up successfully and whether that is stale. |
| list_snapshotsB | List snapshots in a Backrest repo, optionally filtered by repo or plan. |
| list_snapshot_filesC | Browse files within a specific snapshot. |
| get_summaryA | Get the Backrest dashboard summary — 30-day stats per repo and plan. Returns per-repo and per-plan success/warning/failed backup counts, bytes scanned/added, total snapshots, and the next scheduled backup time. |
| get_operationsA | List recent backup operations, optionally filtered by plan or repo. |
| get_logsC | Fetch the log output for an operation. |
| get_download_urlA | Get a signed download URL for a file produced by a restore operation. Companion to restore_snapshot: after a restore, fetch a URL to download a specific restored file. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 11 tools
Most tools have clearly distinct purposes (health, config, plans, snapshots, operations, logs, freshness, summary). There is mild overlap between get_config and list_plans (same projection) and between get_summary, get_backup_freshness and get_operations, but the descriptions explicitly steer the agent ("Prefer this to get_config when you only need plans").
Uniform verb_noun snake_case pattern: get_*, list_*, find_*. get_download_url and find_plan_for_path are slightly longer but follow the same convention and read clearly.
11 tools is well within the 3-15 sweet spot for a Backrest monitoring/read surface. Each tool maps to a concrete read operation with no filler entries.
The surface is read-only and omits lifecycle actions: no backup trigger/run_plan, no restore, no plan or repo create/update/delete, so agents can diagnose but never act. Worse, get_download_url is explicitly a companion to a restore_snapshot tool that is not present, creating a dead end.