by 8beeeaaat
Enables AI agents to programmatically control TouchDesigner projects via a Model Context Protocol server, allowing creation, modification, deletion, and querying of nodes through Python scripts.
A server that bridges AI models and TouchDesigner’s WebServer DAT, providing a set of tools and prompts so agents can manipulate TouchDesigner projects – creating nodes, updating parameters, executing Python code, and retrieving project information.
touchdesigner-mcp-td.zip
(TouchDesigner components) and touchdesigner-mcp.dxt
(Desktop Extension) from the GitHub releases page.mcp_webserver_base.tox
in the TouchDesigner project at /project1/mcp_webserver_base
while preserving the original directory structure (td/modules/…
).touchdesigner-mcp.dxt
to add the Claude Desktop extension, which automatically connects to the MCP server.npx
to run the server (npx -y touchdesigner-mcp-server@latest --stdio
) or spin up the Docker image via make build
and docker-compose up -d
.create_td_node
, delete_td_node
, update_td_node_parameters
.exec_node_method
, execute_python_script
.get_td_info
, get_td_nodes
, get_td_node_parameters
, get_td_classes
, get_td_class_details
.npx
CLI, Docker container.Q: Do I need to keep the original folder layout?
A: Yes. The .tox
component references relative paths to modules/
; moving files will cause import failures.
Q: Can I change the host or port?
A: Yes. When using npx
or Docker, add --host=<URL>
and --port=<NUMBER>
to the argument list.
Q: Is a Python environment required inside TouchDesigner? A: TouchDesigner ships with its own Python interpreter; the provided modules run within that environment.
Q: How do I update the server after code changes?
A: Re‑run the build (npm run build
or make build
) and restart both the MCP server and TouchDesigner.
Q: Which AI platforms are supported? A: Any platform that can call an MCP server – examples include Claude Desktop, OpenAI assistants, or custom agents using the generated TypeScript client.
This is an implementation of an MCP (Model Context Protocol) server for TouchDesigner. Its goal is to enable AI agents to control and operate TouchDesigner projects.
TouchDesigner MCP acts as a bridge between AI models and the TouchDesigner WebServer DAT, enabling AI agents to:
Download the following from the releases page:
touchdesigner-mcp-td.zip
touchdesigner-mcp.dxt
touchdesigner-mcp-td.zip
.mcp_webserver_base.tox
into your TouchDesigner project./project1/mcp_webserver_base
.https://github.com/user-attachments/assets/215fb343-6ed8-421c-b948-2f45fb819ff4
You can check the startup logs by opening the Textport from the TouchDesigner menu.
Double-click the touchdesigner-mcp.dxt
file to install the extension in Claude Desktop.
https://github.com/user-attachments/assets/0786d244-8b82-4387-bbe4-9da048212854
The extension will automatically handle the connection to the TouchDesigner server.
⚠️ Important: The directory structure must be preserved exactly as extracted. The mcp_webserver_base.tox
component references relative paths to the modules/
directory and other files.
Requires Node.js to be installed.
touchdesigner-mcp-td.zip
(releases page).mcp_webserver_base.tox
into your TouchDesigner project./project1/mcp_webserver_base
.https://github.com/user-attachments/assets/215fb343-6ed8-421c-b948-2f45fb819ff4
You can check the startup logs by opening the Textport from the TouchDesigner menu.
Example for Claude Desktop:
{
"mcpServers": {
"touchdesigner": {
"command": "npx",
"args": ["-y", "touchdesigner-mcp-server@latest", "--stdio"]
}
}
}
Customization: You can customize the TouchDesigner server connection by adding --host
and --port
arguments:
"args": [
"-y",
"touchdesigner-mcp-server@latest",
"--stdio",
"--host=http://custom_host",
"--port=9982"
]
git clone https://github.com/8beeeaaat/touchdesigner-mcp.git
cd touchdesigner-mcp
make build
Start TouchDesigner and import the td/mcp_webserver_base.tox
component into the project you want to control.
Example: Place it at /project1/mcp_webserver_base
.
Importing the .tox
file will trigger the td/import_modules.py
script, which loads the necessary modules for the API server.
https://github.com/user-attachments/assets/215fb343-6ed8-421c-b948-2f45fb819ff4
You can check the startup logs by opening the Textport from the TouchDesigner menu.
docker-compose up -d
Example for Claude Desktop:
{
"mcpServers": {
"touchdesigner": {
"command": "docker",
"args": [
"compose",
"-f",
"/path/to/your/touchdesigner-mcp/docker-compose.yml",
"exec",
"-i",
"touchdesigner-mcp-server",
"node",
"dist/cli.js",
"--stdio",
"--host=http://host.docker.internal"
]
}
}
}
On Windows systems, include the drive letter, e.g., C:\path\to\your\touchdesigner-mcp\docker-compose.yml
.
Note: You can customize the TouchDesigner server connection by adding --host
and --port
arguments:
"args": [
...,
"--stdio",
"--host=http://host.docker.internal",
"--port=9982"
]
If the MCP server is recognized, the setup is complete. If it's not recognized, try restarting your AI agent. If you see an error at startup, try launching the agent again after starting TouchDesigner. When the API server is running properly in TouchDesigner, the agent can use the provided tools to operate it.
Critical: When using any method, you must maintain the original directory structure:
td/
├── import_modules.py # Module loader script
├── mcp_webserver_base.tox # Main TouchDesigner component
└── modules/ # Python modules directory
├── mcp/ # MCP core logic
├── utils/ # Shared utilities
└── td_server/ # Generated API server code
The mcp_webserver_base.tox
component uses relative paths to locate Python modules. Moving or reorganizing these files will cause import errors in TouchDesigner.
This server enables AI agents to perform operations in TouchDesigner using the Model Context Protocol (MCP).
Tools allow AI agents to perform actions in TouchDesigner.
Tool Name | Description |
---|---|
create_td_node |
Creates a new node. |
delete_td_node |
Deletes an existing node. |
exec_node_method |
Calls a Python method on a node. |
execute_python_script |
Executes an arbitrary Python script in TouchDesigner. |
get_td_class_details |
Gets details of a TouchDesigner Python class or module. |
get_td_classes |
Gets a list of TouchDesigner Python classes. |
get_td_info |
Gets information about the TouchDesigner server environment. |
get_td_node_parameters |
Gets the parameters of a specific node. |
get_td_nodes |
Gets nodes under a parent path, with optional filtering. |
update_td_node_parameters |
Updates the parameters of a specific node. |
Prompts provide instructions for AI agents to perform specific actions in TouchDesigner.
Prompt Name | Description |
---|---|
Search node |
Fuzzy searches for nodes and retrieves information based on name, family, or type. |
Node connection |
Provides instructions to connect nodes within TouchDesigner. |
Check node errors |
Checks for errors on a specified node, and recursively for its children. |
Not implemented.
Set up your environment:
# Clone and install dependencies
git clone https://github.com/8beeeaaat/touchdesigner-mcp.git
cd touchdesigner-mcp
npm install
Build the project:
make build # Docker-based build (recommended)
# OR
npm run build # Node.js-based build
Available commands:
npm run test # Run unit and integration tests
npm run dev # Launch the MCP inspector for debugging
Note: When you update the code, you must restart both the MCP server and TouchDesigner to apply the changes.
├── src/ # MCP server source code
│ ├── api/ # OpenAPI spec for the TouchDesigner WebServer
│ ├── core/ # Core utilities (logger, error handling)
│ ├── features/ # MCP feature implementations
│ │ ├── prompts/ # Prompt handlers
│ │ ├── resources/ # Resource handlers
│ │ └── tools/ # Tool handlers (e.g., tdTools.ts)
│ ├── gen/ # Code generated from the OpenAPI schema for the MCP server
│ ├── server/ # MCP server logic (connections, main server class)
│ ├── tdClient/ # TouchDesigner connection API client
│ ├── index.ts # Main entry point for the Node.js server
│ └── ...
├── td/ # TouchDesigner-related files
│ ├── modules/ # Python modules for TouchDesigner
│ │ ├── mcp/ # Core logic for handling MCP requests in TouchDesigner
│ │ │ ├── controllers/ # API request controllers (api_controller.py, generated_handlers.py)
│ │ │ └── services/ # Business logic (api_service.py)
│ │ ├── td_server/ # Python model code generated from the OpenAPI schema
│ │ └── utils/ # Shared Python utilities
│ ├── templates/ # Mustache templates for Python code generation
│ ├── genHandlers.js # Node.js script for generating generated_handlers.py
│ ├── import_modules.py # Helper script to import API server modules into TouchDesigner
│ └── mcp_webserver_base.tox # Main TouchDesigner component
├── tests/ # Test code
│ ├── integration/
│ └── unit/
└── orval.config.ts # Orval config (TypeScript client generation)
This project uses OpenAPI-based code generation tools (Orval and openapi-generator-cli).
API Definition: The API contract between the Node.js MCP server and the Python server running inside TouchDesigner is defined in src/api/index.yml
.
npm run gen:webserver
):
openapi-generator-cli
via Docker.src/api/index.yml
.td/modules/td_server/
) based on the API definition. This code runs inside TouchDesigner's WebServer DAT.npm run gen:handlers
):
td/genHandlers.js
) and Mustache templates (td/templates/
).td/modules/mcp/controllers/generated_handlers.py
) that connect to the business logic in td/modules/mcp/services/api_service.py
.npm run gen:mcp
):
Orval
to generate an API client and Zod schemas for tool validation from the schema YAML, which is bundled by openapi-generator-cli
.src/tdClient/
) used by the Node.js server to make requests to the WebServer DAT.The build process (npm run build
) runs all necessary generation steps (npm run gen
), followed by TypeScript compilation (tsc
).
We welcome your contributions!
git checkout -b feature/amazing-feature
).npm test
).git commit -m 'Add some amazing feature'
).git push origin feature/amazing-feature
).Please always include appropriate tests when making implementation changes.
MIT
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "touchdesigner": { "command": "npx", "args": [ "-y", "touchdesigner-mcp-server@latest", "--stdio" ] } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.