Skip to content
Rowsafe
Docs

MCP server

Connect Claude Code, Claude Desktop and other MCP clients to Rowsafe. Every tool, the safety model and setup.

Rowsafe speaks the Model Context Protocol. AI assistants can check your fleet ("is everything backed up?", "why did this alert fire?") and, when you allow it, create restore points or queue backups and drills.

TransportCredentialsWrite tools
rowsafe mcpstdio, on your machineThe CLI's login, or ROWSAFE_API_KEYOff by default. --allow-restore-points or --allow-writes.
https://api.rowsafe.sh/mcpStreamable HTTPAuthorization: Bearer rsk_...Always listed. A read-only key can't use them.

For the safety-net workflow with coding agents, see Use Rowsafe with AI agents.

Set up

Log in with the CLI first (rowsafe login), then pick a mode:

# Read-only
claude mcp add rowsafe -- rowsafe mcp

# Read-only, plus restore points (what the Claude Code plugin uses)
claude mcp add rowsafe -- rowsafe mcp --allow-restore-points

# Everything: backups, drills, verification, adoption, schedules
claude mcp add rowsafe -- rowsafe mcp --allow-writes

# A specific key instead of your login, in every project
claude mcp add --scope user rowsafe -e ROWSAFE_API_KEY=rsk_... -- rowsafe mcp

--scope project writes .mcp.json into your repository for everyone: don't put a key in it. Use the stdio form (each developer's own login) there.

Safety model

  • Everything goes through the Rowsafe API, with the same API key, checks, plan limits and audit log as the CLI. Every change a tool makes is in rowsafe audit, attributed to the key.
  • Tools can only do what the API can do. They queue the fixed agent tasks and change schedules. Nothing runs commands or SQL, restarts PostgreSQL, restores a backup or reads backup contents: Rowsafe can't do those at all.
  • Read-only unless you say otherwise. rowsafe mcp registers read tools only. --allow-restore-points adds only create_restore_point. --allow-writes adds every write tool.
  • Not exposed at all: enrollment tokens, API keys, removing hosts or databases, plan changes, and agent update settings.
  • apply_adoption needs your approval. It refuses unless confirm is the database's exact name and a read-only plan succeeded. Its description tells the model to show you the plan and ask first, and never to pass force unless you asked.
  • Annotations. Read tools are marked read-only. apply_adoption and update_schedule (lowering retention deletes old backups) are marked destructive, so clients that confirm destructive calls will ask you.
  • No secrets in output. Bucket keys and the passphrase never leave your server. Outputs are capped in size.

Tools

ToolAccessWhat it does
fleet_healthreadEvery problem in the fleet, worst first, each with the next step.
get_orgreadPlan, limits and usage.
list_hostsreadHosts, online or not, agent version, update channel and state.
list_databasesreadDatabases with a health summary.
get_databasereadOne database in depth: settings, schedules, WAL, recent backups, drills, tasks and problems.
list_backupsreadBackups, newest first.
list_drillsreadRestore drills with failures and warnings.
list_tasksreadTasks, filtered by database, status and type.
get_taskreadOne task with its result, the end of its log and the next step.
safety_checkreadIs the database protected right now?
list_restore_pointsreadRestore points with their status and the backup to restore from.
create_restore_pointrestore pointsMark this moment by name, and wait until it is in your bucket.
plan_adoptionwriteRegister a database on a host and produce a read-only plan, or plan again.
apply_adoptionwrite, destructiveApply the plan. Needs confirm: "<database name>".
verify_databasewriteProve WAL reaches the bucket; activates the schedules.
run_backupwriteQueue a full, diff or incr backup.
run_drillwriteQueue a restore drill.
update_schedulewrite, destructiveChange the schedules (UTC cron) and retention_full.

There is also one prompt, incident_triage: check the fleet, read the evidence behind each problem, and propose next steps without changing anything.

Troubleshooting

  • "not logged in" in the client's MCP log: run rowsafe login, or set ROWSAFE_API_KEY in the server's environment.

  • Tools missing: write tools only appear with --allow-writes, restore points with --allow-restore-points. Restart the client after changing flags.

  • forbidden (403): This API key is read-only.: the key can only read.

  • A 402 error: a plan limit is reached. get_org shows your usage.

  • Smoke test without a client:

    printf '%s\n' \
      '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"t","version":"0"}}}' \
      '{"jsonrpc":"2.0","method":"notifications/initialized"}' \
      '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' | (cat; sleep 2) | rowsafe mcp
Edit on GitHub