Skip to main content
Glama
LukeLamb
by LukeLamb

Claude ROCm GPU Monitor

Linux上のClaude Desktop向け読み取り専用AMD GPU監視ツール。Claudeが「トレーニングは正常に動作しているか?」「GPUの温度は?」「VRAMの残量は?」「どのプロセスがカードを使用しているか?」といった質問に答えられるようになります。プロセス終了、クロック変更、その他実行中のワークロードへの干渉機能は一切ありません。

rocm-smi(およびオプションで amdgpu_top)を呼び出し、5つの厳格な読み取り専用ツールを提供します。プロセス終了、クロック/電力のオーバーライド、ファン制御は行いません。それらが必要な場合は、gpu-killのようなツールを使用してください。

要件

  • Linux(AMD GPU搭載:RDNA2/3/4コンシューマーカード — RX 6000/7000/9000, R9700 — およびCDNAデータセンターカード)。

  • amdgpu カーネルモジュールがロードされていること(最新のUbuntu/Debian/Fedoraでは標準)。

  • rocm-smi がインストールされていること:

    sudo apt install rocm-smi            # minimal
    # or a full ROCm stack:
    # https://rocm.docs.amd.com/projects/install-on-linux/

一部のメトリクス(クロック、電力、詳細な温度)には新しいROCmリリースが必要です。カードやドライバーがメトリクスをサポートしていない場合、ツールはエラーではなく null を返します。

Related MCP server: System Monitor MCP Server

インストール (Claude Desktop)

  1. Releases ページから最新の ROCm.mcpb をダウンロードします。

  2. Claude Desktopで Settings → Extensions を開きます。

  3. 下部の Extension Developer までスクロールし、Install Extension をクリックして .mcpb ファイルを選択します。

  4. 拡張機能を有効にします。Claudeのツールピッカーに rocm-gpu-monitor: というプレフィックスが付いたツールが表示されます。

ツール

ツール

機能

gpu_status

ワンショットの概要:名前、使用率%、VRAM使用量/合計、温度(エッジ/ジャンクション/メモリ)、電力平均/最大、ファン%/RPM。

gpu_metrics

完全な rocm-smi -a --json ダンプ — クロック、電圧、PCIeリンク、ファームウェアバージョン、エンジンごとのアクティビティ。

gpu_processes

GPUを使用している計算プロセス(KFD PID)、VRAM使用量、カードインデックス。

gpu_watch

固定間隔でN回サンプリングし、生のフレームとカードごとの最小/最大/平均統計を返します。

rocm_info

インストール済みのROCm/HIPパッケージ、ドライバーバージョン、amdgpu モジュールのロード状態、amdgpu_top の利用可否。

すべてのツールにはMCPの readOnlyHint: true / destructiveHint: false / openWorldHint: false アノテーションが付与されています。

プロンプト例

「トレーニングは安定しているか?20秒間GPUを監視して。」

「現在のPyTorchプロセスはどれくらいVRAMを使っている?」

「GPUはサーマルスロットリングを起こしているか?ジャンクション温度は?」

「インストールされているROCmのバージョンと、ドライバーがロードされているか教えて。」

プライバシーポリシー

この拡張機能は完全にローカルマシン上で動作し、以下のプログラムのみを読み取り専用で呼び出します:

  • rocm-smi — AMDカーネルドライバーにデバイスメトリクスを問い合わせます。

  • amdgpu_top(インストールされている場合) — より詳細なメトリクスを取得します。

  • dpkg -l — インストールされているROCm関連パッケージを名前/バージョンで列挙します。

  • lsmod — amdgpu カーネルモジュールがロードされているか確認します。

  • which — 起動時に上記のバイナリの場所を特定します。

データがマシンから外部へ送信されることはありません。 この拡張機能はネットワークI/Oを行わず、ソケットを開かず、標準のプロセスstdout/stderr(Claude Desktopのログディレクトリにキャプチャされる)以外にファイルを書き込みません。GPUの状態(クロック、電力、ファン)を変更したり、プロセスを終了させたり、実行中のワークロードに干渉したりすることはできません。すべてのツールは厳格に読み取り専用です。

