TouchDesigner MCP
タッチデザイナーMCP
これはTouchDesigner用のMCP(Model Context Protocol)サーバーの実装です。AIエージェントがTouchDesignerプロジェクトを制御・操作できるようにすることを目的としています。
概要

TouchDesigner MCP は、AI モデルと TouchDesigner WebServer DAT 間のブリッジとして機能し、AI エージェントが次のことを実行できるようにします。
ノードの作成、変更、削除
クエリノードのプロパティとプロジェクト構造
PythonスクリプトでTouchDesignerをプログラム的に制御する
Related MCP server: td-mcp
使用法
DockerまたはNode.jsのインストールが必要です

1. リポジトリをクローンします。
git clone https://github.com/8beeeaaat/touchdesigner-mcp.git
cd touchdesigner-mcp2. 環境ファイルを設定し、ビルドします。
Docker イメージをビルドする前に、テンプレート ファイルをコピーし、必要に応じて TD_WEB_SERVER_HOST と TD_WEB_SERVER_PORT を調整します。
cp dotenv .env
make build3. TouchDesigner プロジェクトに API サーバーをインストールします。
TouchDesignerを起動し、制御したいTouchDesignerプロジェクトの直下にtd/mcp_webserver_base.toxコンポーネントをインポートします。例: /project1/mcp_webserver_baseに配置します。
tox をインポートすると、API サーバー コントローラーなどのモジュールをロードするtd/import_modules.pyスクリプトがトリガーされます。

TouchDesigner メニューから Textport を開くと、ブート ログを確認できます。

