touchdesigner-agent-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., "@touchdesigner-agent-mcp create a circle TOP and connect it to a render TOP"
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.
ποΈ touchdesigner-agent-mcp
A premium, open-source Model Context Protocol (MCP) server that empowers LLMs (like Claude) to directly control, introspect, and build TouchDesigner networks in real-time.
With this server, an AI coding agent can create and connect operators, query parameters, capture the viewport to see what it built, automatically fix compile errors, and stream real-time data from TouchDesigner CHOPs.
ποΈ Architecture
This repository uses a zero-dependency, dual-process architecture:
βββββββββββββββββββββββββββββββββββ
β Claude / MCP Host β
ββββββββββββββββββ¬βββββββββββββββββ
β
β MCP (stdio)
βΌ
βββββββββββββββββββββββββββββββββββ
β touchdesigner-agent-mcp (Python Client) β
ββββββββββββββββββ¬βββββββββββββββββ
β
β HTTP (POST /mcp)
βΌ
βββββββββββββββββββββββββββββββββββ
β TouchDesigner Web Server DAT β (Installed via td/install.py)
ββββββββββββββββββ¬βββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββ
β TouchDesigner Operators β
βββββββββββββββββββββββββββββββββββThe TouchDesigner side is built completely in plain Python (exposed via a Web Server DAT), meaning no binary .tox files or opaque components. You can read, audit, and diff every single line of code running in your project.
Related MCP server: touch-mcp
β¨ Features
π Dual-Directional Integration
25 Tools: Full CRUD for nodes, wiring, force-cooking, viewport rendering, and GLSL editing.
4 Prompt Templates: Guiding instructions that teach LLMs the best tool combinations for node finding, error handling, operator connections, and network repairs.
4 Resource Templates: Native MCP
td://resources that let the LLM stream live data from CHOP channels, node parameters, and project metadata.
π‘οΈ Undo Safety (Ctrl+Z)
Every single tool invocation that mutates TouchDesigner is automatically wrapped in a transaction block (ui.undo). If the agent makes a mistake, deletes a critical node, or wires something incorrectly, you can instantly revert it by pressing Ctrl+Z inside TouchDesigner.
β‘ Progress Tracking
Long-running operations (like scene scaffolding, viewport captures, and force-cooking) report real-time progress to the MCP client via the report_progress API, showing you exactly what the server is doing.
π Zero-Config Security
On first installation, the installer auto-generates a secure, random Auth Token (secrets.token_urlsafe(32)) and binds it to the component. The token is preserved across reinstalls, keeping your TouchDesigner instance secure from unauthorized remote code execution (RCE).
ποΈ Tool Matrix
Category | Tools | Description |
System Info |
| Inspect TouchDesigner build, OS, and available tool schemas. |
Node CRUD |
| Create, read, update, and delete operators. |
Parameters & Errors |
| Read parameters, query errors, or trigger pulses/methods. |
Python RCE |
| Run arbitrary Python scripts directly inside the TouchDesigner execution context. |
Introspection |
| Let the LLM search TouchDesigner's Python API, docs, and help pages. |
Visual Vision |
| Captures any TOP/COMP or the active network pane as an image (Base64 or file path). |
Scene Scaffold |
| Scaffold complete pipelines (Feedback Loop, Instancing, Render Setup) in one click. |
Advanced Wiring |
| Family-validated operator wiring and automatic positioning without node overlaps. |
GLSL & Files |
| Author GLSL shaders, import/export |
Media Assets |
| Scan local project directories for video, audio, images, and geometry assets. |
π‘ Resources
MCP Clients can read or subscribe to real-time resources using the td:// URI scheme:
URI Template | Resource Type | Description |
| Dynamic CHOP Stream | Streams active float values for all channels in the target CHOP (e.g. |
| Node Parameters | Lightweight read endpoint for parameters and operator metadata. |
| Error State | Inspects compilation or wiring errors for the target node and its children. |
| Static Project Info | Metadata including project name, folder path, and the TouchDesigner app build. |
π Quick Start
1. Set Up TouchDesigner Side
Copy the
td/folder somewhere stable on your disk.In TouchDesigner, open the Textport (
Alt+T) and run the installer:import sys sys.path.append('/ABSOLUTE/PATH/TO/td') import install install.install()This creates
/project1/td_agent_mcpwith a Web Server DAT running on port9981.Note the secure Auth Token printed in the Textportβyou will need this for step 3.
If you make changes to the scripts in thetd/ directory, you can reload and reinstall them instantly using:
import importlib; importlib.reload(install); install.install()
2. Install the MCP Server
Build and run the server using uv (recommended):
# To run locally
uv sync
uv run touchdesigner-agent-mcp --stdio3. Register the Server with Your Client
Claude Desktop
Add the server configuration to your claude_desktop_config.json:
{
"mcpServers": {
"touchdesigner-agent-mcp": {
"command": "uv",
"args": [
"run",
"--directory",
"/ABSOLUTE/PATH/TO/touchdesigner-agent-mcp",
"touchdesigner-agent-mcp",
"--stdio"
],
"env": {
"TD_AUTH_TOKEN": "YOUR_AUTO_GENERATED_TOKEN_HERE"
}
}
}
}Claude Code (CLI)
Install the bundled marketplace plugin:
/plugin marketplace add axysar/touchdesigner-agent-mcpβοΈ Configuration Reference
You can configure the client using environment variables or command-line flags:
Environment Variable | CLI Flag | Default | Description |
|
|
| The hostname/IP of the machine running TouchDesigner. |
|
|
| The port of the Web Server DAT. |
|
| (empty) | Security token matching the |
|
|
| Request timeout in seconds. |
π Security Hardening
Because the server allows arbitrary Python execution inside TouchDesigner (giving the LLM full RCE capabilities on your local system), security is critical:
Token Auth: All incoming HTTP requests require a valid
Authorization: Bearer <token>header.Auto-Generation: If a token isn't manually specified, the installer automatically generates a cryptographically secure 32-character token.
CORS Protection: The TouchDesigner Web Server DAT strictly rejects requests from arbitrary browser origins.
Traversals: Asset scanning is restricted to a maximum depth of
5levels to prevent system performance issues or directory leaks.
π οΈ Development & Contributing
See CLAUDE.md for quick-start development guidelines.
Running Tests
To run registration, schema validation, and resource-binding checks without requiring TouchDesigner to be active:
uv run pytestCode Style
We use ruff to enforce linting and formatting standards:
uv run ruff check .
uv run ruff format .π License & Attribution
This project is licensed under the MIT License β see LICENSE.
It synthesizes and extends two outstanding prior open-source works:
@8beeeaaat/touchdesigner-mcp (Dual-process structure and baseline CRUD operations).
@satoruhiga/claude-touchdesigner (TouchDesigner helper libraries).
TouchDesigner is a registered trademark of Derivative.
Available Tools
25 toolscreate_td_nodeA
Create a new operator under a parent.
Returns the created node summary. TD auto-increments the name on
collision, so check the returned name/path.
Inputs: parent (required), node_type (required), node_name, parameters, +1 more. Returns: result
delete_td_nodeADestructiveIdempotent
Delete an operator by path.
Destructive and not undoable through this tool. Returns
{deleted: true, node: {...}} on success.
Inputs: path (required), response_format. Returns: result
describe_td_toolsARead-onlyIdempotent
List the tools this server exposes, with names, descriptions, and schemas.
A manifest for code-execution agents that want to discover the available
TouchDesigner tool surface. Introspected locally; does not contact
TouchDesigner. Returns {count, tools: [{name, description, [inputSchema, annotations]}]}.
Inputs: filter, detail_level, response_format. Returns: result
exec_node_methodADestructive
Call a method on an operator (e.g. cook, pulse, reset).
Returns {result: <serialized return value>}. Use for operator
actions that are not parameter writes.
Inputs: path (required), method (required), args, kwargs, +1 more. Returns: result
execute_python_scriptADestructive
Execute a Python script in TouchDesigner's interpreter and capture output.
Runs with the TouchDesigner API in scope plus the bundled tdapi
helpers. Returns {result, stdout, stderr}.
This runs arbitrary, un-sandboxed code in the user's TouchDesigner process β prefer the dedicated node tools for routine edits; use this for logic the other tools do not cover.
Inputs: script (required), response_format. Returns: result
get_td_class_detailsARead-onlyIdempotent
Get methods, properties, and docstrings for a TouchDesigner class.
Returns {name, type, description, methods, properties}.
Inputs: class_name (required), response_format. Returns: result
get_td_classesARead-onlyIdempotent
List the Python classes and modules available in the td module.
Returns {classes: [{name, description}]}. Pair with
get_td_class_details to drill in.
Inputs: response_format. Returns: result
get_td_infoARead-onlyIdempotent
Get TouchDesigner build, version, OS, and the touchdesigner-agent-mcp API version.
Use this first to confirm connectivity to TouchDesigner. Returns
{server, version, osName, osVersion, mcpApiVersion}.
Inputs: response_format. Returns: result
get_td_module_helpARead-onlyIdempotent
Capture Python help() output for a TouchDesigner module or class.
Returns {moduleName, helpText} with terminal control codes stripped.
Inputs: module_name (required), response_format. Returns: result
get_td_node_errorsARead-onlyIdempotent
Collect error messages for an operator and its descendants.
Returns {nodePath, nodeName, opType, errorCount, hasErrors, errors}.
TD updates its error cache on frame boundaries β prefer checking errors
in a request separate from the mutation that may have caused them.
Inputs: path (required), response_format. Returns: result
get_td_node_parametersARead-onlyIdempotent
Get an operator's parameters and current values.
Call this before updating parameters β TD names rarely match labels.
Returns {id, name, path, opType, properties}.
Inputs: path (required), response_format. Returns: result
get_td_nodesARead-onlyIdempotent
List child operators under a path, optionally filtered by a name pattern.
Returns {nodes: [{id, name, path, opType, properties}]}. Set
include_properties=true only when you need values β the light
default is faster for large networks.
Inputs: parent, pattern, response_format, include_properties. Returns: result
td_connectAIdempotent
Wire one operator's outlet to another's inlet, validating compatibility.
TouchDesigner only connects same-family operators via connectors; a cross-family attempt (e.g. TOP -> SOP) returns a descriptive error rather than failing silently.
Inputs: to_path (required), from_path (required), to_inlet, from_outlet, +1 more. Returns: result
td_cookAIdempotent
Force-cook an operator (and optionally its descendants).
TouchDesigner does not always re-cook operators inside a nested
baseCOMP referenced indirectly, so a stale buffer can make a correct
edit look broken. Call this on the parent COMP whenever results look
stale before debugging anything else. Returns {cooked, totalCookTimeMs, errors}.
Inputs: path (required), recurse, response_format. Returns: result
td_glslAIdempotent
Read or write a GLSL shader stage, resolving the correct docked DAT.
A GLSL TOP keeps its source in _pixel_shader / _vertex_shader
DATs docked to the parent β never guess that DAT's name or set .text
on it directly. Omit code to read; pass code to write (set
return_compiled=true to re-cook and surface compile errors). Returns
{stage, docked_dat_path, code, errors}.
Inputs: path (required), code, stage, response_format, +1 more. Returns: result
td_layoutA
Layout intelligence: find an empty area, test overlap, or chain operators.
find_empty_area(needsbase): returns{x, y}for a non-overlappingwidthxheightblock.check_overlap(needspath): returns{overlaps: bool}.chain(needsops): connects operators in order, laid out left-to-right withspacing.
Inputs: action (required), ops, base, path, +7 more. Returns: result
td_list_media_assetsARead-onlyIdempotent
Scan a directory for usable TouchDesigner media files (video, audio, images, geometry).
Returns a list of relative file paths that can be loaded into moviefileinTOP, fileinSOP, audiofileinCHOP, etc.
Inputs: folder. Returns: result
td_load_toxADestructive
Load an external .tox file into a target Component (COMP).
Inputs: base (required), filepath (required). Returns: result
td_paneARead-onlyIdempotent
Return the current network-editor pane: path, pan, zoom, viewport size.
Use this to learn where the user is looking before editing there.
Returns {path, tx, ty, zoom, viewportSize} (or {pane: null}).
Inputs: response_format. Returns: result
td_save_projectA
Save the TouchDesigner project (.toe). Use this to checkpoint your work.
Inputs: filepath. Returns: result
td_save_toxB
Save a Component (COMP) operator to an external .tox file.
Inputs: path (required), filepath (required). Returns: result
td_scaffoldA
Create a complete, pre-wired network from a template.
Prefer this over hand-wiring common setups: each template handles
creation, connector compatibility, naming, layout, and the first
force-cook. Returns {template, createdOps, wiring, entryPoint, description}.
Inputs: template (required), base, name_prefix, response_format. Returns: result
td_selectionARead-onlyIdempotent
Return operators currently selected in the active pane.
Returns {count, ops: [{path, name, type, opType, family, x, y}]}.
Inputs: response_format. Returns: result
td_viewportARead-only
Capture a TOP/COMP viewer or the network editor pane as an image.
Use this to actually see the result of edits instead of guessing.
target is a TOP/COMP path, or 'pane' for the current network editor.
Small inline captures are returned as a viewable image; large captures
(or return_as='path') return a temp-file path string.
Inputs: target (required), width, format, height, +2 more.
update_td_node_parametersAIdempotent
Set parameter values on an operator.
Returns {path, updated, failed: [{name, reason}], message}. Unknown
names go to failed rather than raising β everything in failed
means the names were wrong.
Inputs: path (required), parameters (required), response_format. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 25 tools
Each tool targets a distinct operation (e.g., create vs. delete node, connect vs. layout, viewport capture vs. pane info). Overlap is minimal and well-explained in descriptions.
Tools follow a consistent verb_noun pattern with 'td_' prefix for common actions and 'get_td_' for queries. Exceptions like 'exec_node_method' and 'describe_td_tools' are still clear and fit the pattern.
25 tools is on the higher end but justified by the breadth of TouchDesigner capabilities covered. No tool seems superfluous, though a few could potentially be combined (e.g., get_td_classes and get_td_class_details).
Covers the full lifecycle: create, read, update, delete nodes; parameter management; connections; cooking; layout; file I/O; scripting; and inspection. Gaps are minor (e.g., timeline control) but not essential for core automation.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoβ¦
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal Eβ¦
A Model Context Protocol server for Wix AI tools
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Related MCP Servers
- AlicenseBqualityAmaintenanceA Model Context Protocol server that enables AI agents to control and operate TouchDesigner projects through creation, modification, and querying of nodes and project structures.144,246 npm613MIT
- AlicenseNot gradedqualityDmaintenanceHigh-performance MCP server that enables AI assistants to control TouchDesigner live via WebSocket, providing 37 tools for nodes, parameters, scripting, and more.5MIT
- AlicenseAqualityDmaintenanceMCP server for controlling TouchDesigner from AI coding agents like Claude Code and Codex CLI, enabling operator manipulation, parameter control, and screenshot capture.1214 PyPIMIT
- AlicenseBqualityCmaintenanceAn MCP server for TouchDesigner that lets AI agents inspect, build, wire, optimize, and stabilize live TD networks with 106 tools, plus a technique memory system for reusable patterns.10016MIT