Claudeが参照できる情報には、GPUモデルとファームウェアバージョン、現在のVRAM使用量、温度/クロック/電力の読み取り値、GPUを使用しているプロセスのPIDとVRAM使用量、インストールされているROCm関連パッケージのリストが含まれます。これらを機密情報とみなす場合(例:共有マシン上の実行中プロセスPIDのリストなど)、この拡張機能を有効にしないでください。

トラブルシューティング

「rocm-smi is not installed」 — インストールしてください(sudo apt install rocm-smi)。Debian以外のディストリビューションを使用している場合は、AMDのROCmインストール手順に従ってください。

新しいGPUで多くのフィールドが null になる — 一部のメトリクス(クロック、電力、温度)は rocm-smi を通じて公開されるファームウェアのサポートに依存します。非常に新しいカード(例:RDNA4/R9700)では、-a --json がデータを返しても、個別の rocm-smi --showclocks/--showpower が「No JSON data to report」と報告する場合があります。この拡張機能はカバレッジを最大化するために -a --json を主要なソースとして使用します。特定のフィールドがカードでサポートされていない場合、エラーではなく null になります。

権限エラー — rocm-smi は通常root権限なしで実行されます。権限エラーが発生する場合は、Claude Desktopを実行しているユーザーが render および video グループに属しているか確認してください:

sudo usermod -aG render,video $USER
# log out and back in

開発

サーバーはnpm依存関係ゼロの約300行のNode.jsスクリプトです。.mcpb を再ビルドするには:

cd bundle-source
zip -j ../ROCm.mcpb manifest.json package.json server.js README.md LICENSE icon.png

ライセンス

MIT。LICENSE を参照してください。

関連

  • claude-terminal-mcp — シェル、ファイルシステム、バックグラウンドジョブ。

  • claude-linux-mcp — X11デスクトップ制御(スクリーンショット、マウス、キーボード、ウィンドウ、クリップボード)。

Available Tools

5 tools
gpu_metricsA
Read-only

Full rocm-smi -a --json output for every GPU (clocks, voltages, PCIe link width/speed, firmware versions, per-engine activity, throttle status, energy counters). Use when gpu_status is not enough. The shape is rocm-smi’s native JSON, unmodified.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already mark readOnlyHint=true and destructiveHint=false. The description adds context about the tool being a full dump (clocks, voltages, PCIe, firmware, etc.) and that the output is unmodified, which is helpful beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loading the core purpose and details. Every sentence adds value: first defines tool, second provides usage guidance. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no parameters and no output schema, the description sufficiently explains what the tool returns (full rocm-smi -a --json output) and when to use it. Annotations complement the read-only nature. Complete for a simple metrics tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no parameters, and schema coverage is 100%. With zero params, the description does not need to add parameter info. Baseline of 4 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns full rocm-smi -a --json output for every GPU with specific fields listed. It distinguishes from sibling tools by indicating when to use it (when gpu_status is not enough).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states 'Use when gpu_status is not enough', providing clear guidance on when to prefer this tool over alternatives. Also notes the output shape is unmodified rocm-smi JSON.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

gpu_processesA
Read-only

List compute processes using the GPU (KFD PIDs) with their VRAM usage and card index. Returns an empty list when no compute workloads are running.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Description adds behavioral context beyond annotations (e.g., returns empty list when no workloads) and confirms read-only nature. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two succinct sentences covering purpose and behavior, front-loaded with the action, no unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Without output schema, the description outlines return content (compute processes, VRAM, card index) and edge case. Could specify field details, but adequate for such a simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist, so baseline 4 applies. Description need not add parameter info.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific verb 'List' and resource 'compute processes using the GPU (KFD PIDs)', clearly distinguishing it from siblings like gpu_metrics or gpu_status.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool vs alternatives (e.g., gpu_watch, rocm_info), and no exclusions or prerequisites mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

gpu_statusA
Read-only

