Skip to main content
Glama

renderdoc-mcp

$\Large\color{#ff69b4}{\textsf{これは個人の }}$ $\Large\color{#ff69b4}{\mathtt{✨ vibe\text{-}coding ✨}}$ $\Large\color{#ff69b4}{\textsf{プロジェクトです —}}$ $\Large\color{#ff69b4}{\textsf{楽しみのために作られたもので、本番利用向けではありません。}}$

$\small\color{gray}{\textsf{なぜこのリポジトリにこんなにスターが付いているのか私にはわかりません...}}$

RenderDoc 用の MCP サーバー — AI アシスタントが GPU フレームキャプチャ(.rdc ファイル)を解析し、グラフィックスデバッグやパフォーマンス分析を行うためのツールです。

Model Context Protocol 上に構築されており、Claude Desktop、Claude Code、および MCP 互換の任意のクライアントで動作します。

特徴

  • 42 のツール — RenderDoc の分析ワークフロー全体をカバー

  • 10 の高レベルツール — ワンコール分析用(ドローコール状態、フレーム概要、差分、一括エクスポート、ピクセル領域サンプリングなど)

  • 3 つの組み込みプロンプト — ガイド付きデバッグ用

  • 人間が読める出力 — ブレンドモード、深度関数、トポロジーを数値ではなく名前で表示

  • GPU 癖の検出 — ドライバー名から Adreno/Mali/PowerVR/Apple 固有の落とし穴を自動識別

  • ヘッドレス — GUI 不要、RenderDoc の Python リプレイ API のみで動作

  • 純 Pythonpip install だけで完了、ビルドステップ不要

  • D3D11、D3D12、OpenGL、Vulkan、OpenGL ES キャプチャに対応

クイックスタート

1. 前提条件

  • Python 3.10+

  • RenderDoc がインストールされていること(ダウンロード

    • renderdoc.pyd(Windows)または renderdoc.so(Linux)の Python モジュールが必要です

    • これは RenderDoc のすべてのインストールに同梱されています

2. インストール

git clone https://github.com/Linkingooo/renderdoc-mcp.git
cd renderdoc-mcp
pip install -e .

3. renderdoc.pyd のパスを確認

Python モジュールは RenderDoc のインストールディレクトリにあります:

プラットフォーム

一般的なパス

Windows

C:\Program Files\RenderDoc\renderdoc.pyd

Linux

/usr/lib/renderdoc/librenderdoc.so またはビルドした場所

このファイルを含むディレクトリが必要です。

4. MCP クライアントを設定

claude_desktop_config.json を編集します(設定 → 開発者 → 設定を編集):

{
  "mcpServers": {
    "renderdoc": {
      "command": "python",
      "args": ["-m", "renderdoc_mcp"],
      "env": {
        "RENDERDOC_MODULE_PATH": "C:\\Program Files\\RenderDoc"
      }
    }
  }
}

.claude/settings.json に追加します:

{
  "mcpServers": {
    "renderdoc": {
      "command": "python",
      "args": ["-m", "renderdoc_mcp"],
      "env": {
        "RENDERDOC_MODULE_PATH": "C:\\Program Files\\RenderDoc"
      }
    }
  }
}
# Set the module path
export RENDERDOC_MODULE_PATH="/path/to/renderdoc"   # Linux/macOS
set RENDERDOC_MODULE_PATH=C:\Program Files\RenderDoc  # Windows

# Run
python -m renderdoc_mcp

使用例

設定が完了したら、AI アシスタントに話しかけるだけです:

frame.rdc を開いて、フレーム内で何が起きているか見せて」

「キャラクターモデルをレンダリングするドローコールを見つけて、そのパイプライン状態を確認して」

「シャドウマップが黒くレンダリングされるのはなぜ?深度パスを確認して」

「パフォーマンスを分析して — 冗長なドローコールはある?」

典型的なツールフロー

open_capture("frame.rdc")                     # Load the capture
├── get_capture_info()                         # API, GPU, known_gpu_quirks
├── get_frame_overview()                       # Frame-level stats and render passes
├── get_draw_call_state(142)                   # Complete draw call state in one call
├── diff_draw_calls(140, 142)                  # Compare two draw calls (with implications)
├── export_draw_textures(142, "./tex/")        # Batch export all bound textures
├── save_render_target(142, "./rt.png")        # Save render target snapshot
├── analyze_render_passes()                    # Auto-detect render pass boundaries
├── find_draws(blend=True, min_vertices=1000)  # Search by rendering state
├── sample_pixel_region(rt_id, 0,0,512,512)   # Scan RT region for NaN/Inf/negatives
├── pixel_history(id, 512, 384)               # Debug a specific pixel
├── export_mesh(142, "./mesh.obj")             # Export mesh as OBJ
└── close_capture()                            # Clean up

パフォーマンスおよび診断分析の場合:

get_pass_timing(granularity="pass")      # Find most expensive render passes
analyze_overdraw()                        # Fill-rate pressure estimate
analyze_bandwidth()                       # Memory bandwidth estimate
analyze_state_changes()                   # Batching opportunities
diagnose_negative_values()               # Find NaN/Inf/negative color values (爆闪)
diagnose_precision_issues()              # R11G11B10, D16, SRGB mismatches
diagnose_reflection_mismatch()           # Reflection artifact diagnosis
diagnose_mobile_risks()                  # Comprehensive mobile GPU risk check

より低レベルの検査には、すべての詳細ツールが引き続き利用可能です:

set_event(142)                                    # Navigate to a draw call
├── get_pipeline_state()                          # Inspect rasterizer/blend/depth
├── get_shader_bindings("pixel")                  # Check what textures/buffers are bound
├── get_cbuffer_contents("pixel", 0, filter="ibl") # Read shader constants (filterable)
├── disassemble_shader("pixel", search="SampleSH") # Shader code with context search
└── save_texture(id, "rt.png")                    # Export a specific texture

ツール

セッション管理(4)

ツール

説明

open_capture

.rdc ファイルを開く(以前のキャプチャは自動的に閉じる)

close_capture

現在のキャプチャを閉じてリソースを解放

get_capture_info

キャプチャのメタデータ: API、アクション数、解像度、known_gpu_quirks(Adreno/Mali/PowerVR/Apple)

get_frame_overview

フレームレベルの統計: タイプ別アクション数、テクスチャ/バッファメモリ、レンダーターゲット、解像度

イベントナビゲーション(5)

ツール

説明

list_actions

ドローコール / アクションツリーを一覧表示 — filter(名前の部分文字列)と event_type(draw/clear/copy…)に対応

get_action

単一アクションの完全な詳細

set_event

イベントに移動(パイプラインクエリの前に必須

search_actions

名前パターンおよび/またはアクションフラグで検索

find_draws

レンダリング状態でドローコールを検索: ブレンド、最小頂点数、テクスチャ/シェーダー/RT バインディング

パイプライン検査(4)

ツール

説明

get_pipeline_state

完全な状態: トポロジー、ビューポート、ラスタライザー、ブレンド、深度、ステンシル(人間が読める列挙型)

get_shader_bindings

シェーダーステージの定数バッファ、SRV、UAV、サンプラー

get_vertex_inputs

頂点属性、頂点/インデックスバッファのバインディング

get_draw_call_state

ワンコールのドロー分析: アクション情報、ブレンド式、深度、ステンシル、ラスタライザー、サイズ付きテクスチャ、RT、シェーダー

リソース分析(4)

ツール

説明

list_textures

すべてのテクスチャ(フォーマット、最小幅でフィルタリング可能)

list_buffers

すべてのバッファ(最小サイズでフィルタリング可能)

list_resources

すべての名前付きリソース(タイプ、名前パターンでフィルタリング可能)

get_resource_usage

どのイベントがリソースを読み書きするか

データ抽出(8)

ツール

説明

save_texture

PNG、JPG、BMP、TGA、HDR、EXR、または DDS にエクスポート

get_buffer_data

バッファのバイトを読み取る(16進ダンプまたは float32 配列)

pick_pixel

座標位置の RGBA 値

get_texture_stats

チャンネルごとの最小/最大/平均と異常検出(NaN/Inf/負値); キューブマップ用の all_slices に対応

read_texture_pixels

矩形領域のピクセルを読み取る(最大 64×64)ピクセルごとの異常フラグ付き

export_draw_textures

ドローコールにバインドされたすべてのテクスチャを一括エクスポート(自動命名、プレースホルダーはスキップ)

save_render_target

イベント時点の RT スナップショットを保存(カラー + オプションで深度)

export_mesh

メッシュを OBJ としてエクスポート — ポスト VS データから位置、法線、UV を含む

シェーダー分析(3)

ツール

説明

disassemble_shader

自動フォールバックチェーン付きのシェーダー逆アセンブル; search(キーワード + コンテキスト)と line_range に対応

get_shader_reflection

入力/出力シグネチャ、リソースバインディングレイアウト

get_cbuffer_contents

実際の定数バッファ変数の値; 変数名の部分文字列用の filter に対応

高度な機能(6)

ツール

説明

pixel_history

すべてのイベントにわたる完全なピクセル単位の変更履歴

get_post_vs_data

変換後頂点データ(VS 出力 / GS 出力)

diff_draw_calls

2 つのドローコールを比較 — 人間が読める意味合い付きで状態の差分を表示

analyze_render_passes

Clear/RT 切り替えによるレンダーパス境界を自動検出、各パスを要約

sample_pixel_region

RT 領域の一様グリッドスキャン — NaN/Inf/負値/露出過多のホットスポットを検出

debug_shader_at_pixel

ピクセル単位のシェーダーデバッグ — 変数トレースまたはピクセル値 + シェーダー情報をフォールバックとして返す

パフォーマンス分析(4)

ツール

説明

get_pass_timing

最もコストのかかるレンダーパス — GPU カウンターが利用可能な場合はそれを使用し、それ以外は三角形数ヒューリスティックにフォールバック

analyze_overdraw

レンダーターゲットグループごとのオーバードロー推定

analyze_bandwidth

レンダーターゲットごとの書き込み/読み取り帯域幅の推定

analyze_state_changes

冗長な状態変更パターンとバッチ処理の機会を検出

診断(4)

ツール

説明

diagnose_negative_values

すべての浮動小数点 RT で負値/NaN/Inf をスキャン — それらを導入した最初のイベントを検出、TAA 蓄積を検出

diagnose_precision_issues

R11G11B10 の符号ビット損失、浅い深度バッファ、SRGB/リニアの不一致をチェック

diagnose_reflection_mismatch

リフレクションパスをメインシーンのドローと比較 — シェーダー/ブレンド/フォーマットの原因を発見

diagnose_mobile_risks

精度 / パフォーマンス / 互換性 / GPU 固有のリスクカテゴリにわたる包括的なチェック

プロンプト

一般的なワークフローを AI にガイドする組み込みのプロンプトテンプレート:

プロンプト

説明

debug_draw_call

単一のドローコールを深掘り: パイプライン → シェーダー → 定数バッファ → 出力

find_rendering_issue

問題の説明から体系的な診断

analyze_performance

フレーム全体のパフォーマンス分析: パスタイミング、オーバードロー、帯域幅、状態変更

仕組み

AI Assistant ←—MCP—→ renderdoc-mcp server ←—Python API—→ renderdoc.pyd ←→ GPU replay

このサーバーは RenderDoc のヘッドレスリプレイ API(renderdoc.pyd)を使用して:

  1. GUI なしで .rdc キャプチャファイルを開く

  2. フレームをリプレイし、任意のイベントでパイプライン状態をクエリ

  3. テクスチャ、バッファ、シェーダーデータ、ピクセル履歴を抽出

  4. AI が推論できる構造化 JSON を返す

開発

# Install in dev mode
pip install -e .

# Run tests (no RenderDoc needed — uses mocks)
python -m pytest tests/ -v

# Project structure
src/renderdoc_mcp/
├── server.py                 # FastMCP server, 3 prompt definitions
├── session.py                # Capture lifecycle, resource/texture caches (singleton)
├── util.py                   # Serialization, enum maps, blend formula, module loader
└── tools/
    ├── session_tools.py      # open/close/info (GPU quirks) + get_frame_overview
    ├── event_tools.py        # list/get/set/search actions + find_draws
    ├── pipeline_tools.py     # pipeline state, shader bindings, vertex inputs + get_draw_call_state
    ├── resource_tools.py     # texture/buffer/resource enumeration
    ├── data_tools.py         # save/read/pick/stats + read_texture_pixels + export_draw_textures, save_render_target, export_mesh
    ├── shader_tools.py       # disassembly (fallback chain, search), reflection, cbuffer contents (filter)
    ├── advanced_tools.py     # pixel history, post-VS data + diff_draw_calls (implications), analyze_render_passes, sample_pixel_region, debug_shader_at_pixel
    ├── performance_tools.py  # get_pass_timing, analyze_overdraw, analyze_bandwidth, analyze_state_changes
    └── diagnostic_tools.py  # diagnose_negative_values, diagnose_precision_issues, diagnose_reflection_mismatch, diagnose_mobile_risks

ライセンス

MIT

-
license - not tested
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.

  • MCP server for Wan AI video generation

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fjxyyzg3/renderdoc-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server