Skip to content

MCP server (AI assistants)

ngbackup-mcp is an NGBackup extension: a Model Context Protocol server that exposes the Web Console’s authenticated REST API as tools an AI assistant can call. Connect it to Claude Code, Claude Desktop or any MCP client and the assistant can list jobs, read a failed job’s log, run or cancel jobs, and inspect clients, volumes, pools and storages — all through the same authenticated, audited channel the Web Console itself uses. Nothing talks to the daemons directly.

All configuration lives in the NGBackup conf tree, in /opt/backup/etc/backup-mcp.conf:

Console {
Name = default
Address = http://127.0.0.1:9180
ApiToken = ngbt_xxxxxxxxxxxxxxxx
}
  • Address — the Web Console base URL. HTTPS with a self-signed certificate is accepted (the token, not the certificate, is the access gate).
  • ApiToken — a personal API token minted in the Web Console (Settings → API tokens). The token carries the minting user’s role, so mint it from an account whose permissions match what you want the assistant to be able to do.

For ad-hoc runs (development, a laptop pointed at a remote console) the environment variables NGBACKUP_MCP_CONF, NGBACKUP_CONSOLE_URL and NGBACKUP_CONSOLE_TOKEN override the conf file.

Claude Code:

Terminal window
claude mcp add ngbackup -- ngbackup-mcp

Claude Desktop (claude_desktop_config.json):

{ "mcpServers": { "ngbackup": { "command": "ngbackup-mcp" } } }

The server speaks MCP over stdio; there is no port to open.

ToolWhat it does
list_jobsRecent jobs with status, level, bytes, errors
job_logFull Director joblog for one job id
run_jobRun a configured job (optional client/level/pool/storage/when overrides)
cancel_jobCancel a running job
list_clientsDirector clients with version and address
client_statusLive status of one client’s File daemon
director_statusDirector overview: running / scheduled / terminated
jobs_healthPer-job success/failure aggregates
list_volumesVolumes with pool, status, bytes, retention
list_poolsPools with volume counts and limits
list_storagesStorage daemons/devices known to the Director

Typical prompts once connected: “why did last night’s PG-Cluster backup fail?” (the assistant chains list_jobs → job_log), “run an incremental of srv-files now”, “which volumes are full?”.

  • Every call is a normal Web Console API request: token-authenticated, role-checked and written to the console audit log like any operator action.
  • The server is read-write only to the extent of the tools above — restores, configuration changes and deletions are deliberately not exposed in this version.
  • Revoking the token in the Web Console immediately cuts the assistant off.