diskdiet
Find and free developer cache and old node_modules disk space, with an AI-assistant mode
- Pricing
- Open source
- Platforms
- CLI, macOS, Linux
- Runs
- Locally
- Version
- 0.7.1
- Listing updated
- 2 days ago
About diskdiet
diskdiet is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
diskdiet's pitch is a scan before any deletion: it shows what uses space across package caches, build tools, simulators and Docker, then removes only items unchanged for a cutoff, 30 days by default. It covers npm, Yarn, pnpm, Bun, pip, uv, Cargo, Go, Gradle, Maven, Playwright, Cypress, Xcode, Android SDK, Homebrew, CocoaPods, Docker, plus forgotten node_modules and target folders. A single binary runs on macOS, Linux and Windows.
For AI assistants, the MCP mode has two tools: scan_disk_usage changes nothing, and free_disk_space removes only what the scan showed for the sources you pick, after asking for confirmation. A Claude Code plugin adds a skill so that a 'no space left on device' error gets diagnosed and fixed in conversation.
The same project also ships a desktop app with a menu-bar icon and optional scheduled cleanup, a VS Code extension, and a GitHub Action that can clear runner caches and unused preinstalled SDKs. The command line has dry-run, per-source filters and a trash option for node_modules and target.
Install
Run in a terminal
claude mcp add diskdiet -- npx -y diskdietAdd to claude_desktop_config.json
{
"mcpServers": {
"diskdiet": {
"command": "npx",
"args": [
"-y",
"diskdiet"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"diskdiet": {
"command": "npx",
"args": [
"-y",
"diskdiet"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"diskdiet": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"diskdiet"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"diskdiet": {
"command": "npx",
"args": [
"-y",
"diskdiet"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"diskdiet": {
"command": "npx",
"args": [
"-y",
"diskdiet"
]
}
}
}Tools this server provides (2)
Taken from the project documentation; the running server may differ.
- scan_disk_usage
- Scans disk usage without changing anything.
- free_disk_space
- Removes what the scan showed for chosen sources after confirmation.
What it does
- Scan before cleaning
- Shows what can be freed, changing nothing.
- Age cutoff
- Removes only items unchanged for a set time, 30 days by default.
- Many sources
- Covers package managers, SDKs, simulators and Docker.
- Confirmation step
- Assistant cleanup asks before removing anything.
- Desktop and VS Code
- App with tray icon and an editor extension.
- CI action
- GitHub Action to clear runner disk space.
Good for
- Diagnose a full disk from Claude Code
- Clear old node_modules from forgotten projects
- Free space on a GitHub-hosted runner
- Preview a cleanup with dry-run before deleting
Pricing
Open source
diskdiet FAQ
Will it delete everything?
No. By default it removes only entries unchanged for 30 days, and you can change the cutoff or use --dry-run.
How do I add it as an MCP server?
Run claude mcp add diskdiet -- diskdiet mcp.
Does it touch my node_modules in CI?
The GitHub Action never touches your project's node_modules.
Which systems does it run on?
macOS, Linux and Windows.
Is diskdiet free?
Yes. diskdiet is open source, so you can use and self-host it for free.
How do I add diskdiet to Claude Code?
Run this command in your terminal: claude mcp add diskdiet -- npx -y diskdiet
What are the best alternatives to diskdiet?
The closest alternatives to diskdiet are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.
Alternatives to diskdiet

REA
MCP serverCLI and MCP server that lets coding agents reverse engineer apps and binaries
Runs locally- Open source
- 464K GitHub stars
- Developer tools

Codebase Memory
MCP serverLocal MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.7K GitHub stars
- Knowledge and memory

GitHub
MCP serverOfficial MCP server connecting AI assistants to GitHub repos, issues and workflows
Not checked yet- Remote
- Open source
- 34.5K GitHub stars
- Developer tools

Serena MCP: the IDE for your agent
MCP serverMCP toolkit giving coding agents symbol-level code retrieval and editing
Runs locally- Open source
- 31.5K GitHub stars
- Developer tools

XERJ
MCP serverLocal search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

Ouroboros
MCP serverSpec-first layer that pins requirements and verifies results of AI coding agent work
Runs locally- Open source
- 6.4K GitHub stars
- Developer tools