AI agents (MCP)

Restorly speaks the Model Context Protocol, so an AI agent (Claude Code, Claude Desktop, or your own agent) can tell you which backups failed and why, and start runs when you ask it to. Team, Business and Enterprise plans (module api.mcp, on by default where the licence allows it).

The MCP server is part of the agent. It makes no outbound connections: the AI agent connects to Restorly, never the other way round. Every tool calls the REST API with the token the AI agent was given, so it can never do more than that token may, and Restorly's audit log records each of its actions as that token's, marked via: mcp.

Connect an AI agent

  1. Create a token for it, with the least scope it needs:
    sudo restorly token create claude --scope read      # look, explain
    sudo restorly token create claude --scope operate   # also start runs
  2. Connect the AI agent.

    On the Restorly host (Claude Code, Claude Desktop, any client that starts a local MCP server): it runs restorly mcp, which talks to the agent on this host. With Claude Code:

    claude mcp add restorly -e RESTORLY_TOKEN=rst_… -- restorly mcp

    restorly mcp finds the agent from agent.listen in /etc/restorly/config.yaml (and trusts its self-signed certificate); --url and --token-file point elsewhere.

    From another machine: the agent serves MCP at /mcp on its listener, for example https://restorly.example.lan:8420/mcp, with the token as a bearer token. The listener must be reachable from there (agent.listen on a LAN address, with TLS). With Claude Code:

    claude mcp add --transport http restorly https://restorly.example.lan:8420/mcp \
      --header "Authorization: Bearer rst_…"
  3. Optionally give it Restorly's skill, which explains the checks and how to read a failed run. For Claude Code:
    mkdir -p ~/.claude/skills/restorly && restorly mcp skill > ~/.claude/skills/restorly/SKILL.md

Then ask, for example: "Which backups failed this week, and why?", "Is anything not validated on time?", "Run shop-prod now and tell me the result."

What it may do

ToolsToken scopeSetting
get_status, list_databases, get_database, list_runs, get_run (every check with what was expected and what was found), get_capacity, get_readiness, list_kept_restores, get_retention, list_modulesreadalways
run_now, run_drill, run_upgrade_rehearsal, backup_now, acknowledge_failure, clear_acknowledgementoperatealways
delete_kept_restore, clean_up_runneroperatemcp.full_access
run_anyway (no disk check)adminmcp.full_access
inspect_kept_restore (a read-only query in a kept failed restore)adminmcp.inspect

An AI agent sees only the tools it may use. It never reads secrets, never changes the configuration and never deletes backups.

Settings → General → AI agents (MCP) (admins) turns on the two settings, each after you tick that you accept its risk; the change is in the audit log. In the configuration file:

mcp:
  full_access: false   # Run anyway, deleting kept restores, cleaning up runners
  inspect: false       # queries in kept restores: customer data to the AI

What to weigh

  • What the AI agent reads leaves with it. Database names, file names, check results, row counts and error messages go to the AI agent and, for a hosted model, to its provider. Your backups themselves never do. With mcp.inspect on, query results from a kept restore (your customers' data) do too: turn it on only for a model you are allowed to give that data.
  • Text from your systems can carry instructions. A table or file name can be written to mislead an AI agent. Restorly's tools tell the agent to treat what they return as data, and the agent can only do what its token and these settings allow, but give it the least scope it needs and keep full_access off unless you need it.
  • Every action is yours on record. The audit log (Settings → Audit log, GET /api/v1/audit) shows each action with the token's name and via: mcp. Revoke a token at any time: restorly token revoke claude.