DivLens MCP
DivLens MCPとは?
DivLens MCPは、Rustで記述された高性能なModel Context Protocol (MCP)サーバーです。
AIアシスタントとあなたのマシンの橋渡しを行い、Claude、Cursor、Windsurf、その他MCP互換エージェントに対して、ハードウェアセンサー、ストレージメトリクス、ネットワーク診断、プロセスツリー、開発ランタイム、システムログなどへのライブかつ構造化されたアクセスを提供します。
クラウド不要。APIキー不要。設定不要。ビルドして実行するだけです。
"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.Related MCP server: GhostInTheShell MCP
✦ 17種類の診断ツール
カテゴリ | ツール | 返される内容 |
⚡ パフォーマンス |
| CPU使用率、RAM、スワップ、ブロックされたプロセス、稼働時間 |
⚡ パフォーマンス |
| CPU/RAM使用率上位のプロセス(PID付き) |
💾 ストレージ |
| マウントポイントごとの空き/使用/合計容量 |
💾 ストレージ |
| ファイルタイプごとの詳細なインベントリとサイズ |
💾 ストレージ |
| 拡張子ごとのファイル数とサイズ |
💾 ストレージ |
| 特定の拡張子に一致する全ファイル |
💾 ストレージ |
| 最大ファイル上位50件 + 古いデータの分析 |
💾 ストレージ |
| IOPS、読み取り/書き込みレイテンシ、SMARTステータス |
🖥️ ハードウェア |
| CPU/GPUスペック、バッテリー残量、温度、SMART情報 |
🌐 ネットワーク |
| スループット、アクティブな接続、信号強度 |
🌐 ネットワーク |
| アダプターごとのIP、DNS、インターフェース設定 |
🔬 アイデンティティ |
| OS、ホスト名、稼働時間、マシンフィンガープリント |
🛠️ 開発スタック |
| Node、Python、Rust、Go、Javaランタイムおよびパッケージ |
🛠️ 開発スタック |
| カーネルモジュールおよびデバイスドライバー |
📂 ユーティリティ |
| サイズ情報を含む再帰的なディレクトリ一覧 |
🧠 メモリ |
| 過去のAI診断結果に対するセマンティック検索 |
📋 ログ |
| パターン別にクラスタリングされた最近のOS/カーネルエラー |
🚀 インストール — ワンコマンド、全プラットフォーム対応
Rustは不要。コンパイル不要。手動設定ファイルの編集も不要。 インストーラーがビルド済みバイナリをダウンロードし、AIクライアントを自動的に設定します。
macOS & Linux
curl -fsSL https://raw.githubusercontent.com/Lohithry/divlens-mcp/main/install.sh | bashWindows (PowerShell — 管理者権限不要)
irm https://raw.githubusercontent.com/Lohithry/divlens-mcp/main/install.ps1 | iexインストーラーは以下の処理を行います:
✅ OSとチップ(Apple Silicon / Intel / Linux / Windows)を検出
✅ GitHub Releasesから適切なビルド済みバイナリをダウンロード
✅ SHA-256チェックサムを検証
✅ 管理者権限なしでPATHにインストール
✅ Claude Desktop、Cursor、Windsurf、Antigravityを自動設定
✅ 完了前にサーバーの動作をテスト
あとはAIクライアントを再起動して、「今何がCPUを使っている?」と尋ねるだけです。
ソースからビルド(上級者向け)
Rust 1.82以降が必要です。
git clone https://github.com/Lohithry/divlens-mcp.git
cd divlens-mcp/apps/core
cargo build --release
./target/release/divlens-core --mcpAIへの接続
Claude Desktop
設定ファイル:
~/Library/Application Support/Claude/claude_desktop_config.json(macOS) または%APPDATA%\Claude\claude_desktop_config.json(Windows)
{
"mcpServers": {
"divlens": {
"command": "/usr/local/bin/divlens-core",
"args": ["--mcp"]
}
}
}Claude Desktopを終了して再起動してください。🔌プラグアイコンが表示されれば接続成功です。
Cursor
設定ファイル:
~/.cursor/mcp.json
{
"mcpServers": {
"divlens": {
"command": "/usr/local/bin/divlens-core",
"args": ["--mcp"]
}
}
}Cmd+Shift+P → Reload Window を実行してください。
Windsurf
設定ファイル:
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"divlens": {
"command": "/usr/local/bin/divlens-core",
"args": ["--mcp"]
}
}
}セットアップの詳細については、**DEPLOYMENT.md**を参照してください。
仕組み
┌─────────────────────────────────────────┐
│ 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.トランスポート: すべてのMCPメッセージは、stdio経由の改行区切りJSON-RPC 2.0オブジェクトです。 AIロジック: DivLensはLLM推論を実行しません。生のシステムデータを収集して返すだけです。 プライバシー: すべてのデータはあなたのマシン内に留まります。外部へ送信されることは一切ありません。
プロジェクト構造
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オプション: セマンティックメモリ
vector-memory機能を有効にすると、ローカルのONNX埋め込みモデルを使用してrecall_memoryで真のセマンティック検索が可能になります(クラウド不要、APIキー不要):
cargo build --release --features vector-memory有効にすると、DivLensはローカルにLanceDBベクターストアを作成し、fastembedを使用して過去の診断結果を埋め込み、セマンティックに呼び出します。
無効(デフォルト)の場合、recall_memoryは空のリストを返しますが、他の機能は問題なく動作します。
サーバーの検証
クライアントなしでMCPワイヤプロトコルをテストします:
# 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ライセンス
Apache License, Version 2.0の下でライセンスされています。 全文はLICENSEを参照してください。
Copyright © 2024 DivLens Contributors.
This server cannot be deployed
Maintenance
Related MCP Connectors
An MCP memory server. One memory your agents share — across models, devices and apps.
Real-time planetary signal engine and Model Context Protocol (MCP) server for autonomous AI agents.
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceMulti-machine system monitor with a built-in MCP server that enables AI agents to query health metrics, manage processes, schedule cron jobs, and run diagnostics across local and remote machines.133 npmApache 2.0
- AlicenseNot gradedqualityDmaintenanceA sandboxed, read-only MCP server that safely exposes system metrics, container diagnostics, and logs to AI agents with intelligent context compression and strict security measures.MIT
- AlicenseAqualityDmaintenanceHardware probe MCP server that provides deep hardware inventory and live sensor telemetry for AI agents, including CPU, memory, disk, GPU, and sensor data across platforms.6MIT
- AlicenseAqualityDmaintenanceA secure, read-only MCP server for AI-powered system monitoring. It provides real-time OS metrics, config discovery, and safe log tailing to enable autonomous infrastructure audits without shell access risks.41ISC