Skip to main content
Glama
Lohithry

DivLens MCP

by Lohithry

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種類の診断ツール

カテゴリ

ツール

返される内容

⚡ パフォーマンス

get_live_metrics

CPU使用率、RAM、スワップ、ブロックされたプロセス、稼働時間

⚡ パフォーマンス

get_process_list

CPU/RAM使用率上位のプロセス(PID付き)

💾 ストレージ

get_storage_health

マウントポイントごとの空き/使用/合計容量

💾 ストレージ

scan_storage_inventory

ファイルタイプごとの詳細なインベントリとサイズ

💾 ストレージ

get_file_type_summary

拡張子ごとのファイル数とサイズ

💾 ストレージ

get_specific_file_type

特定の拡張子に一致する全ファイル

💾 ストレージ

get_advanced_storage_stats

最大ファイル上位50件 + 古いデータの分析

💾 ストレージ

get_storage_diagnostics

IOPS、読み取り/書き込みレイテンシ、SMARTステータス

🖥️ ハードウェア

get_hardware_diagnostics

CPU/GPUスペック、バッテリー残量、温度、SMART情報

🌐 ネットワーク

get_network_diagnostics

スループット、アクティブな接続、信号強度

🌐 ネットワーク

get_network_config

アダプターごとのIP、DNS、インターフェース設定

🔬 アイデンティティ

get_system_dna

OS、ホスト名、稼働時間、マシンフィンガープリント

🛠️ 開発スタック

get_dev_stack

Node、Python、Rust、Go、Javaランタイムおよびパッケージ

🛠️ 開発スタック

get_drivers

カーネルモジュールおよびデバイスドライバー

📂 ユーティリティ

scan_directory

サイズ情報を含む再帰的なディレクトリ一覧

🧠 メモリ

recall_memory

過去のAI診断結果に対するセマンティック検索

📋 ログ

get_system_logs

パターン別にクラスタリングされた最近のOS/カーネルエラー


🚀 インストール — ワンコマンド、全プラットフォーム対応

Rustは不要。コンパイル不要。手動設定ファイルの編集も不要。 インストーラーがビルド済みバイナリをダウンロードし、AIクライアントを自動的に設定します。

macOS & Linux

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

Windows (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 --mcp

AIへの接続

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.


Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    F
    maintenance
    Multi-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 npm
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    A 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
  • A
    license
    A
    quality
    D
    maintenance
    Hardware 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.
    6
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    A 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.
    4
    1
    ISC