Repository avatar
Other Tools
v0.1.0
active

dissectmac-mcp

io.github.nocodegeeks/dissectmac-mcp

Find what is eating your Mac's disk and move it to the Trash after you confirm. Read-only otherwise.

Documentation

dissectmac-mcp

npm version CI License: MIT dissectmac-mcp on Glama

Let your AI agent find what is filling your Mac's disk, then move it to the Trash after you say yes.

It is an MCP server and a CLI for macOS. It needs Node 22.12 or later.

Install

Claude Desktop

Download dissectmac-mcp.mcpb from the latest release and open it. Claude Desktop installs it as an extension.

Or add this to ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop:

{"mcpServers":{"dissectmac":{"command":"npx","args":["-y","dissectmac-mcp"]}}}

Claude Code

claude mcp add dissectmac -- npx -y dissectmac-mcp

Or install it as a plugin. The plugin runs the npm package through npx, so Node 22.12 or later must be on your PATH.

claude plugin marketplace add nocodegeeks/dissectmac-mcp
claude plugin install dissectmac@dissectmac

Cursor

Add this to ~/.cursor/mcp.json:

{"mcpServers":{"dissectmac":{"command":"npx","args":["-y","dissectmac-mcp"]}}}

Windsurf

Add this to ~/.codeium/windsurf/mcp_config.json:

{"mcpServers":{"dissectmac":{"command":"npx","args":["-y","dissectmac-mcp"]}}}

Tools

ToolWhat it doesWrites?
storage_overviewFree and used space (used is total minus free, so it covers the whole disk and not only the system volume), local Time Machine snapshots and known caches, each tagged safe or cautionNo
scan_folderLargest subfolders and files under a pathNo
find_large_filesLarge files with size, modified and last-used datesNo
list_appsApps in /Applications and ~/Applications with size, version and last usedNo
find_app_leftoversSupport files, caches, preferences and launch agents an app left behindNo
move_to_trashMoves the paths you chose to the TrashYes, only with confirm: true

The server also ships a free_up_space prompt. It walks the agent through a scan, a shortlist and your confirmation.

Over MCP each tool call stops after 45 seconds, inside the 60 second limit most clients use. If a scan runs out of time you get what it measured so far, marked partial. The CLI allows longer scans.

Safety

  • Everything runs on your Mac. The server makes no network calls and sends no telemetry.
  • Five of the six tools only read. Only move_to_trash changes anything.
  • move_to_trash never deletes. Without confirm: true it returns a preview of what would move and how big it is.
  • Items go to the Trash through macOS's file manager API. They stay recoverable in the Trash, but Finder's "Put Back" may not work for them.
  • A path guard refuses protected locations. It never touches /System, ~/Library/Keychains, Mail, Messages, Photos, Calendars, Contacts, Notes, Safari data, iCloud Drive, cloud storage folders under ~/Library/CloudStorage or .git internals.
  • Whole top-level folders such as ~/Documents cannot be trashed. Their contents can.
  • External drives under /Volumes are supported.
  • If one path in a call is refused, nothing in that call is moved.
  • Some folders are protected by macOS. Give your AI client app Full Disk Access in System Settings > Privacy & Security so scans can include them.
  • DISSECTMAC_MCP_TIMEOUT_MS overrides every tool timeout. It is a testing knob. A value below 2000 disables trashing.

CLI

The same tools work from the terminal. Add --json to any command for the raw result.

npx dissectmac-mcp overview
npx dissectmac-mcp scan ~/Library --depth 2 --min 100 --limit 20
npx dissectmac-mcp large ~ --min 500 --older 180
npx dissectmac-mcp apps
npx dissectmac-mcp leftovers "Google Chrome"
npx dissectmac-mcp trash ~/Downloads/old.dmg            # preview only
npx dissectmac-mcp trash ~/Downloads/old.dmg --confirm  # move to the Trash
npx dissectmac-mcp capabilities --json

capabilities lists every tool with its JSON Schema, the exit codes and the environment variables.

Exit codeMeaning
0Complete
1Error, invalid input, or trash without --confirm
2Path refused by the path guard
3Partial result (a probe timed out or some items failed)

Run with no arguments and it starts the MCP server on stdio.

Why not the app?

This server gives an agent the raw numbers and a confirm-first way to trash things. Dissect Mac shows the same disk as a treemap you can click through, with an uninstaller and a preview before you empty the Trash.

License

MIT. See LICENSE.

NPM
dissectmac-mcp
Install Command
npm install dissectmac-mcp