RenderDoc MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@RenderDoc MCP Analyze the draw call at event 128 in C:\captures\frame.rdc"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
RenderDoc MCP
Let AI clients that support the Model Context Protocol (MCP) analyze RenderDoc capture files directly: browse Draw/Dispatch events, inspect pipeline and shaders, and page through vertex and constant buffer data.
The repository contains a runnable MCP stdio service, session and path safety boundaries, a Mock backend for development testing, and a real Replay bridge backend that connects to qrenderdoc 1.44.
[!IMPORTANT] The
qrenderdocbackend is currently recommended for connecting real captures; therenderdoc/nativebackend remains a reserved implementation.
The real bridge consists of two processes: a modern Python 3.11 MCP Gateway, and a UI extension running inside
qrenderdoc's embedded Python 3.6. The two communicate over a native file-queue JSON protocol with a random
token; this avoids depending on the _socket module, which is missing from RenderDoc's slim Python.
MCP Client <-- stdio --> Python 3.11 Gateway
|
authenticated JSON spool
|
qrenderdoc extension
|
RenderDoc ReplayControllerExisting capabilities
MCP stdio service with structured tool responses.
.rdcpath whitelist, file type, size, and session count limits.Launch standalone whitelisted
.exefiles via RenderDoc injection, with arguments passed as an array and no shell execution.Stable
capture_id, explicitevent_id, no reliance on hidden current-event selection.Serial per-capture backend access, leaving headroom for RenderDoc ReplayController's threading model.
Action filtering and cursor-based pagination.
inspect_eventcomposite call, avoiding a large number of fine-grained MCP round trips for a single inspection.Read topology, viewport/scissor, shaders, resource bindings, render targets, and validation messages for the current event.
Unified error structure and a passive capture summary Resource.
First batch of tools:
healthlaunch_programopen_captureclose_captureget_capture_summarylist_actionsget_eventinspect_eventget_pipeline_stateget_shaderget_vertex_datalist_constant_buffersget_constant_buffer
Pipeline, shader, and buffer data
get_pipeline_statewithout asectionargument returns a cross-API common snapshot andapi_specific_sections; passing any of those names assectionin a follow-up call reads the full top-level state group for D3D11, D3D12, Vulkan, or OpenGL.get_shaderreadsreflection,disassembly,source, orrawper stage. The latter three large content types are paged withcursor/next_cursor;source_file_indexcan traverse every embedded source file.get_vertex_dataexpands instances and draw vertices into stable records, returning decoded values for all attributes, exactraw_hex, actual buffer offsets, and format metadata;uv_attributesexplicitly marksUV/TEXCOORD. Keep followingnext_cursorto cover all instances and vertices.list_constant_buffersenumerates every shader stage, reflection block, and array element; then useget_constant_bufferto read all decoded variables in that group. The underlying raw bytes are paged withraw_offset/next_offset, so no data is lost even beyond the single-read limit.
Related MCP server: RenderDoc MCP Server
Environment
Python 3.11+
MCP Python SDK stable line
>=1.27,<2RenderDoc/qrenderdoc 1.44 (real bridge backend)
SDK v2 is still in pre-release, so this project is pinned to v1.x for now, avoiding framework code changing with pre-release interfaces.
Quick start (Mock backend)
In PowerShell:
python -m venv .venv
.venv\Scripts\python -m pip install -e ".[dev]"
$env:RENDERDOC_MCP_BACKEND = "mock"
$env:RENDERDOC_MCP_ALLOWED_ROOTS = (Get-Location).Path
.venv\Scripts\python -m renderdoc_mcpstdio is the protocol channel; do not write normal logs to stdout.
Using MCP Inspector:
.venv\Scripts\mcp dev src\renderdoc_mcp\server.pyThe Mock backend still requires a real, whitelisted .rdc path to be passed in, but it does not parse the
file contents.
Installing the qrenderdoc bridge
Assuming RenderDoc is installed at C:\Tools\RenderDoc, run the following in the project directory:
powershell -ExecutionPolicy Bypass -File .\scripts\install_qrenderdoc_bridge.ps1 `
-RenderDocRoot C:\Tools\RenderDocThe script will:
Install the extension to
%APPDATA%\qrenderdoc\extensions\renderdoc_mcp_bridge;Generate a random token and write it to
bridge_config.jsonon the extension side;Generate
.renderdoc-mcp-bridge.jsonin the project root for the Gateway to use.
Then open C:\Tools\RenderDoc\qrenderdoc.exe, go to Tools → Manage Extensions, select
RenderDoc MCP Bridge, click Load first, and after it succeeds check Always Load. When using the
real backend, qrenderdoc must stay running; the spool directory defaults to .renderdoc-mcp-spool inside
the project, which is Git-ignored.
During development you can also have qrenderdoc run a load script automatically once the UI opens:
C:\Tools\RenderDoc\qrenderdoc.exe --ui-python .\scripts\load_qrenderdoc_bridge.pyThis command only handles loading for that session; for daily use it is still recommended to check Always Load in the extension manager.
MCP client configuration example
Replace the paths with your actual locations:
{
"mcpServers": {
"renderdoc": {
"command": "C:\\path\\to\\RenderDoc_MCP\\.venv\\Scripts\\python.exe",
"args": ["-m", "renderdoc_mcp"],
"env": {
"RENDERDOC_MCP_BACKEND": "qrenderdoc",
"RENDERDOC_MCP_ALLOWED_ROOTS": "C:\\captures",
"RENDERDOC_MCP_ALLOWED_EXECUTABLE_ROOTS": "C:\\projects\\my-renderer",
"RENDERDOC_MCP_ARTIFACT_ROOT": "C:\\path\\to\\RenderDoc_MCP\\artifacts",
"RENDERDOC_MCP_RENDERDOC_ROOT": "C:\\Tools\\RenderDoc"
},
"cwd": "C:\\path\\to\\RenderDoc_MCP"
}
}
}In Codex's graphical configuration page, the arguments must be split into two lines: -m and
renderdoc_mcp. Leave environment variable passthrough blank; set Working directory to the project root.
Since .renderdoc-mcp-bridge.json already exists in the working directory, there is no need to paste the
token manually into the MCP configuration.
Configuration options
Environment variable | Default | Description |
|
|
|
| current directory | Directories where captures may be opened; multiple directories separated by the system path separator |
| empty (launch disabled) | Root paths for |
|
| Directory for artifacts such as PNG, shader, and JSON files generated later |
|
| Maximum concurrent capture sessions; the qrenderdoc backend is tightened to 1 |
|
| Maximum size limit for a single capture |
|
| Hard upper limit for a single Action page |
|
| Hard upper limit for a single page of vertex, constant buffer, and shader content reads; cursors allow continued reading |
| config file value | RenderDoc installation directory, e.g. |
|
| Gateway bridge configuration file |
| config file value | Local bridge request/response queue directory |
| config file value | Optional environment variable override; normally no manual configuration needed |
|
| Timeout for a single bridge request |
Launching a program from RenderDoc
First add your program's project root to RENDERDOC_MCP_ALLOWED_EXECUTABLE_ROOTS, restart the MCP
service, then call:
{
"executable": "C:\\projects\\my-renderer\\bin\\renderer.exe",
"arguments": ["--scene", "C:\\projects\\my-renderer\\scenes\\demo.json"],
"working_directory": "C:\\projects\\my-renderer",
"hook_into_children": false,
"api_validation": false
}A successful result includes the RenderDoc target-control ident and the capture file template. The program
has been injected by RenderDoc, so you can press the default capture hotkey F12 in the program window. This
tool does not accept shell commands or environment variable modifications; enable hook_into_children only
if child processes also need to be injected, and api_validation only if the API validation layer is needed.
Testing
After installing development dependencies:
.venv\Scripts\python -m pytest
.venv\Scripts\ruff check .Core service tests can also run without third-party test dependencies:
$env:PYTHONPATH = "src"
python -m unittest discover -s tests -vSafety boundaries
Only
.rdcfiles underRENDERDOC_MCP_ALLOWED_ROOTScan be opened.launch_programis disabled by default and can only launch.exefiles underRENDERDOC_MCP_ALLOWED_EXECUTABLE_ROOTS.Launch arguments are passed as an array, not through a shell; the Gateway does not allow modifying the target program's environment variables through tools.
Native messages between the Gateway and the qrenderdoc extension are authenticated with a random token generated at install time.
Action, shader, vertex, and buffer data are all subject to pagination or single-read limits.
Project status and next steps
The bridge main path, pipeline state, shaders, vertex input, and constant buffer reads are implemented. Future tasks can continue with Texture export, generic buffer readback, Pixel History, and artifact management.
See the architecture notes for detailed boundaries.
License
Available Tools
13 toolsclose_captureB
Close a capture session and release its replay resources.
Inputs: capture_id (required). Returns: object
get_capture_summaryB
Return metadata and warnings for an open capture session.
Inputs: capture_id (required). Returns: object
get_constant_bufferC
Read decoded variables and a bounded raw-byte page for one constant-buffer group.
Inputs: stage (required), event_id (required), capture_id (required), block_index (required), +3 more. Returns: object
get_eventC
Get draw, dispatch, copy, marker, or present details for one event ID.
Inputs: event_id (required), capture_id (required). Returns: object
get_pipeline_stateC
Read common pipeline state or one API-specific top-level state section.
Inputs: event_id (required), capture_id (required), section. Returns: object
get_shaderC
Read a bound shader's reflection, disassembly, source, or raw bytes in pages.
Inputs: stage (required), event_id (required), capture_id (required), cursor, +4 more. Returns: object
get_vertex_dataC
Page through every vertex/instance input and decoded attribute, including UVs.
Inputs: event_id (required), capture_id (required), limit, cursor. Returns: object
healthA
Check gateway limits and whether the configured replay backend is available.
Inputs: no named parameters. Returns: object
inspect_eventC
Inspect selected pipeline sections for an event in one serialized replay call.
Inputs: event_id (required), capture_id (required), include. Returns: object
launch_programC
Launch and inject an allow-listed .exe through qrenderdoc/RenderDoc.
Inputs: executable (required), arguments, api_validation, working_directory, +1 more. Returns: object
list_actionsC
List capture actions with filtering and bounded cursor pagination.
Inputs: capture_id (required), kind, limit, query, +3 more. Returns: object
list_constant_buffersC
List every shader-stage/block/array constant-buffer group with pagination.
Inputs: event_id (required), capture_id (required), limit, cursor. Returns: object
open_captureB
Open one allow-listed .rdc file and return a stable capture_id.
Inputs: path (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Most tools have clearly distinct purposes across lifecycle, metadata, and inspection. However, get_event, inspect_event, and get_pipeline_state all operate on event IDs and pipeline data, creating some boundary overlap that could cause misselection in an agent.
Nearly all tools follow a clean snake_case verb_noun pattern (open_capture, get_event, list_actions, get_constant_buffer). The lone 'health' deviates as a bare noun, but it is a widely recognized convention so the impact is minor.
13 tools is well-scoped for a graphics debugging/replay server, with each tool earning its place across session lifecycle, event inspection, and pipeline/shader data retrieval. No redundancy or bloat.
Covers the core lifecycle (launch, open, close) plus rich inspection of actions, events, pipeline state, shaders, vertex data, and constant buffers. Minor gaps exist for resource/texture inspection or capture export, but core workflows are well covered.
Maintenance
Related MCP Connectors
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Savecraft serves real save game data and expert game knowledge to AI assistants.
Query your team's AI coding history and act on HypAware recommendations from any MCP client.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to analyze RenderDoc GPU frame captures for graphics debugging and performance analysis through a headless Python API. It provides a comprehensive suite of tools for inspecting pipeline states, shader bindings, and exporting frame resources like textures and meshes.183-
- AlicenseAqualityNot gradedmaintenanceEnables AI assistants to analyze and inspect RenderDoc capture files, providing tools to examine draw calls, textures, buffers, and shader information. It allows developers to perform graphics debugging and resource analysis through natural language interactions.12MIT
- AlicenseNot gradedqualityDmaintenanceExposes RenderDoc capture analysis to AI clients via MCP, enabling offline analysis of .rdc files (action tree, pipeline state, textures, shaders) and GUI state interaction on Windows.2MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to access RenderDoc capture data and assist in graphics debugging via a file-based IPC bridge.15520MIT