Skip to main content

Disk Clean MCP Server

日本語 | English

Ask Claude or another AI assistant to "clean up my disk". This MCP server finds the files that eat your disk space and moves them to the trash.

  • Nothing is deleted. Items go to the OS trash, so you can restore them later
  • You always see a list first, and only the items you approve are moved
  • System folders are never touched

Supported OS: macOS / Linux / Windows

What it finds

Type Examples
Developer caches node_modules, __pycache__, Rust target/, build/ and dist/, Python virtual environments (.venv), ~/.gradle/caches, ~/.cargo/registry
Large, unused videos .mp4, .mov, .mkv and other videos over 100 MB that have not been opened or changed in 90 days
Old logs .log and .log.gz files not updated in 30 days

You can change the size and age limits when you ask (for example "videos over 500 MB" or "logs older than a year").


Install

Claude Desktop (easiest)

  1. Download the latest diskclean-mcp-server-*.mcpb from Releases
  2. Double-click the file, or drag it into Claude Desktop's Settings → Extensions
  3. Click Install

Claude Desktop sets up Python and everything else for you.

Other apps (Claude Code, Cline, manual setup)

These use uv to download and run the server. You do not need to install Python yourself.

Step 1. Install uv

macOS / Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows (PowerShell):

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Open a new terminal and check that uv --version works.

Step 2. Add the server to your app

Claude Code

claude mcp add --scope user diskclean -- uvx diskclean-mcp-server

--scope user makes it available in every project.

Optional: install the skill that teaches Claude the safe cleanup steps.

mkdir -p ~/.claude/skills/disk-cleanup
curl -fsSL https://raw.githubusercontent.com/Kate941-su/diskcleaner-mcp/main/.claude/skills/disk-cleanup/SKILL.md \
  -o ~/.claude/skills/disk-cleanup/SKILL.md

Claude Desktop (manual setup)

Open the config file:

OS Config file
macOS ~/Library/Application Support/Claude/claude_desktop_config.json
Windows %APPDATA%\Claude\claude_desktop_config.json

Add the following and restart Claude Desktop:

{
  "mcpServers": {
    "diskclean": {
      "command": "uvx",
      "args": ["diskclean-mcp-server"]
    }
  }
}

Cline (VS Code)

Open the config file from Cline's MCP Servers screen and add the same entry as above.


How to use

Ask your assistant in plain words:

My disk is full. Find files I don't need in my home folder.
Clean up all the node_modules folders under ~/projects.
Find videos in ~/Movies over 1 GB that I haven't watched in six months.
Show me what is using space in ~/Library/Caches, two levels deep.

What happens

  1. The assistant looks at the folder and tells you what is using the space
  2. You get a list of candidates (path, type, size, last modified) and the total space you can free. Nothing has been moved yet
  3. You say what to move ("all of them", "only node_modules", "everything except #3")
  4. Only the approved items go to the trash, and you get a report

Restoring files

Everything goes to the trash, so you can bring it back at any time.

  • macOS: open the Trash in Finder, right-click the item and choose Put Back
  • Windows: open the Recycle Bin, right-click the item and choose Restore
  • Linux: open the trash in your file manager and choose Restore (stored in ~/.local/share/Trash)

Disk space is actually freed when you empty the trash.

What is never moved

  • OS system folders (/usr, /System, C:\Windows, C:\Program Files, and so on)
  • Your home folder itself, and folders directly under the disk root
  • Anything that was not in the list you were shown
  • Symbolic links (and the files they point to)

build/ and dist/ only count as caches when a build file such as package.json sits next to them, so normal folders with the same name are not picked up by mistake.


Updating

The Claude Desktop extension: download the new .mcpb from Releases and install it again.

With uvx: uv keeps a cached copy. To get the latest version, run the following and restart your app.

uv cache clean diskclean-mcp-server

To always start the newest version, use "args": ["diskclean-mcp-server@latest"] instead. This checks for updates every time the server starts.


Troubleshooting

The tools don't show up in my assistant

  • Restart the app after changing settings
  • Claude Desktop may not find uvx. Put the full path in "command". Find it with which uvx on macOS / Linux or where uvx on Windows
  • In Claude Code, check with claude mcp list

"Some folders could not be read" (skipped_errors)

  • Folders you don't have permission to read are skipped. On macOS, giving the app Full Disk Access may help (System Settings → Privacy & Security)

The scan stopped early (timed_out)

  • One scan runs for up to 60 seconds. Ask for a smaller folder, such as ~/projects

For developers

See docs/DESIGN.md for the design, tool specs, development setup and release process (in Japanese).

License

MIT

Metadata

Release files for diskclean-mcp-server 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for diskclean-mcp-server 0.1.0
File Size Uploaded Provenance Actions
diskclean_mcp_server-0.1.0.tar.gz 14.7 kB With provenance Details for diskclean_mcp_server-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for diskclean-mcp-server 0.1.0
File Interpreter ABI Platform Actions
diskclean_mcp_server-0.1.0-py3-none-any.whl Python 3 none any Details for diskclean_mcp_server-0.1.0-py3-none-any.whl

Total release size: 32.7 kB

Release files / diskclean_mcp_server-0.1.0.tar.gz

Download URL diskclean_mcp_server-0.1.0.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
280dc52b2b2edba6217f6e5a9ad8033196096bd815178e8c6fc199b65a45f5cb
BLAKE2b-256 checksum
How to use checksums
dd3297e127fce3d654847e8e5e361c5397ffaeeed34b500fa0c8ce111158cc9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Release files / diskclean_mcp_server-0.1.0-py3-none-any.whl

Download URL diskclean_mcp_server-0.1.0-py3-none-any.whl
Size 17.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
644ce4c9b0150e70f8881e27d6a6f2f1c39e8466e9a892062ba523d70c874aff
BLAKE2b-256 checksum
How to use checksums
8095df55e5587135c15b56ce2d54e41f5a480ba86dc12da3889c03abf3ee92cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Security for diskclean-mcp-server 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for diskclean_mcp_server-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page