The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Disk Inventory MCP listing page.
A local, read-only disk analyzer for macOS, with a CLI and an MCP server in one native executable. Find large files and folders, inspect file-extension breakdowns, and see exactly where a scan was incomplete.
v0.1.0 is a read-only preview. It has no deletion, Trash, cleanup execution, or content-reading tools. Requires macOS 13 or later. No runtime dependencies beyond macOS frameworks.
Recommended: install from the project's Homebrew tap (builds from source; requires Xcode Command Line Tools with Swift 5.9 or later):
GitHub Releases also provides a universal Intel/Apple Silicon .tar.gz, an MCP bundle (.mcpb), corresponding source, and SHA256SUMS. Downloadable binaries are ad-hoc signed, not Developer ID signed or Apple notarized. Homebrew builds from source. MCP bundle import depends on client support and may be subject to macOS security checks.
JSON output includes summary, top_children, and file_types. Byte counts are decimal strings to preserve 64-bit precision. Top children are immediate children of the root; directory totals include their descendants. CLI exit codes: 0 complete, 2 invalid invocation, 3 incomplete (JSON remains usable).
Configure any MCP client that launches local stdio servers. Replace the example paths with absolute paths on your computer; use command -v disk-inventory to find the installed executable. The example below uses the usual Apple Silicon Homebrew location:
Add more --root, PATH pairs to grant additional directories. The server refuses to launch without an explicit root and rejects scan paths outside those roots, including symlink escapes. An MCPB-compatible client can instead import the release bundle and prompt for one allowed directory.
Example prompts:
.zip files.”| Tool | Purpose |
|---|---|
list_roots | Show directories granted at launch |
scan_start | Start a bounded background metadata scan; return a scan ID |
scan_status | Progress, final totals, skipped paths, and accounting caveats |
scan_cancel | Cooperatively stop the active scan |
query_usage | Sort/filter results, paginate, or drill into a directory ID |
file_types | Paginated file-extension groups |
The server implements newline-delimited JSON-RPC over stdio, initialization, ping, and tools. It negotiates protocol versions 2025-11-25, 2025-06-18, and 2025-03-26. Tool results include both structured JSON and serialized text. Scan jobs are application-level IDs; this release does not advertise the optional MCP Tasks capability. Poll status at sensible intervals (for example once per second).
0. IDs are meaningful only within their scan. parent_id returns immediate children; omitting it considers all descendants. Avoid summing directory totals with their children.st_blocks * 512, with device/inode deduplication for hard links. Shared hard-link storage is assigned to the first encountered path, so per-folder attribution can vary with enumeration order.complete=false. Totals then describe only observed data. Up to 100 issue details are returned, with a full issue count. Entries can report zero observed bytes and complete=false; that does not mean empty.The executable makes no network requests, contains no telemetry, and writes no scan cache. It returns paths, sizes, and error details to the invoking CLI or MCP client. That client may send tool results to its model provider or retain logs according to its own settings. Treat filenames as untrusted data. Keep granted roots limited to what you intend to analyze.
The integration tests use generated temporary fixtures: regular files, hard links, sparse files, symlink loops/escapes, unreadable directories, hostile filenames, pagination, cancellation, CLI exit codes, and MCP protocol errors. They do not scan personal directories. Optional interoperability tests use the official Python MCP SDK; see tests/sdk_interop.py.
GPL-3.0-or-later; see LICENSE. This is a new Swift implementation informed by the assessment of Tjark Derlien's Disk Inventory X and TreeMapView. It does not bundle their Objective-C source, artwork, TreeMapView, Omni frameworks, or CocoaTech components, and is not an official release of Disk Inventory X. The GPL license text is reproduced from the public Disk Inventory X checkout. Original upstream ownership and notices remain in their respective repositories.
Planned follow-ups: persistent scan comparisons, evidence-based cleanup previews, then separately reviewed cleanup execution. These are not features of v0.1.0.