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-cleanerScan 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: sweep-mcp
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.
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | ||
| categories | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavior on its own. It hints at safety with 'Safely' and the dry-run instruction, which implies this is a destructive operation that can be previewed. But it does not state what gets permanently destroyed, whether confirmation is needed, or any permission requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short, front-loaded sentences deliver purpose and the critical safety tip with zero waste. The instruction is immediately actionable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is a simple mutation with two parameters and no output schema. The description covers the essential safety guidance but omits what happens after running (e.g., return value, confirmation prompts) and does not specify any prerequisites or side effects beyond the dry-run caution. It is adequate but not exhaustive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description should compensate, but it adds no parameter-specific information. The schema's enum values (e.g., 'derivedData', 'brew') are self-explanatory, and the default for dryRun is documented in the schema, but the description does not clarify how parameters interact or what the consequence of each selection is.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a clear verb ('remove') and resource ('selected caches'), and the qualifier 'selected' signals user-controlled scope. It distinguishes this from scan_junk (which likely scans) and get_disk_usage (which measures usage) via the explicit removal action.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The instruction 'Always dry-run first' provides an important safety guideline for usage. However, it does not explicitly mention when to use this tool versus alternatives (e.g., 'run scan_junk first to identify caches'), leaving that routing implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_disk_usageC
Report disk capacity and free space.
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | / |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It implies a read-only operation ('report') but doesn't describe the output format, whether it scans the entire disk or just a mount point, or any side effects. This minimal disclosure is insufficient for a tool with no annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that fronts the core action. There is no fluff. However, its brevity omits essential context, making it minimal rather than well-structured; it earns its place but doesn't provide enough value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with one optional parameter and no output schema, the description is incomplete. It fails to clarify whether the report covers the whole disk, a specific path, or what the output looks like. It doesn't explain how the path parameter affects results, leaving the agent without enough information to use the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for the undocumented 'path' parameter. However, the description makes no mention of 'path' whatsoever. An agent receives no explanation of what the parameter does, its default value, or how it affects the report.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Report disk capacity and free space.' It uses a specific verb (report) and resource (disk usage), and the subject matter distinctly separates it from siblings scan_junk and clean_junk, which deal with junk files. However, it doesn't explicitly mention the path parameter or differentiate itself by name, so it falls short of a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. The description doesn't mention the siblings or any conditions for when checking disk usage would be appropriate, leaving the agent to infer when this tool should be invoked.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
scan_junkD
Scan macOS developer/system caches and reclaimable space.
| Name | Required | Description | Default |
|---|---|---|---|
| categories | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must cover behavior. It says 'Scan' which implies a read-only operation, but it does not explicitly state that it does not modify anything, nor does it disclose what it returns (e.g., a list of caches, sizes). No permissions or side effects are mentioned, leaving significant behavioral ambiguity.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, which is concise, but it is under-specified rather than efficiently detailed. It front-loads the verb 'Scan' but provides no useful structure or breakdown of capabilities. It is more an under-specification than a model of conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations, no output schema, and a parameter with zero schema descriptions, the description is grossly incomplete. An agent cannot determine what the tool returns, how to use the categories parameter, or how this tool relates to cleaning and disk usage. Essential information is entirely absent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The only parameter, 'categories', is an array with enum values, but the schema lacks any descriptions (coverage 0%). The description does not mention the parameter at all, so the agent has no idea what values to pass or what they control. Description fails to compensate for the schema gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the verb 'Scan' and the resource 'macOS developer/system caches and reclaimable space', which conveys a broad intent but is vague. It does not distinguish from sibling tools like clean_junk or get_disk_usage, and the phrase 'reclaimable space' is not a concrete resource. It is not a tautology, but it lacks specificity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives such as clean_junk or get_disk_usage. There is no mention of prerequisites, typical use cases, or exclusions. The agent is left to infer the tool's role in the workflow.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v1.0.0- First observed
clean_junk - First observed
get_disk_usage - First observed
scan_junk
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.
Run verified read-only code tools: quant diagnostics + agent-ops preflight, no source exposure.
Compliance & security scan for your app: secrets, exposed files, headers, privacy, AI-disclosure.
Related MCP Servers
AlicenseAqualityCmaintenanceMCP server for macOS disk cache management. Enables AI agents to free disk space on demand by scanning and clearing developer caches.131Sustainable Use v1.0- AlicenseNot gradedqualityBmaintenanceEnables LLM agents to safely reclaim disk space by deleting build artifact directories like node_modules, .venv, and target, with strong guardrails to prevent accidental or malicious deletion.MIT
- AlicenseNot gradedqualityBmaintenanceEnables local-only review and organization of Apple Notes on macOS with safety-gated moves, snapshots, one-use authorization, and rollback, without deletion or content editing.MIT
- AlicenseNot gradedqualityCmaintenanceEnables safe, local DevOps inspection through a JSON-lines server with schema validation, path isolation, and redaction, supporting read-only Git operations, Kubernetes YAML validation, Terraform plan summaries, and sanitized log analysis.MIT