Skip to main content
Glama
dissectmac-mcp

dissectmac-mcp

by nocodegeeks

dissectmac-mcp

npm version CI License: MIT

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"]}}}

Related MCP server: @shieldfive/mcp

Tools

Tool

What it does

Writes?

storage_overview

Free 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 caution

No

scan_folder

Largest subfolders and files under a path

No

find_large_files

Large files with size, modified and last-used dates

No

list_apps

Apps in /Applications and ~/Applications with size, version and last used

No

find_app_leftovers

Support files, caches, preferences and launch agents an app left behind

No

move_to_trash

Moves the paths you chose to the Trash

Yes, 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 code

Meaning

0

Complete

1

Error, invalid input, or trash without --confirm

2

Path refused by the path guard

3

Partial 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.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to clean disk space by scanning and removing temporary files, caches, and duplicates through natural language commands via MCP protocol.
      1
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Official server for the ShieldFive end-to-end encrypted vault. Moves files off your computer into the vault, reading each copy back and verifying it before the original goes to a local trash folder (nothing deleted). Also finds duplicates by content and tidies folders. Decrypts on your machine; access is scoped, expiring, revocable and undoable.
      86 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables natural-language management of macOS disk cleanup by scanning large files, AI model weights, and caches, identifying duplicates, and safely moving files to Trash or permanently deleting them with confirmation.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables an AI assistant to measure macOS disk usage, investigate unfamiliar files and folders, identify cleanup candidates, and prepare numbered cleanup proposals that move approved items to the Trash only after server-side path checks.
      16 npm
      1
      MIT