Divlens

io.github.Lohithry由 GitHub 帳號 Lohithry 發布v0.1.0更新於 Oct 24, 2026

Real-time system diagnostics for AI agents — CPU, RAM, disk, network, hardware health. 17 tools.

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓 AI 助理即時讀取本機診斷資訊:CPU、記憶體、磁碟、網路、硬體健康、行程與日誌。

可以做什麼
DivLens 透過 stdio 提供 17 個診斷工具,涵蓋即時效能指標(CPU、記憶體、置換空間、開機時間)、行程清單、儲存健康與檔案類型清單、最大與陳舊檔案、IOPS 與 SMART 狀態、硬體規格與電池、網路吞吐與設定、系統識別、已安裝的開發執行環境、核心驅動、目錄掃描、近期系統日誌,以及可選的過往診斷語意檢索。它只蒐集並回傳原始系統資料,不進行 LLM 推論。
適用情境
當你希望助理回答關於其所在機器的問題時適用,例如系統為何變慢、硬碟是否健康、什麼占用了磁碟空間、安裝了哪些執行環境與驅動,而不必切換到獨立的監控工具。
執行需求
以本機行程在使用者機器上執行(僅桌面端,無網頁可執行版本)。未宣告 API 金鑰、帳號或環境變數。README 提供一行指令的安裝腳本以下載預先建置的執行檔,或使用 Rust 1.82+ 從原始碼建置。可選的語意記憶需以 vector-memory 特性建置。
安裝前請注意
這些工具會讀取系統層級資訊,包括行程清單、檔案清單、目錄內容、網路設定、機器指紋與系統日誌,並將其傳給所連接的 AI 用戶端。README 稱所有資料留在本機、不傳送到任何地方,但助理用戶端本身可能傳輸工具輸出。文件中的安裝方式將遠端腳本直接管線到 shell 執行,會執行第三方程式碼;建議先審查或改為從原始碼建置。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Divlens,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[DivLens Logo]

DivLens MCP

Real-time system intelligence for AI agents.
Give Claude, Cursor, and Windsurf eyes into your machine — CPU, RAM, disk, network, processes, hardware health, and more.

[License: Apache 2.0] [Built with Rust] [MCP Compatible] [Platform] [Version]

[Claude] [Cursor] [Windsurf] [Zero Cloud]


What is DivLens MCP?

DivLens MCP is a high-performance Model Context Protocol (MCP) server written in Rust.

It bridges the gap between AI assistants and your machine — giving Claude, Cursor, Windsurf, and any other MCP-compatible agent live, structured access to hardware sensors, storage metrics, network diagnostics, process trees, developer runtimes, system logs, and more.

No cloud. No API keys. No configuration required. Just build and run.

"Why is my Mac slow?" → Claude calls get_live_metrics() → Instant answer."Is my SSD healthy?"  → Claude calls get_hardware_diagnostics() → SMART data returned."What's eating disk?"  → Claude calls get_advanced_storage_stats() → Largest files listed.

✦ 17 Diagnostic Tools

CategoryToolWhat it returns
⚡ Performanceget_live_metricsCPU %, RAM, swap, blocked processes, uptime
⚡ Performanceget_process_listTop processes by CPU / RAM with PID
💾 Storageget_storage_healthFree/used/total per mount point
💾 Storagescan_storage_inventoryFull file-type inventory with sizes
💾 Storageget_file_type_summaryFile counts and sizes by extension
💾 Storageget_specific_file_typeAll files matching a specific extension
💾 Storageget_advanced_storage_statsTop 50 largest files + stale data analysis
💾 Storageget_storage_diagnosticsIOPS, read/write latency, SMART status
🖥️ Hardwareget_hardware_diagnosticsCPU/GPU specs, battery %, temps, SMART
🌐 Networkget_network_diagnosticsThroughput, active connections, signal
🌐 Networkget_network_configIP, DNS, interface config per adapter
🔬 Identityget_system_dnaOS, hostname, uptime, machine fingerprint
🛠️ Dev Stackget_dev_stackNode, Python, Rust, Go, Java runtimes + packages
🛠️ Dev Stackget_driversKernel modules and device drivers
📂 Utilityscan_directoryRecursive directory listing with sizes
🧠 Memoryrecall_memorySemantic search over past AI diagnoses
📋 Logsget_system_logsRecent OS/kernel errors clustered by pattern

🚀 Install — One Command, Any Platform

No Rust required. No compilation. No manual config editing. The installer downloads a pre-built binary and automatically configures your AI clients.

macOS & Linux

bash
curl -fsSL https://raw.githubusercontent.com/Lohithry/divlens-mcp/main/install.sh | bash

