spacecleaner-mcp
# spacecleaner-mcp
An MCP server that lets your AI assistant (Claude, Cursor, ChatGPT desktop, any MCP client) answer
**"What is filling my Mac?"** and **"Can I delete this?"** from your own disk.
It is **read-only**: it measures folders and explains them. It never deletes, moves, renames or
uploads anything, and it sends nothing over the network. When you want to clean up, it points you to
[Junk Raccoon](https://junkraccoon.com/?ref=mcp-readme), a free Mac app that moves everything to the
Trash and puts it all back with one Undo.
## Tools
| Tool | What it answers |
|---|---|
| `disk_overview` | How full the startup disk is, and the biggest folders in your home folder (or any folder). |
| `what_can_i_free` | Known space-takers that exist on this Mac (caches, Xcode and Android build files, simulators, package caches, AI models, old iPhone backups...), biggest first, each marked **safe**, **careful** or **keep**, with what it holds. |
| `is_it_safe_to_delete` | A verdict for any path: safe, careful, do not delete, your own files, or unknown. Warns when the path is inside a git repository with uncommitted or unpushed work. |
| `find_large_files` | Files above a size (default 500 MB) under a folder, biggest first. |
| `open_junk_raccoon` | Opens Junk Raccoon if it is installed, otherwise gives the download link. Cleans nothing by itself. |
The verdicts come from a list of 280+ macOS folders written for
[junkraccoon.com/folders](https://junkraccoon.com/folders/) (what each folder is, whether apps rebuild
it, and what you lose if you delete it).
## Install
Needs Node.js 18.15 or newer.
**Claude Code**
```sh
claude mcp add spacecleaner -- npx -y github:HalberdLLC/spacecleaner-mcp
```
**Claude Desktop** (Settings → Developer → Edit Config), **Cursor** (`~/.cursor/mcp.json`) and most other clients:
```json
{
"mcpServers": {
"spacecleaner": { "command": "npx", "args": ["-y", "github:HalberdLLC/spacecleaner-mcp"] }
}
}
```
Then ask: *"What is taking up space on my Mac?"*, *"Is ~/Library/Developer/Xcode/DerivedData safe to
delete?"*, *"Find files over 2 GB in my Downloads."*
To measure folders inside `~/Library` completely, give the app that runs the server (Claude, Cursor,
Terminal) **Full Disk Access** in System Settings → Privacy & Security. Without it some folders are
reported as "at least" a size.
## Safety
- No tool writes to the disk. Sizes come from `du` (it does not follow links) with time limits, so a
huge folder cannot hang your assistant.
- `is_it_safe_to_delete` only gives an opinion. Deleting stays your decision, and the safest way is
the Trash, so it can come back.
- Nothing is sent anywhere. The folder list ships inside the package.
## Develop
```sh
npm install
npm test # runs against a made-up home folder (SPACECLEANER_HOME), never yours
```
Made by [Halberd Labs](https://junkraccoon.com/about/). MIT licence.
TDQS
Scored across 5 tools
Each tool has a distinguishable role: disk_overview reports overall fullness, find_large_files lists big files, what_can_i_free surfaces known junk folders, is_it_safe_to_delete judges an arbitrary path, and open_junk_raccoon launches an external app. The main soft overlap is between disk_overview's 'biggest folders' section and find_large_files (folders vs. files) and between what_can_i_free and is_it_safe_to_delete (both return verdicts), but the descriptions make the boundary reasonably clear.
All names use snake_case, but the conventions are mixed: two are noun/verb phrases (disk_overview, find_large_files) while three are conversational questions or imperative sentences (what_can_i_free, is_it_safe_to_delete, open_junk_raccoon). It reads fine and names are memorable, but there is no single predictable pattern an agent can rely on.
Five tools is a tight, well-scoped set for a disk-cleanup advisor, and each one covers a distinct step in the workflow (overview, drill-down, junk candidates, safety check, handoff to cleaner). No tool feels redundant or bolted on.
The read-only advisory lifecycle is well covered: discover space usage, find large files, identify known junk, verify safety before deletion, and hand off cleaning to an external app. Minor gaps exist — no way to compare results after cleaning, find duplicate files, or batch-check multiple paths in one call — but agents can work around these.