4. MCPサーバーコンテナを起動する
docker-compose up -d5. Docker コンテナを使用するように AI エージェントを構成します。
Claude Desktopの例
{
"mcpServers": {
"touchdesigner": {
"command": "docker",
"args": [
"compose",
"-f",
"/path/to/your/touchdesigner-mcp/docker-compose.yml",
"exec",
"-i",
"touchdesigner-mcp-server",
"node",
"dist/index.js",
"--stdio"
]
}
}
}Windows システムでは、C: のようなドライブ文字を含めます (例C:\\path\\to\\your\\touchdesigner-mcp\\docker-compose.yml
Node.js から事前に構築された JS を直接使用するには:

1. パッケージをインストールする
mkdir some && cd ./some # If you need a new directory
npm install touchdesigner-mcp-server2. TouchDesigner プロジェクトに API サーバーをインストールします。
TouchDesignerを起動し、 some/node_modules/touchdesigner-mcp-server/td/mcp_webserver_base.toxコンポーネントを、制御したいTouchDesignerプロジェクトの直下にインポートします。例: /project1/mcp_webserver_baseに配置します。
tox をインポートするとsome/node_modules/touchdesigner-mcp-server/td/import_modules.pyスクリプトがトリガーされ、API サーバー コントローラーなどのモジュールが読み込まれます。

TouchDesigner メニューから Textport を開くと、ブート ログを確認できます。

3. AIエージェントを設定します。
Claude Desktopの例
{
"mcpServers": {
"touchdesigner": {
"args": [
"/path/to/your/node_modules/touchdesigner-mcp-server/dist/index.js", // <-- Replace with the absolute path to node_modules/touchdesigner-mcp-server/dist/index.js
"--stdio"
],
"command": "node"
}
}
}Windows システムでは、C: のようなドライブ文字を含めます (例: C:\\path\\to\\your\\node_modules\\touchdesigner-mcp-server\\dist\\index.js
3. 接続を確認する
MCPサーバーが認識されればセットアップは完了です。認識されない場合は、AIエージェントを再起動してください。起動時にエラーが表示される場合は、TouchDesignerを起動してからエージェントを再起動してください。TouchDesignerでAPIサーバーが正常に動作していれば、エージェントは提供されているツールを使用してTouchDesignerを操作できます。

MCP サーバーの機能
このサーバーは、モデル コンテキスト プロトコル (MCP) を介して TouchDesigner での操作を可能にし、さまざまな実装ドキュメントへの参照を提供します。
ツール
ツールを使用すると、AI エージェントは TouchDesigner でアクションを実行できます。
ツール名 | 説明 |
| 新しいノードを作成します。 |
| 既存のノードを削除します。 |
| ノード上で Python メソッドを呼び出します。 |
| TD で任意の Python スクリプトを実行します。 |
| TD Python クラス/モジュールの詳細を取得します。 |
| TouchDesigner Python クラスのリストを取得します。 |
| TD サーバー環境に関する情報を取得します。 |
| 特定のノードのパラメータを取得します。 |
| 親パスの下のノードを取得します (オプションでフィルタリング可能)。 |
| 特定のノードのパラメータを更新します。 |
プロンプト
プロンプトは、AI エージェントに TouchDesigner で特定のアクションを実行するための指示を提供します。
プロンプト名 | 説明 |
| ノードをあいまい検索し、名前、ファミリ、タイプに基づいて情報を取得します。 |
| TouchDesigner 内でノードを接続するための手順を提供します。 |
| 指定されたノードのエラーをチェックし、子ノードがある場合は再帰的にチェックします。 |
リソース
実装されていません
開発者向け
クライアントとAPIサーバーコードの構築
cp dotenv .env開発環境に合わせて、
.envファイルのTD_WEB_SERVER_HOSTとTD_WEB_SERVER_PORTを調整します。コードを再生成するには、
make buildまたはnpm run build実行します。
ビルドしたコードを反映する必要がある場合は、MCP サーバーと TouchDesigner の両方を再起動してください。
APIサーバーの検証
npm run testでMCPサーバーコードの単体テストとTouchDesignerとの統合テストを実行します。TouchDesignerメニューからTextportを開くと、通信ログを確認できます。npm run devさまざまな機能をデバッグするには、@modelcontextprotocol/inspector を起動します。
プロジェクト構造の概要
├── src/ # MCP server source code
│ ├── api/ # OpenAPI spec for TD 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 OpenAPI schema for MCP server
│ ├── server/ # MCP server logic (connections, main server class)
│ ├── tdClient/ # TD connection API client
│ ├── index.ts # Main entry point for Node.js server
│ └── ...
├── td/ # TouchDesigner related files
│ ├── modules/ # Python modules for TouchDesigner
│ │ ├── mcp/ # Core logic for handling MCP requests in TD
│ │ │ ├── controllers/ # API request controllers (api_controller.py, generated_handlers.py)
│ │ │ └── services/ # Business logic (api_service.py)
│ │ ├── td_server/ # Python model code generated from 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 TD
│ └── mcp_webserver_base.tox # Main TouchDesigner component
├── tests/ # Test code
│ ├── integration/
│ └── unit/
├── .env # Local environment variables (git ignored)
├── dotenv # Template for .env
└── orval.config.ts # Orval config (TS client generation)APIコード生成ワークフロー
このプロジェクトでは、OpenAPI ベースのコード生成ツール (Orval / openapi-generator-cli) を使用します。
API 定義: Node.js MCP サーバーと TouchDesigner 内で実行される Python サーバー間の API 契約はsrc/api/index.ymlで定義されます。
Python サーバー生成 (
npm run gen:webserver):Docker 経由で
openapi-generator-cliを使用します。src/api/index.ymlを読み取ります。API定義に基づいてPythonサーバーのスケルトン(
td/modules/td_server/)を生成します。このコードはWebServer DATを介してTouchDesigner内で実行されます。Docker がインストールされ、実行されている必要があります。
Python ハンドラー生成 (
npm run gen:handlers):カスタム Node.js スクリプト (
td/genHandlers.js) と Mustache テンプレート (td/templates/) を使用します。生成された Python サーバー コードまたは OpenAPI 仕様を読み取ります。
td/modules/mcp/services/api_service.py``td/modules/mcp/controllers/generated_handlers.py) を生成します。
TypeScript クライアントの生成 (
npm run gen:mcp):Orvalを使用して、openapi-generator-cliによってバンドルされたスキーマ YAML から、ツール検証用の API クライアント コードと Zod スキーマを生成します。Node.js サーバーが WebServer DAT にリクエストを行うために使用する、型指定された TypeScript クライアント (
src/tdClient/) を生成します。
ビルド プロセス ( npm run build ) では、必要なすべての生成ステップ ( npm run gen ) が実行され、その後に TypeScript コンパイル ( tsc ) が実行されます。
貢献
皆様のご協力をお待ちしております!
リポジトリをフォークする
機能ブランチを作成する (
git checkout -b feature/amazing-feature)変更を加える
テストを追加してすべてが機能することを確認する(
npm test)変更をコミットします (
git commit -m 'Add some amazing feature')ブランチにプッシュします (
git push origin feature/amazing-feature)プルリクエストを開く
実装を変更するときは、常に適切なテストを含めてください。
ライセンス
マサチューセッツ工科大学
Available Tools
14 toolscreate_td_nodeC
Create a new node in TouchDesigner
Inputs: nodeType (required), parentPath (required), nodeName, detailLevel, +1 more.
delete_td_nodeB
Delete an existing node in TouchDesigner
Inputs: nodePath (required), detailLevel, responseFormat.
describe_td_toolsB
Generate a filesystem-oriented manifest of available TouchDesigner tools
Inputs: filter, detailLevel, responseFormat.
exec_node_methodC
Execute a method on a specific node in TouchDesigner
Inputs: method (required), nodePath (required), args, kwargs, +2 more.
execute_python_scriptC
Execute a Python script in TouchDesigner (detailLevel=minimal|summary|detailed, responseFormat=json|yaml|markdown)
Inputs: script (required), detailLevel, responseFormat.
get_td_class_detailsB
Get information about a TouchDesigner class/module (detailLevel+limit supported)
Inputs: className (required), limit, detailLevel, responseFormat.
get_td_classesB
List TouchDesigner Python classes/modules (detailLevel+limit supported)
Inputs: limit, detailLevel, responseFormat.
get_td_infoC
Get server information from TouchDesigner
Inputs: detailLevel, responseFormat.
get_td_module_helpB
Retrieve Python help() text for a TouchDesigner module or class
Inputs: moduleName (required), detailLevel, responseFormat.
get_td_node_errorsA
Check errors and warnings on a node and its descendants. TouchDesigner reports missing files, dangling operator references and shader compile failures as warnings, so do not treat hasErrors=false as a healthy node. Reads the operator errors and warnings streams only: an exception raised inside a Script OP callback, a scriptCHOP onCook for example, lands on neither and is reported nowhere here, so an empty report is not evidence the node cooked
Inputs: nodePath (required), limit, detailLevel, responseFormat.
get_td_node_parametersB
Get node parameters with concise/detailed formatting (detailLevel+limit supported)
Inputs: nodePath (required), limit, detailLevel, responseFormat.
get_td_nodesB
List nodes under a path with token-optimized output (detailLevel+limit supported)
Inputs: parentPath (required), limit, pattern, detailLevel, +2 more.
get_top_imageA
Capture the current output of a TOP node as an image so it can be viewed directly (maxSize optionally downscales the longer side)
Inputs: nodePath (required), maxSize.
update_td_node_parametersC
Update parameters of a specific node in TouchDesigner
Inputs: nodePath (required), properties (required), detailLevel, responseFormat.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Each tool targets a distinct concern: server info, script execution, node listing/parameters/errors, CRUD, method execution, class/module introspection, image capture, and a tool manifest. get_td_class_details and get_td_module_help are the only close pair, but the descriptions clearly separate detailed info from raw help() text.
Most tools follow a get/create/update/delete/execute verb prefix, but the TD marker placement is inconsistent (get_td_nodes vs create_td_node vs exec_node_method), and names like get_top_image and describe_td_tools break the pattern. The naming is readable and mostly snake_case, but not fully systematic.
14 tools is well within the ideal range for a domain-specific server. Each tool earns its place by covering a meaningful part of the TouchDesigner workflow, with no obvious redundancy or bloat.
The set provides full node lifecycle coverage (create, read/list, update, delete), parameter access, error checking, arbitrary script execution, node method calls, class/help introspection, and image output capture. The generic execute_python_script tool also acts as a powerful fallback for any uncovered operations.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Related MCP Servers
- 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.12MIT
- AlicenseBqualityBmaintenanceAn 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.11417MIT
- AlicenseAqualityDmaintenanceEnables LLMs to directly control, introspect, and build TouchDesigner networks in real-time through a Model Context Protocol server.25MIT