Skip to main content
Glama

Dismocle MCP (dismocle-mcp-winos)

Lightweight, high-speed Windows disk analyzer, cache cleaner, and installed app manager for AI agents via the Model Context Protocol (MCP) and as an Antigravity plugin.

Repository: https://github.com/Automate-with-Sanjay/Dismocle_mcp_winos
Requirements: Windows · Python >=3.13 · uv (recommended)


What It Includes

This repository packages three integrated pieces:

  • dismocle-mcp-winos MCP Server (src/dismocle_mcp/): 11 fast Windows storage, cache, and app management tools exposed over stdio (mcp>=2.3.0).

  • Antigravity Plugin (plugin.json, mcp_config.json): Pre-configured plugin bundle with suggested prompts.

  • Cleanup Workflow & Safety Guardrails (skills/windows-cleanup/SKILL.md, rules/AGENTS.md): Guided triage-to-confirmation workflow and strict agent safety rules.


Related MCP server: SpaceLens MCP Server

Features & MCP Tools

Read-Only Inspection Tools (7)

Tool

Purpose

get_drives_overview

Instant total, used, free space, and filesystem info for all mounted drives.

analyze_directory

Parallel os.scandir size breakdown and largest files without following NTFS junctions or symlinks.

find_large_files

Find large or stale files filtered by minimum MB, extensions (.iso, .zip, .mp4, etc.), and age in days.

scan_caches

Scan Windows, browser, Recycle Bin, and developer package caches grouped by safe, moderate, and caution tiers.

find_dev_artifacts

Locate regenerable project build/dependency folders (node_modules, .venv, venv, target, dist, build, __pycache__, .next, .turbo, etc.).

list_installed_apps

Fast (<50 ms) Registry app inventory with optional Microsoft Store / AppX apps and on-disk InstallLocation size measurement.

get_system_storage_insights

Inspect hiberfil.sys, pagefile.sys, swapfile.sys, MEMORY.DMP, Windows.old, Package Cache, and WSL2/Docker .vhdx virtual disks with cleanup advice.

Mutating Tools (4 — all default to dry_run=True)

Tool

Purpose & Default Safety

clean_caches

Preview or clean scanned cache IDs (dry_run=True, allow_caution=False).

delete_paths

Preview, recycle, or remove specific user-approved files/folders (dry_run=True, move_to_trash=True).

empty_recycle_bin

Preview or empty the Windows Recycle Bin (dry_run=True, optional validated drive letter).

uninstall_app

Preview or launch the native Windows/Store uninstaller (dry_run=True, excludes system components/updates).


Supported Cache Targets (scan_caches / clean_caches)

  • Safe (safety="safe"): User & Windows Temp, Windows Update download cache, Delivery Optimization cache, Crash Dumps & WER logs, DirectX/NVIDIA/AMD GPU shader caches, Explorer thumbnails (thumbcache_*.db), Chrome/Edge/Brave/Firefox disk caches (preserves bookmarks, history, cookies, and logins), uv, pip, npm, and VS Code caches.

  • Moderate (safety="moderate"): Windows Recycle Bin, Windows Prefetch, pnpm/Yarn, NuGet, Cargo, and Gradle caches.

  • Caution (safety="caution"): HuggingFace, PyTorch, and Ollama downloaded model caches (blocked unless allow_caution=True is explicitly passed).


Safety & Protection Guardrails

Dismocle is designed so an AI agent cannot accidentally wipe Windows or personal user files:

  • Dry-run by default: Every mutating tool defaults to dry_run=True to preview targets and sizes before any changes occur.

  • Recycle Bin first: delete_paths defaults to move_to_trash=True via send2trash.

  • Hard-blocked protected paths:

    • Any drive root (C:\, D:\, etc.) and critical root files/folders (hiberfil.sys, pagefile.sys, swapfile.sys, bootmgr, $Recycle.Bin, System Volume Information, Recovery, Boot, EFI).

    • C:\Windows (SystemRoot) and all its descendants (System32, SysWOW64, WinSxS, etc.), plus Program Files system directories and ProgramData\Package Cache.

    • User profile roots (C:\Users, other users' profiles, Desktop, Documents, Downloads, Pictures, Videos, Music, OneDrive, AppData, browser User Data / Firefox Profiles), user registry hives (NTUSER.DAT, UsrClass.dat*), and credential/key directories (.ssh, .gnupg, .aws, .kube, .azure, .docker, .gemini, .config\gcloud, Windows Credentials/Protect/Vault).

  • Bypass & traversal defense:

    • Blocks UNC paths (\\server\share), Windows device paths (\\.\), wildcards, null bytes, and reserved device names.

    • Validates both lexical (abspath) and resolved (realpath) paths to block 8.3 short-name aliases (e.g., PROGRA~1), \\?\ prefix tricks, and symlink/NTFS junction traversal.

    • clean_caches verifies every resolved cache path against is_protected_path and skips symlinks/junctions so misconfigured environment variables (e.g., %TEMP%) cannot touch user data.

  • Safe uninstaller execution: Uses Win32 CommandLineToArgvW with shell=False and validates Microsoft Store package IDs via environment variables to prevent PowerShell command injection.


Installation

Option 1: Antigravity Plugin

  1. Install uv so uvx is available on PATH.

  2. Clone this repository and install the plugin with the Antigravity CLI:

    git clone https://github.com/Automate-with-Sanjay/Dismocle_mcp_winos.git
    agy plugin install .\Dismocle_mcp_winos

Option 2: PyPI (dismocle-mcp-winos)

Add to your mcp_config.json (Antigravity, Claude Desktop, or Cursor):

{
  "mcpServers": {
    "dismocle-windows": {
      "command": "uvx",
      "args": ["dismocle-mcp-winos"]
    }
  }
}

Option 3: Directly from GitHub (No PyPI required)

{
  "mcpServers": {
    "dismocle-windows": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/Automate-with-Sanjay/Dismocle_mcp_winos",
        "dismocle-mcp-winos"
      ]
    }
  }
}

