Labsco
MCP SERVER

Recover a file from a ZFS snapshot by describing what you want back — browse, diff, grep and restore across remote hosts over SSH, read-only unless you opt in.

Local Filesystem Access
Summary
Built around four questions, not around the zfs command set.

The tool list is grouped by what people actually need — get this file back as it was, work out when something changed, see what was on the box when it broke, find which snapshots are eating the pool — and that shows in tools like the last-appearance lookup, which is how you find out when a file was deleted, or the binary search across snapshots for where a change landed. The write boundary is the other notable thing: read-only is the default, enforced by an allowlist on the remote agent rather than by convention, and turning restores on takes two deliberate settings.

What it is

An MCP server for exploring and recovering from ZFS snapshots on remote hosts. It runs a single-file, stdlib-only Python agent over one persistent SSH connection per host — streamed on connect, so nothing has to be installed remotely beyond python3 and the `zfs` CLI. Read-only is enforced on the agent side by an explicit method allowlist.

What you get
  • Discovery: configured hosts, agent version and limits, pools with a parsed `zpool status` showing vdev tree, scrub and errors, datasets and their properties — `list_hosts`, `agent_info`, `list_pools`, `pool_status`, `list_datasets`, `dataset_properties`
  • Snapshot inventory and housekeeping: snapshots with filters, a cadence summary of counts and gaps, stale snapshots sorted by uniqueness, and bytes written between two snapshots — `list_snapshots`, `snapshot_cadence`, `stale_snapshots`, `size_delta`
  • Browsing inside a snapshot with sizes: bounded directory listing, recursive byte totals per child, and the largest files under a subtree — `list_dir`, `size_breakdown`, `top_consumers`
  • Reading content: bounded file reads in UTF-8 or base64, filename search, regex content search, and a full-file SHA-256 for integrity checks — `read_file`, `find_files`, `content_grep`, `checksum_file`
  • Tracing change over time: path-level diff between snapshots, a unified diff of one file across two, every version of a file, distinct versions deduped by hash, which snapshots contain a path, when it first and last appeared, what was deleted in a window, and a binary search for the snapshot where a predicate flips — `diff_snapshots`, `file_diff`, `file_history`, `versions_of`, `snapshots_containing`, `first_appearance`, `last_appearance`, `find_deleted`, `bisect_change`
  • Recovery to your own machine over SFTP — `fetch_file`, `fetch_dir`
  • Restore in place on the server, the only writable tools: off per host by default, requiring both an enable flag and a non-empty path allowlist — `restore_file`, `restore_dir`
Requirements

SSH access to the ZFS hosts, and on each host python3 3.11 or newer plus the `zfs` CLI — the agent itself is streamed over SSH or can be pre-installed. Locally: `uv tool install zsnoop-mcp`, a `hosts.toml` under your config directory naming each host's SSH target, then register the server with your client. Restores stay refused until you set the enable flag and a non-empty restore path allowlist for that host, so with the stock config nothing on the remote can be written.

Setup effort

One command — uv tool install zsnoop-mcp