TDPilot Runtime v2.6.2
Work on a running TouchDesigner project from Codex, Claude, or another MCP client.

TD-MCP is a community fork of dreamrec/TDPilot. It pairs a Python MCP server with a TouchDesigner component, so an agent can inspect a live network, apply an undoable change, and verify the actual render inside TouchDesigner. The bridge runs locally. Your MCP client controls what it sends to its model provider.
- Inspect nodes, connections, parameter values, cook times, and errors.
- Build with grounded plans and transactions that check the result and verify rollback when a change fails.
- Debug with live operator events, scoped error scans, and frame captures.
- Verify a visual with pixels, parameter readback, and playback before saving it.
flowchart LR
Client["Codex / other MCP client"] <-->|MCP over stdio| Server["TDPilot Python server"]
Server -->|HTTP :9981| TD["tdpilot.tox in TouchDesigner"]
TD -->|WebSocket events :9982| Server
Quick start
You need TouchDesigner, Git, uv, and an MCP client. The Python runtime requires 3.11 or later. The checked-in component is built on Windows with TouchDesigner 2025.32820.
git clone https://github.com/Marwanelh/TD-MCP.git
Set-Location TD-MCP
uv sync --locked
-
Open a scratch TouchDesigner project and drag td_component/tdpilot.tox into the network. Keep one active bridge per HTTP port.
-
In PowerShell, register the server from the checkout. This uses an absolute path and works with spaces in the folder name.
$tdMcpRepo = (Get-Location).Path
codex mcp add touchdesigner --env TD_MCP_HOST=127.0.0.1 --env TD_MCP_PORT=9981 --env TD_MCP_WS_PORT=9982 --env TD_MCP_REQUIRE_AUTH=1 --env TD_MCP_AUTOGENERATE_SECRET=1 --env TD_MCP_EXEC_MODE=restricted -- uv run --locked --directory "$tdMcpRepo" python -m td_mcp
-
Reconnect Codex and ask “What project is open in TouchDesigner? List the nodes and check errors under /project1.” Start with a read-only request to verify the target before making edits.
If the name touchdesigner is already registered, use a separate name or update the existing entry. For Claude, Cursor, and other MCP clients, see the client setup guide. Its npm and plugin shortcuts install the upstream distribution. Use this checkout's server and component together when evaluating TD-MCP changes.
Verify the connection
Run this from the checkout with the same host, ports, and authentication settings as the client:
uv run --locked python -m td_mcp doctor
uv run --locked python scripts/probe_mcp_stdio.py --path /project1
The second command performs a real MCP handshake, checks the loaded bridge version, and scans the network you specify. The authentication secret is shared via the local TDPilot environment file. Keep that file private. See security and execution modes.
Keep authentication enabled, especially on TD builds before 2025.33070. Their Web Server DAT has no Local Address control. A client pointed at 127.0.0.1 can still be talking to a DAT that listens on every interface.
A practical build loop
- Ask the agent to inspect the target network and identify the intended output.
- Build in a dedicated Base COMP outside the serving bridge, with a stable output such as a Null TOP. Use transactional edits so a failed change can roll back.
- Play a few frames and check errors, parameter readback, and the image itself. Save after the output matches the request.
For live error events, play the timeline, subscribe to the operator with td_subscribe and event type node_error, then read the event with td_get_events. Use td_get_errors for an on-demand scan when the timeline is paused.
First project — Blob Collage. The initial end-to-end build used Blob Track TOP and Info DAT for tracked bounds and IDs, then a Script TOP to composite lime-outlined color crops over a grayscale negative. It gave us an actual moving network to test plan application, error handling, frame capture, and portable component export.
Troubleshooting