renderdoc-mcp
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 のみで動作
純 Python —
pip 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 |
|
Linux |
|
このファイルを含むディレクトリが必要です。
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)
ツール | 説明 |
|
|
| 現在のキャプチャを閉じてリソースを解放 |
| キャプチャのメタデータ: API、アクション数、解像度、known_gpu_quirks(Adreno/Mali/PowerVR/Apple) |
| フレームレベルの統計: タイプ別アクション数、テクスチャ/バッファメモリ、レンダーターゲット、解像度 |
イベントナビゲーション(5)
ツール | 説明 |
| ドローコール / アクションツリーを一覧表示 — |
| 単一アクションの完全な詳細 |
| イベントに移動(パイプラインクエリの前に必須) |
| 名前パターンおよび/またはアクションフラグで検索 |
| レンダリング状態でドローコールを検索: ブレンド、最小頂点数、テクスチャ/シェーダー/RT バインディング |
パイプライン検査(4)
ツール | 説明 |
| 完全な状態: トポロジー、ビューポート、ラスタライザー、ブレンド、深度、ステンシル(人間が読める列挙型) |
| シェーダーステージの定数バッファ、SRV、UAV、サンプラー |
| 頂点属性、頂点/インデックスバッファのバインディング |
| ワンコールのドロー分析: アクション情報、ブレンド式、深度、ステンシル、ラスタライザー、サイズ付きテクスチャ、RT、シェーダー |
リソース分析(4)
ツール | 説明 |
| すべてのテクスチャ(フォーマット、最小幅でフィルタリング可能) |
| すべてのバッファ(最小サイズでフィルタリング可能) |
| すべての名前付きリソース(タイプ、名前パターンでフィルタリング可能) |
| どのイベントがリソースを読み書きするか |
データ抽出(8)
ツール | 説明 |
| PNG、JPG、BMP、TGA、HDR、EXR、または DDS にエクスポート |
| バッファのバイトを読み取る(16進ダンプまたは float32 配列) |
| 座標位置の RGBA 値 |
| チャンネルごとの最小/最大/平均と異常検出(NaN/Inf/負値); キューブマップ用の |
| 矩形領域のピクセルを読み取る(最大 64×64)ピクセルごとの異常フラグ付き |
| ドローコールにバインドされたすべてのテクスチャを一括エクスポート(自動命名、プレースホルダーはスキップ) |
| イベント時点の RT スナップショットを保存(カラー + オプションで深度) |
| メッシュを OBJ としてエクスポート — ポスト VS データから位置、法線、UV を含む |
シェーダー分析(3)
ツール | 説明 |
| 自動フォールバックチェーン付きのシェーダー逆アセンブル; |
| 入力/出力シグネチャ、リソースバインディングレイアウト |
| 実際の定数バッファ変数の値; 変数名の部分文字列用の |
高度な機能(6)
ツール | 説明 |
| すべてのイベントにわたる完全なピクセル単位の変更履歴 |
| 変換後頂点データ(VS 出力 / GS 出力) |
| 2 つのドローコールを比較 — 人間が読める意味合い付きで状態の差分を表示 |
| Clear/RT 切り替えによるレンダーパス境界を自動検出、各パスを要約 |
| RT 領域の一様グリッドスキャン — NaN/Inf/負値/露出過多のホットスポットを検出 |
| ピクセル単位のシェーダーデバッグ — 変数トレースまたはピクセル値 + シェーダー情報をフォールバックとして返す |
パフォーマンス分析(4)
ツール | 説明 |
| 最もコストのかかるレンダーパス — GPU カウンターが利用可能な場合はそれを使用し、それ以外は三角形数ヒューリスティックにフォールバック |
| レンダーターゲットグループごとのオーバードロー推定 |
| レンダーターゲットごとの書き込み/読み取り帯域幅の推定 |
| 冗長な状態変更パターンとバッチ処理の機会を検出 |
診断(4)
ツール | 説明 |
| すべての浮動小数点 RT で負値/NaN/Inf をスキャン — それらを導入した最初のイベントを検出、TAA 蓄積を検出 |
| R11G11B10 の符号ビット損失、浅い深度バッファ、SRGB/リニアの不一致をチェック |
| リフレクションパスをメインシーンのドローと比較 — シェーダー/ブレンド/フォーマットの原因を発見 |
| 精度 / パフォーマンス / 互換性 / GPU 固有のリスクカテゴリにわたる包括的なチェック |
プロンプト
一般的なワークフローを AI にガイドする組み込みのプロンプトテンプレート:
プロンプト | 説明 |
| 単一のドローコールを深掘り: パイプライン → シェーダー → 定数バッファ → 出力 |
| 問題の説明から体系的な診断 |
| フレーム全体のパフォーマンス分析: パスタイミング、オーバードロー、帯域幅、状態変更 |
仕組み
AI Assistant ←—MCP—→ renderdoc-mcp server ←—Python API—→ renderdoc.pyd ←→ GPU replayこのサーバーは RenderDoc のヘッドレスリプレイ API(renderdoc.pyd)を使用して:
GUI なしで
.rdcキャプチャファイルを開くフレームをリプレイし、任意のイベントでパイプライン状態をクエリ
テクスチャ、バッファ、シェーダーデータ、ピクセル履歴を抽出
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
This server cannot be installed
Maintenance
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…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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