# diskdiet

> diskdiet is an open-source MCP server for developer tools. Find and free developer cache and old node_modules disk space, with an AI-assistant mode. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Linux, Windows, vscode
- **Repository:** https://github.com/roystondwork-dev/diskdiet
- **MCP Registry name:** io.github.roystondwork-dev/diskdiet
- **Categories:** developer tools
- **Listing updated:** 2026-11-14

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

```sh
claude mcp add diskdiet -- npx -y diskdiet
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "diskdiet": {
      "command": "npx",
      "args": [
        "-y",
        "diskdiet"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "diskdiet": {
      "command": "npx",
      "args": [
        "-y",
        "diskdiet"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "diskdiet": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "diskdiet"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "diskdiet": {
      "command": "npx",
      "args": [
        "-y",
        "diskdiet"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "diskdiet": {
      "command": "npx",
      "args": [
        "-y",
        "diskdiet"
      ]
    }
  }
}
```

## Tools

- `scan_disk_usage`: Scans disk usage without changing anything.
- `free_disk_space`: Removes what the scan showed for chosen sources after confirmation.

## 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

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/diskdiet
