From 887feb0484d3d2d3fec9c9800e098debbc83402a Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sat, 21 Feb 2026 21:18:27 +0100 Subject: [PATCH] Update docs --- Makefile | 6 ++++ tests/HOW_TO_TEST_MCP.md | 78 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 83 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a807f6e3..9541f1f0 100644 --- a/Makefile +++ b/Makefile @@ -356,9 +356,15 @@ generate-ssl: ## Generate local and sel signed SSL certificates for dev (need mk run-webserver: ## Start Glances in Web server mode $(UV_RUN) run python -m glances -C $(CONF) -w +run-webserver-mcp: ## Start Glances in Web server mode with MCP + $(UV_RUN) run python -m glances -C $(CONF) -w --enable-mcp + run-webserver-local-conf: ## Start Glances in Web server mode with the system conf file $(UV_RUN) run python -m glances -w +run-webserver-mcp-local-conf: ## Start Glances in Web server mode with MCP and the system conf file + $(UV_RUN) run python -m glances -w --enable-mcp + run-webserver-local-conf-hide-public: ## Start Glances in Web server mode with the system conf file and hide public info $(UV_RUN) run python -m glances -w --hide-public-info diff --git a/tests/HOW_TO_TEST_MCP.md b/tests/HOW_TO_TEST_MCP.md index c43a85db..dd1f4b35 100644 --- a/tests/HOW_TO_TEST_MCP.md +++ b/tests/HOW_TO_TEST_MCP.md @@ -117,7 +117,83 @@ async def demo(): asyncio.run(demo()) ``` -### 4. Connect Claude Desktop +### 4. Connect Claude CLI (Linux) + +Add the Glances MCP server with: + +```bash +claude mcp add --transport sse glances http://localhost:61208/mcp/sse +``` + +Then verify that the server is recognised: + +```bash +claude mcp list +# glances: http://localhost:61208/mcp/sse +``` + +Once configured, start a Claude CLI session and try: + +- *"Is my system healthy ?" + +It will return: + +```markdown +Here's your system health summary: + + CPU — Good + + - 6% total usage, load average 0.88 (on 16 cores) — very light + + Memory — Warning + + - RAM: 76.8% used (12.6 GB / 16.4 GB) + - Swap: 95.9% used (3.9 GB / 4.0 GB) — critical, nearly exhausted + + Disk — Good + + - Root (/): 40.2% used, 530 GB free + + Temperatures — Good + + ┌────────────┬──────┐ + │ Sensor │ Temp │ + ├────────────┼──────┤ + │ CPU │ 54°C │ + ├────────────┼──────┤ + │ HDD │ 40°C │ + ├────────────┼──────┤ + │ NVMe │ 36°C │ + ├────────────┼──────┤ + │ RAM │ 41°C │ + ├────────────┼──────┤ + │ GPU (i915) │ 49°C │ + └────────────┴──────┘ + + - CPU Fan: 2992 RPM, Video Fan: 2822 RPM — both spinning normally + + Battery — Good + + - 96%, currently charging + + Alerts — None active + + --- + Verdict: mostly healthy, but swap is nearly full. Your system is swapping heavily (12.7 GB + swapped out), which suggests RAM pressure. You may want to check for memory-hungry processes + and consider killing or restarting any you don't need. +``` + +- *"What is the current CPU usage on my machine ?"* +- *"Are there any active alerts ?"* +- *"Show me the top 5 processes by CPU."* +- *"How is my disk space looking ?"* + +> If Glances requires authentication, add a Bearer token or Basic Auth header +> via the `headers` key in `settings.json` (see the authentication section +> below). + +### 5. Connect Claude Desktop Add to `claude_desktop_config.json` (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS,