windirstat-mcp
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., "@windirstat-mcpscan my C: drive and show the biggest cleanup candidates"
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.
windirstat-mcp
An MCP server that lets an AI assistant scan Windows drives with WinDirStat and report what can be cleaned up.
Read-only. It reports; it never deletes anything.
Zero dependencies. One Python file, standard library only.
Uses WinDirStat 2.x's headless
/savetoswitch, so no window opens during a scan.
How it works
WinDirStat 2.x has an undocumented command-line mode (found by inspecting the binary's strings):
WinDirStat.exe /saveto out.csv C:\It scans the path, writes one CSV row per file and folder, and exits. The server runs this, then:
matches paths against known-safe-to-clean patterns (temp folders, browser/app caches, package-manager caches, crash dumps, Windows Update downloads,
node_modules,*.old/*.tmpfiles, ...)reports only the outermost match, so nested caches aren't double counted
lists the largest individual files
Related MCP server: WinDirStat MCP Server
Install
Requirements: Windows, Python 3.9+, WinDirStat 2.x.
pip install git+https://github.com/s0shaw/windirstat-mcpThe server finds WinDirStat.exe in this order: WINDIRSTAT_EXE env var, next to the script, PATH,
%ProgramFiles%\WinDirStat\.
Claude Code
claude mcp add windirstat --scope user -e WINDIRSTAT_EXE="C:\path\to\WinDirStat.exe" -- windirstat-mcpClaude Desktop / other clients
{
"mcpServers": {
"windirstat": {
"command": "windirstat-mcp",
"env": { "WINDIRSTAT_EXE": "C:\\path\\to\\WinDirStat.exe" }
}
}
}Tool
windirstat_scan(path, top=30, min_mb=100)
{
"root": "C:\\",
"total_mb": 417204.5,
"cleanup_candidates_mb": 81234.0,
"cleanup_candidates": [
{ "path": "C:\\Users\\me\\AppData\\Local\\uv\\cache", "mb": 20098.6, "reason": "package cache" }
],
"largest_files": [
{ "path": "C:\\pagefile.sys", "mb": 18432.0 }
]
}Candidates are heuristics. Review before deleting: a .cache folder may hold downloaded ML models, and
some caches belong to running programs. Prefer each tool's own command (pip cache purge,
uv cache clean, npm cache clean --force) over deleting folders by hand.
CLI
windirstat-mcp D:\prints the same JSON without starting the server.
Notes
A full scan of a large drive takes a few minutes. Run as administrator to see system folders.
WinDirStat is GPL-2.0 and is not bundled; this project only invokes it.
Development
python -m unittest -vLicense
MIT
Available Tools
1 toolwindirstat_scanA
Scan a drive or folder with WinDirStat (read-only). Returns cleanup candidates (temp, caches, crash dumps, node_modules, ...) and the largest files. Never deletes anything.
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | How many largest files to return | |
| path | Yes | Drive or folder, e.g. C:\ or D:\Projects | |
| min_mb | No | Ignore cleanup candidates smaller than this |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and does well: it declares the operation read-only and explicitly says 'Never deletes anything,' which is exactly the safety signal an agent needs before touching C:\. It also discloses the two classes of output (cleanup candidates and largest files). It stops short of disclosing performance characteristics – a full-drive scan is likely slow – 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 sentences, both earning their place: the first states what happens, the second states the payoff and the safety guarantee. The read-only assurance is front-loaded as a parenthetical so the agent sees it before the return-value detail.
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 3-parameter, no-output-schema tool with zero annotations, the description covers safety (read-only, never deletes), the two result categories, and the target resource. What's missing is any hint about scan duration or scaling on large drives, which an agent scheduling work would want. Overall sufficient to call correctly, shy of exemplary.
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 100%, so all three parameters (path, top, min_mb) are already fully documented in the schema, including defaults and an example path format. The description only loosely gestures at them ('cleanup candidates', 'largest files') without adding new semantics. Baseline 3 is correct when the schema does the heavy lifting.
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?
Names a specific verb ('scan'), a specific resource ('a drive or folder'), and the underlying engine (WinDirStat), then states what the caller gets back: cleanup candidates and largest files. This is far more than a restatement of the tool name and lets an agent decide instantly whether this tool matches the task.
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?
Usage is implied rather than stated: the tool scans drives/folders and surfaces cleanup candidates, which suggests 'use when looking for space to reclaim.' There is no explicit when-not guidance, no prerequisites (permissions, admin rights), and no mention of cost/time for scanning an entire drive versus a subfolder. Adequate but with real gaps.
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.
1 tool update
v0.1.0- First observed
windirstat_scan
TDQS
Scored across 1 tool
There is only one tool, so there is no possibility of confusion with a sibling tool. Its purpose (read-only disk scan returning cleanup candidates and largest files) is unambiguous.
The name follows a clear server-prefixed verb_noun pattern (windirstat_scan), which is readable and predictable. With only one tool there is no broader convention to verify, so it cannot be a full 5.
A single tool is borderline thin; the server has one capability and no supporting operations. It is not egregiously mismatched, but the surface feels under-scoped for a disk-analysis server.
Scanning is the core operation and returns useful analysis, but there is no way to target a re-scan of specific paths, list available drives, or export results. Deletion is explicitly out of scope, which is defensible, but other read-only follow-ups are missing.
Maintenance
Related MCP Connectors
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Read-only local AI advice, shared reports and website audits. No PC scan or local actions.
- ZionDeskOAuthapp.ziondesk
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
1 Assess AI-discovery readiness, plan visibility fixes, and summarize scan evidence. Read-only.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceBridges AI assistants with WizTree to scan drives, find large files/folders, and perform intelligent cleanups.MIT
- AlicenseAqualityBmaintenanceEnables real-time Windows storage analysis, deep folder scanning, safety tiering, and protected cleanup operations through natural language.41MIT
- AlicenseNot gradedqualityAmaintenanceEnables local AI assistants to inspect Windows disk usage with treemap and folder X-ray views, retrieve cleanup previews, and receive application removal guidance, while exposing only non-destructive commands through MCP.MIT
- AlicenseNot gradedqualityCmaintenanceEnables 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.MIT