disk-space-monitor

disk-space-monitor

Enables AI assistants to check disk usage on the host machine, providing real-time reports on partition health, warnings, and critical alerts across Windows, macOS, and Linux.

Category
Visit Server

README

Disk Space Monitor — MCP Server

A small Model Context Protocol server that lets an AI assistant inspect disk usage on the machine it is running on. Point Claude Desktop (or any MCP client) at it and you can ask "is my disk filling up?" and get a real answer instead of a guess.

Cross-platform (Windows / macOS / Linux), no configuration files, no network access, no telemetry.


Tools

Tool Arguments What it does
check_disk_space threshold: float = 50.0 Scans every mounted partition and flags anything above the threshold.
check_single_path path: str, threshold: float = 50.0 Detailed report for one path or drive, plus advice.
disk_summary threshold: float = 50.0 One-line health verdict across all partitions.

Status levels

Level Trigger Marker
OK below threshold 🟢
WARNING at or above threshold (default 50%) 🟠
CRITICAL at or above 90% šŸ”“
SKIPPED unreadable or timed out ⚪

Example output

disk_summary()

🟢 ALL GOOD — All partitions below 50.0%. System is healthy.

check_single_path("C:\\")

šŸ’½  DISK USAGE: C:\
    Windows 11  │  2026-08-17 19:08:44  │  Threshold: 50.0%
─────────────────────────────────────────────────────────────────
  Status  : 🟠 WARNING
  Usage   : [ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘] 63.4%
  Used    :    301.2 GB
  Free    :    173.8 GB
  Total   :    475.0 GB
─────────────────────────────────────────────────────────────────
āš ļø  Above 50.0%. Consider archiving old files or clearing caches.

check_disk_space(threshold=70)

šŸ’½  DISK SPACE REPORT
    Windows 11  │  2026-08-17 19:08:44  │  Threshold: 70.0%
─────────────────────────────────────────────────────────────────
  🟢 OK        C:\  [NTFS]
           [ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘ā–‘] 63.4%
           Used     301.2 GB  │  Free     173.8 GB  │  Total     475.0 GB

  šŸ”“ CRITICAL  D:\  [NTFS]
           [ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–‘ā–‘] 92.7%
           Used     927.0 GB  │  Free      73.0 GB  │  Total    1000.0 GB
─────────────────────────────────────────────────────────────────
āš ļø  1 critical, 0 warning:
   šŸ”“ D:\ (92.7%)

Requirements

  • Python 3.10 or newer (developed on 3.12)
  • mcp and psutil

Installation

git clone https://github.com/<your-username>/disk-space-monitor.git
cd disk-space-monitor

python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS / Linux
source .venv/bin/activate

pip install -r requirements.txt

Connecting it to Claude Desktop

Add the server to your Claude Desktop config file:

  • Windows — %APPDATA%\Claude\claude_desktop_config.json
  • macOS — ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "disk-monitor": {
      "command": "/absolute/path/to/disk-space-monitor/.venv/bin/python",
      "args": ["/absolute/path/to/disk-space-monitor/main.py"]
    }
  }
}

On Windows the paths look like C:/path/to/disk-space-monitor/.venv/Scripts/python.exe and C:/path/to/disk-space-monitor/main.py. Both paths must be absolute — the server is launched directly, not through a shell.

Restart Claude Desktop afterwards. The three tools appear automatically, and you can ask things like:

Is my disk filling up? Check drive D: and warn me if it's over 80%. Give me a one-line disk health summary.

Running it standalone

python main.py

The server communicates over stdio using the MCP protocol, so running it directly just blocks waiting for a client — that is expected, not a hang.


How it works

Partition discovery. psutil.disk_partitions(all=False) lists real mounted partitions, then pseudo-filesystems that commonly hang or carry no meaningful usage data are skipped: squashfs, tmpfs, devtmpfs, overlay, autofs, and entries with no filesystem type.

Timeout guard. Each partition is read inside a daemon thread with a 0.5 second deadline. A disconnected network drive or a sleeping external disk can make shutil.disk_usage() block for a long time; if the deadline passes the partition is reported as ⚪ SKIPPED and the scan moves on. This keeps a single bad mount from freezing the whole tool call.

Formatting. Sizes render as GB below 1000 GB and TB above it. The usage bar is 22 characters wide and clamped to that range, so malformed percentages cannot produce runaway output.

Project structure

disk-space-monitor/
ā”œā”€ā”€ main.py            # the entire server — helpers + three tools
ā”œā”€ā”€ requirements.txt   # mcp, psutil
ā”œā”€ā”€ .gitignore
ā”œā”€ā”€ LICENSE
└── README.md

Privacy

The server reads only local disk-usage figures — total, used, and free bytes per partition, plus the OS name and version for the report header. It makes no network requests, writes no files, reads no file contents, and stores nothing between calls.

License

MIT — see LICENSE.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured