{
  "markdown": "<p align=\"center\">\n  <img src=\"divlensmainlogo.png\" width=\"120\" alt=\"DivLens Logo\" />\n</p>\n\n<h1 align=\"center\">DivLens MCP</h1>\n\n<p align=\"center\">\n  <strong>Real-time system intelligence for AI agents.</strong><br/>\n  Give Claude, Cursor, and Windsurf eyes into your machine — CPU, RAM, disk, network, processes, hardware health, and more.\n</p>\n\n<p align=\"center\">\n  <a href=\"https://opensource.org/licenses/Apache-2.0\">\n    <img src=\"https://img.shields.io/badge/License-Apache%202.0-orange.svg\" alt=\"License: Apache 2.0\" />\n  </a>\n  <a href=\"https://www.rust-lang.org\">\n    <img src=\"https://img.shields.io/badge/Built%20with-Rust-orange.svg?logo=rust\" alt=\"Built with Rust\" />\n  </a>\n  <img src=\"https://img.shields.io/badge/MCP-Compatible-orange.svg\" alt=\"MCP Compatible\" />\n  <img src=\"https://img.shields.io/badge/Platform-macOS%20%7C%20Windows%20%7C%20Linux-orange.svg\" alt=\"Platform\" />\n  <img src=\"https://img.shields.io/badge/Version-0.1.0-orange.svg\" alt=\"Version\" />\n</p>\n\n<p align=\"center\">\n  <img src=\"https://img.shields.io/badge/Claude-Compatible-blueviolet?logo=anthropic\" alt=\"Claude\" />\n  <img src=\"https://img.shields.io/badge/Cursor-Compatible-blue?logo=cursor\" alt=\"Cursor\" />\n  <img src=\"https://img.shields.io/badge/Windsurf-Compatible-teal\" alt=\"Windsurf\" />\n  <img src=\"https://img.shields.io/badge/Zero%20Cloud-100%25%20Local-brightgreen\" alt=\"Zero Cloud\" />\n</p>\n\n---\n\n## What is DivLens MCP?\n\n**DivLens MCP** is a high-performance [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server written in Rust.\n\nIt 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.\n\nNo cloud. No API keys. No configuration required. Just build and run.\n\n```\n\"Why is my Mac slow?\" → Claude calls get_live_metrics() → Instant answer.\n\"Is my SSD healthy?\"  → Claude calls get_hardware_diagnostics() → SMART data returned.\n\"What's eating disk?\"  → Claude calls get_advanced_storage_stats() → Largest files listed.\n```\n\n---\n\n## ✦ 17 Diagnostic Tools\n\n| Category | Tool | What it returns |\n| :--- | :--- | :--- |\n| ⚡ **Performance** | `get_live_metrics` | CPU %, RAM, swap, blocked processes, uptime |\n| ⚡ **Performance** | `get_process_list` | Top processes by CPU / RAM with PID |\n| 💾 **Storage** | `get_storage_health` | Free/used/total per mount point |\n| 💾 **Storage** | `scan_storage_inventory` | Full file-type inventory with sizes |\n| 💾 **Storage** | `get_file_type_summary` | File counts and sizes by extension |\n| 💾 **Storage** | `get_specific_file_type` | All files matching a specific extension |\n| 💾 **Storage** | `get_advanced_storage_stats` | Top 50 largest files + stale data analysis |\n| 💾 **Storage** | `get_storage_diagnostics` | IOPS, read/write latency, SMART status |\n| 🖥️ **Hardware** | `get_hardware_diagnostics` | CPU/GPU specs, battery %, temps, SMART |\n| 🌐 **Network** | `get_network_diagnostics` | Throughput, active connections, signal |\n| 🌐 **Network** | `get_network_config` | IP, DNS, interface config per adapter |\n| 🔬 **Identity** | `get_system_dna` | OS, hostname, uptime, machine fingerprint |\n| 🛠️ **Dev Stack** | `get_dev_stack` | Node, Python, Rust, Go, Java runtimes + packages |\n| 🛠️ **Dev Stack** | `get_drivers` | Kernel modules and device drivers |\n| 📂 **Utility** | `scan_directory` | Recursive directory listing with sizes |\n| 🧠 **Memory** | `recall_memory` | Semantic search over past AI diagnoses |\n| 📋 **Logs** | `get_system_logs` | Recent OS/kernel errors clustered by pattern |\n\n---\n\n## 🚀 Install — One Command, Any Platform\n\n> **No Rust required. No compilation. No manual config editing.**\n> The installer downloads a pre-built binary and automatically configures your AI clients.\n\n### macOS & Linux\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/Lohithry/divlens-mcp/main/install.sh | bash\n```\n\n### Windows (PowerShell — no admin required)\n\n```powershell\nirm https://raw.githubusercontent.com/Lohithry/divlens-mcp/main/install.ps1 | iex\n```\n\nThe installer will:\n- ✅ Detect your OS and chip (Apple Silicon / Intel / Linux / Windows)\n- ✅ Download the correct pre-built binary from GitHub Releases\n- ✅ Verify the SHA-256 checksum\n- ✅ Install to your PATH with no admin rights needed\n- ✅ Auto-configure **Claude Desktop**, **Cursor**, **Windsurf**, and **Antigravity**\n- ✅ Test the server works before finishing\n\nThen just **restart your AI client** and ask *\"What's using my CPU right now?\"*\n\n---\n\n### Build from Source (Advanced)\n\nRequires [Rust](https://rustup.rs/) 1.82+.\n\n```bash\ngit clone https://github.com/Lohithry/divlens-mcp.git\ncd divlens-mcp/apps/core\ncargo build --release\n./target/release/divlens-core --mcp\n```\n\n---\n\n## Connect to Your AI\n\n### Claude Desktop\n\n> Config file: `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)  \n> or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows)\n\n```jsonc\n{\n  \"mcpServers\": {\n    \"divlens\": {\n      \"command\": \"/usr/local/bin/divlens-core\",\n      \"args\": [\"--mcp\"]\n    }\n  }\n}\n```\n\nQuit and relaunch Claude Desktop. A 🔌 plug icon confirms the connection.\n\n### Cursor\n\n> Config file: `~/.cursor/mcp.json`\n\n```jsonc\n{\n  \"mcpServers\": {\n    \"divlens\": {\n      \"command\": \"/usr/local/bin/divlens-core\",\n      \"args\": [\"--mcp\"]\n    }\n  }\n}\n```\n\n`Cmd+Shift+P` → *Reload Window*\n\n### Windsurf\n\n> Config file: `~/.codeium/windsurf/mcp_config.json`\n\n```jsonc\n{\n  \"mcpServers\": {\n    \"divlens\": {\n      \"command\": \"/usr/local/bin/divlens-core\",\n      \"args\": [\"--mcp\"]\n    }\n  }\n}\n```\n\nFor complete setup details, see **[DEPLOYMENT.md](DEPLOYMENT.md)**.\n\n---\n\n## How It Works\n\n```\n  ┌─────────────────────────────────────────┐\n  │   AI Client  (Claude / Cursor / etc.)   │\n  │         LLM reasoning lives here        │\n  └──────────────────┬──────────────────────┘\n                     │  JSON-RPC 2.0  (stdio)\n                     ▼\n  ┌─────────────────────────────────────────┐\n  │          divlens-core  (Rust)           │\n  │                                         │\n  │  ┌───────────────┐  ┌───────────────┐   │\n  │  │  MCP Layer    │  │  17 Tools     │   │\n  │  │  (JSON-RPC)   │  │  (Rust + OS)  │   │\n  │  └───────────────┘  └───────────────┘   │\n  │  ┌───────────────┐  ┌───────────────┐   │\n  │  │  SQLite Cache │  │  Native APIs  │   │\n  │  │  (sysinfo/OS) │  │  (IOKit/WMI)  │   │\n  │  └───────────────┘  └───────────────┘   │\n  └─────────────────────────────────────────┘\n\n      Zero cloud.  Zero API keys.  100% local.\n```\n\n**Transport:** Every MCP message is a newline-delimited JSON-RPC 2.0 object over stdio.  \n**AI logic:** DivLens never runs LLM inference — it only collects and returns raw system data.  \n**Privacy:** All data stays on your machine. Nothing is sent anywhere.\n\n---\n\n## Project Structure\n\n```\ndivlens-mcp/\n└── apps/\n    └── core/                      # Rust MCP engine\n        ├── src/\n        │   ├── tools/             # 17 tool implementations\n        │   ├── mcp/               # JSON-RPC 2.0 protocol handler\n        │   ├── mcp_server.rs      # stdio transport loop\n        │   ├── collectors/        # Native OS data collectors\n        │   │   ├── volatile/      # CPU, RAM, network (live)\n        │   │   ├── persistent/    # Storage, hardware (cached)\n        │   │   └── ondemand/      # Drivers, logs, packages\n        │   ├── modules/           # Core business logic\n        │   ├── db/                # SQLite caching layer\n        │   ├── models/            # Shared data types\n        │   └── utils/             # Shell env rehydration\n        ├── Cargo.toml\n        └── env.example\n```\n\n---\n\n## Optional: Semantic Memory\n\nEnable the `vector-memory` feature to give `recall_memory` true semantic search using a local ONNX embedding model (no cloud, no API key):\n\n```bash\ncargo build --release --features vector-memory\n```\n\nWhen enabled, DivLens creates a local [LanceDB](https://lancedb.github.io/lancedb/) vector store and uses [fastembed](https://github.com/Anush008/fastembed-rs) to embed and recall past diagnoses semantically.\n\nWhen disabled (default), `recall_memory` returns an empty list — no functionality is broken.\n\n---\n\n## Verify the Server\n\nTest the MCP wire protocol without a client:\n\n```bash\n# Initialize handshake\necho '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"clientInfo\":{\"name\":\"test\",\"version\":\"0.1\"}}}' \\\n  | divlens-core --mcp\n\n# Call a tool directly\necho '{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"get_live_metrics\",\"arguments\":{}}}' \\\n  | divlens-core --mcp\n```\n\n---\n\n## License\n\nLicensed under the **Apache License, Version 2.0**.  \nSee [LICENSE](LICENSE) for the full text.\n\nCopyright © 2024 DivLens Contributors.\n\n---\n\n<p align=\"center\">\n  <img src=\"divlensmainlogo.png\" width=\"48\" alt=\"DivLens\" /><br/>\n  <sub>Built with ❤️ in Rust · Zero cloud · AI-native diagnostics</sub>\n</p>\n",
  "bytes": 9009,
  "sha": "5708fc89f33750f2668708b813a7d7b70050c44c1e41481f4a9e54829965a007",
  "repo_slug": "lohithry/divlens-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_lohithry_divlens_01844d45/readme"
}