Windows (PowerShell — no admin required)

powershell
irm https://raw.githubusercontent.com/Lohithry/divlens-mcp/main/install.ps1 | iex

The installer will:

  • ✅ Detect your OS and chip (Apple Silicon / Intel / Linux / Windows)
  • ✅ Download the correct pre-built binary from GitHub Releases
  • ✅ Verify the SHA-256 checksum
  • ✅ Install to your PATH with no admin rights needed
  • ✅ Auto-configure Claude Desktop, Cursor, Windsurf, and Antigravity
  • ✅ Test the server works before finishing

Then just restart your AI client and ask "What's using my CPU right now?"


Build from Source (Advanced)

Requires Rust 1.82+.

bash
git clone https://github.com/Lohithry/divlens-mcp.gitcd divlens-mcp/apps/corecargo build --release./target/release/divlens-core --mcp

Connect to Your AI

Claude Desktop

Config file: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
or %APPDATA%\Claude\claude_desktop_config.json (Windows)

jsonc
{  "mcpServers": {    "divlens": {      "command": "/usr/local/bin/divlens-core",      "args": ["--mcp"]    }  }}

Quit and relaunch Claude Desktop. A 🔌 plug icon confirms the connection.

Cursor

Config file: ~/.cursor/mcp.json

jsonc
{  "mcpServers": {    "divlens": {      "command": "/usr/local/bin/divlens-core",      "args": ["--mcp"]    }  }}

Cmd+Shift+P → Reload Window

Windsurf

Config file: ~/.codeium/windsurf/mcp_config.json

jsonc
{  "mcpServers": {    "divlens": {      "command": "/usr/local/bin/divlens-core",      "args": ["--mcp"]    }  }}

For complete setup details, see DEPLOYMENT.md.


How It Works

  ┌─────────────────────────────────────────┐  │   AI Client  (Claude / Cursor / etc.)   │  │         LLM reasoning lives here        │  └──────────────────┬──────────────────────┘                     │  JSON-RPC 2.0  (stdio)                     ▼  ┌─────────────────────────────────────────┐  │          divlens-core  (Rust)           │  │                                         │  │  ┌───────────────┐  ┌───────────────┐   │  │  │  MCP Layer    │  │  17 Tools     │   │  │  │  (JSON-RPC)   │  │  (Rust + OS)  │   │  │  └───────────────┘  └───────────────┘   │  │  ┌───────────────┐  ┌───────────────┐   │  │  │  SQLite Cache │  │  Native APIs  │   │  │  │  (sysinfo/OS) │  │  (IOKit/WMI)  │   │  │  └───────────────┘  └───────────────┘   │  └─────────────────────────────────────────┘
      Zero cloud.  Zero API keys.  100% local.

Transport: Every MCP message is a newline-delimited JSON-RPC 2.0 object over stdio.
AI logic: DivLens never runs LLM inference — it only collects and returns raw system data.
Privacy: All data stays on your machine. Nothing is sent anywhere.


Project Structure

divlens-mcp/└── apps/    └── core/                      # Rust MCP engine        ├── src/        │   ├── tools/             # 17 tool implementations        │   ├── mcp/               # JSON-RPC 2.0 protocol handler        │   ├── mcp_server.rs      # stdio transport loop        │   ├── collectors/        # Native OS data collectors        │   │   ├── volatile/      # CPU, RAM, network (live)        │   │   ├── persistent/    # Storage, hardware (cached)        │   │   └── ondemand/      # Drivers, logs, packages        │   ├── modules/           # Core business logic        │   ├── db/                # SQLite caching layer        │   ├── models/            # Shared data types        │   └── utils/             # Shell env rehydration        ├── Cargo.toml        └── env.example

Optional: Semantic Memory

Enable the vector-memory feature to give recall_memory true semantic search using a local ONNX embedding model (no cloud, no API key):

bash
cargo build --release --features vector-memory

When enabled, DivLens creates a local LanceDB vector store and uses fastembed to embed and recall past diagnoses semantically.

When disabled (default), recall_memory returns an empty list — no functionality is broken.


Verify the Server

Test the MCP wire protocol without a client:

bash
# Initialize handshakeecho '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","clientInfo":{"name":"test","version":"0.1"}}}' \  | divlens-core --mcp
# Call a tool directlyecho '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_live_metrics","arguments":{}}}' \  | divlens-core --mcp

License

Licensed under the Apache License, Version 2.0.
See LICENSE for the full text.

Copyright © 2024 DivLens Contributors.


[DivLens]
Built with ❤️ in Rust · Zero cloud · AI-native diagnostics

來源:README.md,提交 ed62ea4

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。