mac-cleaner
Cleans Android build and cache directories (e.g., Gradle/Android caches) to free disk space.
Cleans Docker reclaimable space such as dangling images, containers, and volumes.
Cleans Gradle build caches used by Android and Java projects.
Cleans Homebrew cache files to recover disk space.
Cleans iOS DeviceSupport files that accumulate on the system from device connections.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mac-cleaner Scan for junk and show what can be cleaned"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mac-cleaner-mcp
A conservative macOS developer/storage cleaner exposed through the official Model Context Protocol TypeScript SDK. It is not a full disk optimizer: it reports first, refuses broad destructive locations, and supports dry runs.
Tools
scan_junk: DerivedData, iOS DeviceSupport, Gradle/Android cache, Homebrew cache, Node package cache, Docker reclaimable space,~/Library/Caches, large Downloads files (>100 MB), and discoverednode_modules.clean_junk: accepts categories and defaults todryRun: true. Only DerivedData, DeviceSupport, Android/Gradle, Homebrew, and Docker can be cleaned. Downloads, node_modules, and broad cache roots are intentionally refused.get_disk_usage: runsdffor a selected path.
Related MCP server: mcp-local-sandbox-cleaner
Install and run
Requires macOS, Node.js 20+, and optionally Docker. Do not run as root.
git clone https://github.com/FFFames/mac-cleaner-mcp.git
cd mac-cleaner-mcp
npm install
npm run build
node dist/index.jsMCP uses stdio, so the process should be launched by the MCP client. Cleaning can delete files; inspect the dry-run output and keep backups before setting dryRun: false.
Claude Desktop / Cursor
Add the absolute path to dist/index.js in the client's MCP configuration:
{"mcpServers":{"mac-cleaner":{"command":"node","args":["/ABSOLUTE/PATH/mac-cleaner-mcp/dist/index.js"]}}}Restart the client, call scan_junk, then call clean_junk with selected categories and dryRun: true. Use false only after reviewing the result. Cursor supports the same stdio MCP server configuration through its MCP settings.
Poke / remote bridge
For a local Poke-compatible bridge, run this server as a child process and proxy MCP JSON-RPC stdin/stdout over an authenticated HTTPS endpoint. A simple option is an SSH/HTTP bridge or ngrok in front of your own bridge process:
ngrok http 8787Configure the bridge's upstream command as node /ABSOLUTE/PATH/mac-cleaner-mcp/dist/index.js, then register the HTTPS ngrok URL with your Poke/MCP connection. Never expose an unauthenticated endpoint; use an ngrok auth token, allowlist callers, and rotate the URL/token. The cleaner itself is local-only and has no network listener.
Safety
The implementation uses explicit category allowlists, no shell wildcard expansion, dry-run by default, and refuses Downloads, node_modules, and the entire user cache root. Review source and test on a noncritical account before use.
Available Tools
3 toolsclean_junkA
Safely remove selected caches. Always dry-run first.
Inputs: categories (required), dryRun.
get_disk_usageC
Report disk capacity and free space.
Inputs: path.
scan_junkD
Scan macOS developer/system caches and reclaimable space.
Inputs: categories.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clear, distinct purpose: scanning for junk, cleaning junk, and reporting disk usage. No overlap or ambiguity between them.
All tool names follow a consistent verb_noun snake_case pattern (scan_junk, clean_junk, get_disk_usage), making them predictable and readable.
With only 3 tools, the set is minimal but well-scoped for its intended purpose. The count is within the ideal 3-15 range and each tool contributes to the core workflow.
The set covers the essential lifecycle: scan to find junk, clean to remove it, and get_disk_usage for context. Minor gaps like granular junk category selection or detailed scan reports are absent but not critical.
Maintenance
Related MCP Connectors
Scan configs, files, or text for leaked secrets and obvious misconfigurations. Nothing stored.
Stop your agent before it runs rm -rf /etc or emails your .env. Deterministic preflight checks.
Checks AI-written code for leaked keys and made-up packages, on your machine. Never uploads code.
IaC, CI and dependency security review for coding agents: local scan CLI plus hosted OAuth MCP.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to scan a developer machine for disk space hogs, audit git worktrees for stale or orphaned ones, re-check individual findings, and run allowlisted cleanup actions as dry runs unless explicitly confirmed. Risky items are reported with warnings and refused by default.58 npm2MIT
- AlicenseAqualityCmaintenanceEnables AI coding agents to audit and sweep away transient scratch directories, bloated test caches, and forgotten probe scripts in a workspace, with dry-run previews to guarantee nothing tracked or production-related is touched. It also detects zombie background dev servers still holding common ports like 3000, 5173, and 8000.31MIT
- AlicenseNot gradedqualityBmaintenanceRead-only disk analysis and reversible cleanup for macOS 13 and later. Scans the Mac and shows what is actually taking space, then moves only the items you approve to the Trash — no rm -rf, and every operation is undoable.34Apache 2.0
- AlicenseAqualityCmaintenanceEnables AI assistants to scan a Mac for reclaimable disk space and safely move selected items to the Trash, with dry-run defaults, protected paths, and confirmation before permanent deletion.12MIT