list_hostsLABSCO 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 statusshowing 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
USE CASES
Getting back a file you overwrote
Find which snapshots contain it, diff the versions to pick the right one, and copy it down to your workstation.
Working out when a config drifted
Read every version of the file across snapshots, deduped by hash, and binary-search for the snapshot where the change appeared.
Finding what was deleted last week
List paths removed between two snapshots in a time window, and see when each was last present.
Reclaiming space without deleting the wrong thing
Look at snapshot cadence, the stale ones sorted by unique bytes, and the largest consumers inside a snapshot before removing anything.
30 tools
Listed in project docs. Your client may show a different list.
agent_infolist_poolspool_statuslist_datasetsdataset_propertieslist_snapshotssnapshot_cadencestale_snapshotssize_deltalist_dirsize_breakdowntop_consumersread_filefind_filescontent_grepchecksum_filediff_snapshotsfile_difffile_historyversions_ofsnapshots_containingfirst_appearancelast_appearancefind_deletedbisect_changefetch_filefetch_dirrestore_filerestore_dirBEFORE YOU INSTALL
What to know first
Tools you get
30 tools named in the project's documentation.
Requires
zsnoop-mcp on PATH
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
uv tool install zsnoop-mcpMCP Clients
Claude Code
{
"mcpServers": {
"zsnoop": {
"command": "zsnoop-mcp"
}
}
}