DivLens MCP

DivLens MCP

A real-time system diagnostics MCP server that gives AI agents live access to CPU, RAM, disk, network, processes, and hardware health metrics, with zero cloud dependency.

Category
访问服务器

README

<p align="center"> <img src="divlensmainlogo.png" width="120" alt="DivLens Logo" /> </p>

<h1 align="center">DivLens MCP</h1>

<p align="center"> <strong>Real-time system intelligence for AI agents.</strong><br/> Give Claude, Cursor, and Windsurf eyes into your machine — CPU, RAM, disk, network, processes, hardware health, and more. </p>

<p align="center"> <a href="https://opensource.org/licenses/Apache-2.0"> <img src="https://img.shields.io/badge/License-Apache%202.0-orange.svg" alt="License: Apache 2.0" /> </a> <a href="https://www.rust-lang.org"> <img src="https://img.shields.io/badge/Built%20with-Rust-orange.svg?logo=rust" alt="Built with Rust" /> </a> <img src="https://img.shields.io/badge/MCP-Compatible-orange.svg" alt="MCP Compatible" /> <img src="https://img.shields.io/badge/Platform-macOS%20%7C%20Windows%20%7C%20Linux-orange.svg" alt="Platform" /> <img src="https://img.shields.io/badge/Version-0.1.0-orange.svg" alt="Version" /> </p>

<p align="center"> <img src="https://img.shields.io/badge/Claude-Compatible-blueviolet?logo=anthropic" alt="Claude" /> <img src="https://img.shields.io/badge/Cursor-Compatible-blue?logo=cursor" alt="Cursor" /> <img src="https://img.shields.io/badge/Windsurf-Compatible-teal" alt="Windsurf" /> <img src="https://img.shields.io/badge/Zero%20Cloud-100%25%20Local-brightgreen" alt="Zero Cloud" /> </p>


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

Category Tool What it returns
Performance get_live_metrics CPU %, RAM, swap, blocked processes, uptime
Performance get_process_list Top processes by CPU / RAM with PID
💾 Storage get_storage_health Free/used/total per mount point
💾 Storage scan_storage_inventory Full file-type inventory with sizes
💾 Storage get_file_type_summary File counts and sizes by extension
💾 Storage get_specific_file_type All files matching a specific extension
💾 Storage get_advanced_storage_stats Top 50 largest files + stale data analysis
💾 Storage get_storage_diagnostics IOPS, read/write latency, SMART status
🖥️ Hardware get_hardware_diagnostics CPU/GPU specs, battery %, temps, SMART
🌐 Network get_network_diagnostics Throughput, active connections, signal
🌐 Network get_network_config IP, DNS, interface config per adapter
🔬 Identity get_system_dna OS, hostname, uptime, machine fingerprint
🛠️ Dev Stack get_dev_stack Node, Python, Rust, Go, Java runtimes + packages
🛠️ Dev Stack get_drivers Kernel modules and device drivers
📂 Utility scan_directory Recursive directory listing with sizes
🧠 Memory recall_memory Semantic search over past AI diagnoses
📋 Logs get_system_logs Recent 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

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

Windows (PowerShell — no admin required)

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+.

git clone https://github.com/Lohithry/divlens-mcp.git
cd divlens-mcp/apps/core
cargo 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)

{
  "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

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

Cmd+Shift+PReload Window

Windsurf

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

{
  "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):

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:

# Initialize handshake
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","clientInfo":{"name":"test","version":"0.1"}}}' \
  | divlens-core --mcp

# Call a tool directly
echo '{"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.


<p align="center"> <img src="divlensmainlogo.png" width="48" alt="DivLens" /><br/> <sub>Built with ❤️ in Rust · Zero cloud · AI-native diagnostics</sub> </p>

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选