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 分

    请在仓库或注册中心条目中声明许可证。