touchdesigner network protocol bridging via mcp
Implements the Model Context Protocol (MCP) as a server that translates MCP client requests into TouchDesigner network commands, enabling LLM agents and tools to communicate with TouchDesigner instances over the network. Uses MCP's standardized resource and tool schemas to expose TouchDesigner capabilities as callable functions, with request/response serialization handling the protocol translation layer between MCP clients and TouchDesigner's native network API.
Unique: Bridges MCP (a standardized LLM tool protocol) directly to TouchDesigner's network API, allowing any MCP client to control TouchDesigner without custom integration code. Uses MCP's resource and tool schemas to abstract TouchDesigner's command structure into callable functions.
vs alternatives: Provides standardized MCP interface to TouchDesigner instead of requiring custom WebSocket or OSC implementations, making it compatible with any MCP-aware LLM client (Claude, custom agents) out of the box
mcp resource discovery and schema exposition
Exposes TouchDesigner parameters, operators, and available commands as MCP resources with JSON schema definitions, allowing MCP clients to discover what can be controlled and what data types are expected. Implements MCP's resource listing and schema introspection endpoints so clients can query available operations before making calls, enabling intelligent prompt generation and parameter validation.
Unique: Implements MCP's resource and schema endpoints to provide full introspection of TouchDesigner's controllable surface, enabling clients to discover and validate operations dynamically rather than relying on hardcoded knowledge.
vs alternatives: Provides machine-readable schema discovery unlike REST APIs that require manual documentation reading, allowing LLM agents to understand available operations without prompt engineering
parameter read/write with type coercion
Handles reading and writing TouchDesigner parameters through the network protocol with automatic type conversion between MCP's JSON types and TouchDesigner's native types (float, int, string, bool, vector). Implements validation logic to ensure values conform to parameter constraints (min/max ranges, enum values) before sending to TouchDesigner, with error handling for type mismatches and out-of-range values.
Unique: Implements bidirectional parameter synchronization with automatic type coercion and constraint validation, ensuring type safety between JSON-based MCP protocol and TouchDesigner's strongly-typed parameter system.
vs alternatives: Handles type conversion and validation transparently, unlike raw network APIs that require manual type handling and constraint checking in client code
operator execution and state querying
Enables calling TouchDesigner operators (CHOP, SOP, TOP, DAT) as MCP tools, with support for passing inputs and retrieving outputs. Implements operator invocation through TouchDesigner's network protocol, handling asynchronous execution and state polling to retrieve results. Supports querying operator state (enabled/disabled, current output values) to enable agents to understand the current scene state.
Unique: Wraps TouchDesigner operator execution as MCP tools with asynchronous result retrieval, allowing agents to trigger complex computations and query results without blocking, enabling sophisticated automation workflows.
vs alternatives: Provides operator-level abstraction over raw network commands, enabling agents to work with TouchDesigner's computational graph directly rather than managing low-level parameter changes
network command batching and transaction support
Groups multiple parameter changes or operator calls into a single network transaction, reducing round-trip latency and ensuring atomic updates. Implements command buffering and batch sending through TouchDesigner's network protocol, with rollback support if any command in the batch fails. Enables agents to perform coordinated multi-step updates (e.g., change position, rotation, and scale simultaneously) with guaranteed consistency.
Unique: Implements transaction-style batching for TouchDesigner network commands, providing atomic multi-command updates with rollback semantics, unlike individual parameter writes that may leave intermediate inconsistent states.
vs alternatives: Reduces latency and improves reliability for coordinated updates compared to sequential individual commands, critical for real-time control scenarios
error handling and connection resilience
Implements retry logic, connection pooling, and graceful degradation for network failures between MCP server and TouchDesigner. Detects connection loss, automatically attempts reconnection with exponential backoff, and queues commands during disconnection for replay when connection restores. Provides detailed error messages distinguishing between network errors, TouchDesigner errors, and validation errors to enable intelligent error recovery in agents.
Unique: Implements connection pooling with automatic reconnection and command queuing for transient failures, providing resilience for network-based control that simple request/response patterns don't offer.
vs alternatives: Survives temporary network interruptions and provides intelligent retry semantics, unlike stateless REST APIs that fail immediately on connection loss
logging and execution tracing for audit trails
Records all MCP tool calls, parameter changes, and operator executions with timestamps and execution results, enabling audit trails and debugging. Implements structured logging with configurable verbosity levels and optional integration with external logging systems (e.g., JSON logging to files or services). Provides execution traces showing command sequence, timing, and results to help agents understand what happened and diagnose failures.
Unique: Provides structured execution logging with timing and result tracking for all MCP operations, enabling full audit trails and debugging of agent-TouchDesigner interactions.
vs alternatives: Offers visibility into agent behavior and TouchDesigner state changes that would otherwise be invisible, critical for debugging and compliance