Option 4: Local / Development

git clone https://github.com/Automate-with-Sanjay/Dismocle_mcp_winos.git
cd Dismocle_mcp_winos
uv sync
$env:PYTHONPATH = "src"
.\.venv\Scripts\python.exe -m unittest discover -s tests -v
.\.venv\Scripts\dismocle-mcp-winos.exe

Project Structure

Dismocle_mcp_winos/
├── src/dismocle_mcp/
│   ├── server.py        # FastMCP server & tool definitions
│   ├── scanner.py       # Drive overview, parallel directory & large-file scanner
│   ├── caches.py        # Windows/browser/dev cache specs & dev artifact finder
│   ├── cleaner.py       # Dry-run/safe cache cleaning, delete_paths & Recycle Bin
│   ├── apps.py          # Registry/Store app inventory & safe uninstaller
│   ├── system_info.py   # hiberfil/pagefile/Windows.old/WSL2 & Docker insights
│   └── utils.py         # Path normalization, protected-path & junction guards
├── skills/windows-cleanup/SKILL.md
├── rules/AGENTS.md
├── tests/test_dismocle.py
├── plugin.json
├── mcp_config.json
└── pyproject.toml

License

MIT — see LICENSE.

Available Tools

11 tools
analyze_directoryA
Read-onlyIdempotent

Fast parallel disk usage breakdown of a directory (e.g. 'C:\Users\name' or 'C:'). Returns largest subdirectories and largest files without following NTFS junctions.

Inputs: path (required), top_n, min_size_mb, timeout_sec, +1 more. Returns: object

clean_cachesA
Destructive

Clean cache targets by ID (from scan_caches). Defaults to dry_run=True for safety; pass dry_run=False after user confirmation. Targets marked 'caution' require allow_caution=True.

Inputs: target_ids (required), dry_run, allow_caution, move_to_trash. Returns: object

delete_pathsA
Destructive

Delete or move to Recycle Bin specific user-approved files or directories. Blocks protected Windows/user roots. Defaults to dry_run=True and move_to_trash=True.

Inputs: paths (required), dry_run, move_to_trash. Returns: object

empty_recycle_binA
Destructive

Preview (dry_run=True) or permanently empty the Windows Recycle Bin (dry_run=False).

Inputs: drive, dry_run. Returns: object

find_dev_artifactsB
Read-onlyIdempotent

Scan a projects folder for regenerable dev artifacts (node_modules, .venv, venv, target, dist, build, pycache, .next, etc.) with size and age in days.

Inputs: root_path (required), limit, max_depth, min_size_mb, +2 more. Returns: object

find_large_filesB
Read-onlyIdempotent

Find the largest files under root_path, optionally filtered by file extensions (e.g. ['.iso', '.zip', '.exe', '.mp4']) and minimum age in days.

Inputs: root_path (required), limit, extensions, min_size_mb, +2 more. Returns: object

get_drives_overviewA
Read-onlyIdempotent

Get instant disk usage statistics (total, used, free, %) for all mounted Windows drives.

Inputs: no named parameters. Returns: object

get_system_storage_insightsA
Read-onlyIdempotent

Inspect large Windows system storage consumers (hiberfil.sys, pagefile.sys, Windows.old, Package Cache, WSL2 & Docker .vhdx virtual disks) and return advice.

Inputs: no named parameters. Returns: object

list_installed_appsB
Read-onlyIdempotent

List installed Windows desktop apps from the Registry (<50ms) and optionally Store apps. sort_by: 'size', 'name', or 'oldest'. Set measure_missing_sizes=True to measure on-disk InstallLocation sizes when EstimatedSize is missing in the registry.

Inputs: limit, search, sort_by, min_size_mb, +3 more. Returns: object

scan_cachesA
Read-onlyIdempotent

Scan Windows temp folders, browser caches, GPU shader caches, Recycle Bin, and dev package caches (uv, pip, npm, nuget, cargo, gradle, vscode, ML models). Categories: 'windows_temp', 'browser_cache', 'dev_cache', 'app_cache', 'recycle_bin'. Safety levels: 'safe', 'moderate', 'caution'.

Inputs: categories, include_empty, safety_levels. Returns: object

uninstall_appB
Destructive

Preview (dry_run=True) or launch the uninstaller (dry_run=False) for an installed app.

Inputs: name_or_id (required), silent, dry_run, include_store_apps. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables 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
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables 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.
      58 npm
      2
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables an AI assistant to perform read-only scans of Windows drives and identify cleanup candidates, including caches, temporary files, and largest files.
      1
      1
      MIT