One-shot summary of all AMD GPUs: product name, GPU utilization %, VRAM used/total bytes and %, edge/junction/memory temperatures, average and max power, fan speed % and RPM. Returns one entry per card. Fields that the card does not support are returned as null (not omitted).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false. Description adds that unsupported fields return null, which is useful but not extensive. No contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single concise sentence listing all fields. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, description explains return structure (one entry per card, null for unsupported fields). Complete for the tool's simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters, schema coverage 100% trivially. Description doesn't add parameter meaning, but none needed. Baseline 4 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states it provides a 'one-shot summary of all AMD GPUs' and lists specific fields, distinguishing it from siblings like gpu_metrics which likely provide more detailed historical data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or alternatives mentioned. The description implies it is for a quick overview, but does not guide against using other tools for specific needs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

gpu_watchA
Read-only

Take N snapshots of gpu_status at a fixed interval and return both the raw frames and per-card min/max/avg statistics for utilization, temperature, power, and VRAM usage. Useful for answering “is this training run stable?”. Default: 5 samples at 1000ms intervals.

ParametersJSON Schema
NameRequiredDescriptionDefault
samplesNoNumber of samples to take (2–60). Default: 5.
interval_msNoMilliseconds between samples (100–10000). Default: 1000.

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, so no contradiction. Description adds that it returns raw and aggregated data, but omits that the tool blocks for the total sampling duration, which is important for agent planning.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no fluff: purpose, use case, and defaults are front-loaded efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 2 params with full schema coverage, no output schema, and sibling tools, the description adequately explains input, output (raw and stats), and use case. Lacks return structure details but acceptable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with clear parameter descriptions including defaults. The tool description does not add meaning beyond what the schema already provides, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it takes N snapshots of gpu_status at intervals and returns raw frames plus per-card statistics, distinguishing it from siblings like gpu_status (single snapshot) and gpu_metrics (single metrics).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides a specific use case ('is this training run stable?') and default parameters, implying when to use it. However, it does not explicitly mention alternatives or when not to use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

rocm_infoA
Read-only

Report the rocm-smi version, kernel driver version, whether the amdgpu module is loaded, installed ROCm/HIP/HSA packages (from dpkg), and whether amdgpu_top is available. Useful for checking ROCm install health before running workloads.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false. The description adds detail on exactly what is reported (versions, packages, etc.), providing behavioral context beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence efficiently lists all reported information and includes a usage note. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple info tool with no output schema, the description adequately covers purpose and content. Could optionally mention return format, but not necessary.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has zero parameters, so schema covers all. Description adds no parameter info, but this is acceptable given no params. Baseline 4 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'Report' and lists concrete items (rocm-smi version, kernel driver, etc.), clearly distinguishing this from sibling tools that focus on metrics, processes, or status.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

States explicit use case: 'checking ROCm install health before running workloads.' This guides the agent on when to invoke. While it doesn't explicitly mention alternatives, the context is clear enough.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv0.1.0
    • First observedgpu_metrics
    • First observedgpu_processes
    • First observedgpu_status
    • First observedgpu_watch
    • First observedrocm_info

TDQS

A4.3/5.0

Scored across 5 tools

Disambiguation5/5

Each tool serves a distinct purpose: raw metrics, summary status, process listing, time-series snapshots, and install health check. No overlap in functionality.

Naming Consistency5/5

All tool names follow a consistent snake_case pattern with a clear noun-based prefix (gpu_ or rocm_), making them predictable and easy to distinguish.

Tool Count5/5

Five tools is appropriate for a monitoring-focused server, covering essential needs without being excessive or insufficient.

Completeness4/5

The tool set covers core monitoring, process insight, and installation health, but lacks a way to reset or configure GPU parameters, though that may be out of scope.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides system monitoring and management capabilities for Claude CLI, allowing users to view system information, track resource usage, and manage processes through natural language commands.
    -
  • F
    license
    A
    quality
    D
    maintenance
    Enables Claude to monitor CPU, memory, disk, processes, network connections, Docker containers, and system logs for system diagnostics and troubleshooting.
    5
    -