touchdesigner-mcp-server 0.4.0-alpha.5 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.ja.md CHANGED
@@ -16,20 +16,52 @@ TouchDesigner MCPは、AIモデルとTouchDesigner WebServer DAT 間のブリッ
16
16
  ## 利用方法
17
17
 
18
18
  <details>
19
- <summary>方法1: npx を利用する(クイックスタート)</summary>
19
+ <summary>方法1: Claude Desktop + Desktop Extensions(推奨)</summary>
20
+
21
+ ##### 1. ファイルをダウンロード:
22
+ [リリースページ](https://github.com/8beeeaaat/touchdesigner-mcp/releases)から以下をダウンロード:
23
+ - **TouchDesigner Components**: `touchdesigner-mcp-td.zip`
24
+ - **Desktop Extensions (.dxt)**: `touchdesigner-mcp.dxt`
25
+
26
+ ##### 2. TouchDesignerコンポーネントを設置:
27
+ 1. `touchdesigner-mcp-td.zip`を展開
28
+ 2. 展開したフォルダから`mcp_webserver_base.tox`を操作したいTouchDesignerプロジェクト直下にインポート
29
+ 例: `/project1/mcp_webserver_base`となるように配置
30
+
31
+ https://github.com/user-attachments/assets/215fb343-6ed8-421c-b948-2f45fb819ff4
32
+
33
+ TouchDesignerのメニューからTextportを起動してサーバーの起動ログを確認できます。
34
+
35
+ ![import](https://github.com/8beeeaaat/touchdesigner-mcp/blob/main/assets/textport.png)
36
+
37
+ ##### 3. Desktop Extensionをインストール:
38
+ `touchdesigner-mcp.dxt`ファイルをダブルクリックしてClaude Desktopに拡張機能をインストール
39
+
40
+ https://github.com/user-attachments/assets/0786d244-8b82-4387-bbe4-9da048212854
41
+
42
+ ##### 4. 拡張機能が自動的にTouchDesignerサーバー接続を処理
43
+
44
+ **⚠️ 重要:** TouchDesignerコンポーネントのディレクトリ構造は展開した状態を正確に保持してください。`mcp_webserver_base.tox`コンポーネントは`modules/`ディレクトリやその他のファイルへの相対パスを参照しています。
45
+
46
+ </details>
47
+
48
+ <details>
49
+ <summary>方法2: npxを利用する</summary>
20
50
 
21
51
  *Node.jsがインストールされていることが前提となります*
22
52
 
23
- ##### 1. TouchDesigner プロジェクトにMCP連携用のAPIサーバーを設置
53
+ ##### 1. TouchDesignerコンポーネントを設置:
54
+ 1. [リリースページ](https://github.com/8beeeaaat/touchdesigner-mcp/releases)から`touchdesigner-mcp-td.zip`をダウンロード
55
+ 2. zipファイルを展開し、`mcp_webserver_base.tox`を操作したいTouchDesignerプロジェクト直下にインポート
56
+ 例: `/project1/mcp_webserver_base`となるように配置
57
+
58
+ https://github.com/user-attachments/assets/215fb343-6ed8-421c-b948-2f45fb819ff4
24
59
 
25
- npxを使用する場合、TouchDesignerコンポーネントを別途ダウンロードする必要があります:
26
- 1. [リリースページ](https://github.com/8beeeaaat/touchdesigner-mcp/releases)から `touchdesigner-mcp-td.zip` をダウンロード
27
- 2. zipファイルを展開したフォルダから `mcp_webserver_base.tox` を操作したいTouchDesignerプロジェクト直下にimportします。
28
- 例: `/project1/mcp_webserver_base` となるように配置
60
+ TouchDesignerのメニューからTextportを起動してサーバーの起動ログを確認できます。
29
61
 
30
- **⚠️ 重要:** ディレクトリの構造は展開した状態を正確に保持する必要があります。`mcp_webserver_base.tox` コンポーネントは `modules/` ディレクトリやその他のファイルへの相対パスを参照しています。展開したディレクトリ内のファイルを移動したり再編成したりしないでください。
62
+ ![import](https://github.com/8beeeaaat/touchdesigner-mcp/blob/main/assets/textport.png)
31
63
 
32
- ##### 2. AIエージェントの設定:
64
+ ##### 2. MCPサーバー設定:
33
65
 
34
66
  *例 Claude Desktop*
35
67
  ```json
@@ -37,21 +69,17 @@ npxを使用する場合、TouchDesignerコンポーネントを別途ダウン
37
69
  "mcpServers": {
38
70
  "touchdesigner": {
39
71
  "command": "npx",
40
- "args": [
41
- "-y",
42
- "touchdesigner-mcp-server@prerelease",
43
- "--stdio"
44
- ]
72
+ "args": ["-y", "touchdesigner-mcp-server", "--stdio"]
45
73
  }
46
74
  }
47
75
  }
48
76
  ```
49
77
 
50
- **TIPS:** `--host`と`--port`引数を追加することで、TouchDesignerサーバー接続をカスタマイズできます:
78
+ **カスタマイズ:** `--host`と`--port`引数を追加してTouchDesignerサーバー接続をカスタマイズできます:
51
79
  ```json
52
80
  "args": [
53
81
  "-y",
54
- "touchdesigner-mcp-server@prerelease",
82
+ "touchdesigner-mcp-server",
55
83
  "--stdio",
56
84
  "--host=http://custom_host",
57
85
  "--port=9982"
@@ -60,7 +88,7 @@ npxを使用する場合、TouchDesignerコンポーネントを別途ダウン
60
88
  </details>
61
89
 
62
90
  <details>
63
- <summary>方法2: Dockerイメージを利用</summary>
91
+ <summary>方法3: Dockerイメージを利用</summary>
64
92
 
65
93
  [![tutorial](https://github.com/8beeeaaat/touchdesigner-mcp/blob/main/assets/tutorial_docker.png)](https://www.youtube.com/watch?v=BRWoIEVb0TU)
66
94
 
@@ -77,26 +105,26 @@ cd touchdesigner-mcp
77
105
  make build
78
106
  ```
79
107
 
80
- ##### 3. TouchDesigner プロジェクトにMCP連携用のAPIサーバーを設置
108
+ ##### 3. TouchDesignerプロジェクトにMCP連携用のAPIサーバーを設置
81
109
 
82
- TouchDesignerを起動し、`td/mcp_webserver_base.tox` コンポーネントを操作したいTouchDesignerプロジェクト直下にimportします。
83
- 例: `/project1/mcp_webserver_base` となるように配置
110
+ TouchDesignerを起動し、`td/mcp_webserver_base.tox`コンポーネントを操作したいTouchDesignerプロジェクト直下にインポートします。
111
+ 例: `/project1/mcp_webserver_base`となるように配置
84
112
 
85
- tox のimport により `td/import_modules.py` スクリプトが動作し、APIサーバのコントローラなどのモジュールがロードされます。
113
+ toxファイルのインポートにより`td/import_modules.py`スクリプトが実行され、APIサーバーのコントローラなどのモジュールがロードされます。
86
114
 
87
- ![import](https://github.com/8beeeaaat/touchdesigner-mcp/blob/main/assets/import.png)
115
+ https://github.com/user-attachments/assets/215fb343-6ed8-421c-b948-2f45fb819ff4
88
116
 
89
- TouchDesigner のメニューから Textportを起動してサーバーの起動ログを確認することができます。
117
+ TouchDesignerのメニューからTextportを起動してサーバーの起動ログを確認できます。
90
118
 
91
119
  ![import](https://github.com/8beeeaaat/touchdesigner-mcp/blob/main/assets/textport.png)
92
120
 
93
- #### 4. MCPサーバーのコンテナを起動
121
+ ##### 4. MCPサーバーのコンテナを起動
94
122
 
95
123
  ```bash
96
124
  docker-compose up -d
97
125
  ```
98
126
 
99
- ##### 5. AIエージェントがDockerコンテナを使用するように設定して起動:
127
+ ##### 5. AIエージェントがDockerコンテナを使用するように設定:
100
128
 
101
129
  *例 Claude Desktop*
102
130
  ```json
@@ -123,7 +151,7 @@ docker-compose up -d
123
151
 
124
152
  *Windows システムでは、ドライブレターを含めてください。例:`C:\\path\\to\\your\\touchdesigner-mcp\\docker-compose.yml`*
125
153
 
126
- **TIPS:** `--port`引数を追加することで、TouchDesignerサーバー接続をカスタマイズできます:
154
+ **カスタマイズ:** `--port`引数を追加してTouchDesignerサーバー接続をカスタマイズできます:
127
155
  ```json
128
156
  "args": [
129
157
  ...,
@@ -138,9 +166,9 @@ docker-compose up -d
138
166
  ## 接続確認
139
167
 
140
168
  MCPサーバーが認識されていればセットアップは完了です。
141
- 認識されない場合はAIエージェントを再起動するなどしてください。
142
- 起動時にエラーが表示される場合はTouchDesignerを先に起動してから再度エージェントを起動してください。
143
- TouchDesigner APIサーバーが実行されていれば、エージェントは提供された ツール等を通じてTouchDesignerを使用できます。
169
+ 認識されない場合は、AIエージェントを再起動してください。
170
+ 起動時にエラーが表示される場合は、TouchDesignerを先に起動してからAIエージェントを再度起動してください。
171
+ TouchDesignerでAPIサーバーが実行されていれば、エージェントは提供されたツール等を通じてTouchDesignerを使用できます。
144
172
 
145
173
  ### ディレクトリ構造要件
146
174
 
@@ -172,7 +200,7 @@ td/
172
200
  | :-------------------------- | :--------------------------------------------- |
173
201
  | `create_td_node` | 新しいノードを作成します。 |
174
202
  | `delete_td_node` | 既存のノードを削除します。 |
175
- | `exec_node_method`| ノードに対しPythonメソッドを呼び出します。 |
203
+ | `exec_node_method` | ノードに対してPythonメソッドを呼び出します。 |
176
204
  | `execute_python_script` | TD内で任意のPythonスクリプトを実行します。 |
177
205
  | `get_td_class_details` | TD Pythonクラス/モジュールの詳細情報を取得します。 |
178
206
  | `get_td_classes` | TouchDesigner Pythonクラスのリストを取得します。 |
@@ -217,7 +245,7 @@ td/
217
245
 
218
246
  3. **利用可能なコマンド:**
219
247
  ```bash
220
- npm run test # ユニットテストと結合テストを実行
248
+ npm run test # ユニットテストと統合テストを実行
221
249
  npm run dev # デバッグ用MCPインスペクターを起動
222
250
  ```
223
251
 
@@ -226,9 +254,9 @@ td/
226
254
  ### プロジェクト構造の概要
227
255
 
228
256
  ```
229
- ├── src/ # MCPサーバー ソースコード
257
+ ├── src/ # MCPサーバーソースコード
230
258
  │ ├── api/ # TD WebServerに対するOpenAPI仕様
231
- │ ├── core/ # コアユーティリティ (ロガー, エラーハンドリング)
259
+ │ ├── core/ # コアユーティリティ(ロガー、エラーハンドリング)
232
260
  │ ├── features/ # MCP機能実装
233
261
  │ │ ├── prompts/ # プロンプトハンドラ
234
262
  │ │ ├── resources/ # リソースハンドラ
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # TouchDesigner MCP
2
2
 
3
- This is an implementation of an MCP (Model Context Protocol) server for TouchDesigner. The goal is to enable AI agents to control and operate TouchDesigner projects.
3
+ 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.
4
4
 
5
5
  [English](https://github.com/8beeeaaat/touchdesigner-mcp/blob/main/README.md) / [日本語](https://github.com/8beeeaaat/touchdesigner-mcp/blob/main/README.ja.md)
6
6
 
@@ -16,43 +16,71 @@ TouchDesigner MCP acts as a bridge between AI models and the TouchDesigner WebSe
16
16
  ## Usage
17
17
 
18
18
  <details>
19
- <summary>Method 1: Using npx (Quick Start)</summary>
19
+ <summary>Method 1: Using Claude Desktop and Desktop Extensions (Recommended)</summary>
20
20
 
21
- *Requires Node.js to be installed*
21
+ ### 1. Download Files
22
+ Download the following from the [releases page](https://github.com/8beeeaaat/touchdesigner-mcp/releases):
23
+ - **TouchDesigner Components**: `touchdesigner-mcp-td.zip`
24
+ - **Desktop Extension (.dxt)**: `touchdesigner-mcp.dxt`
22
25
 
23
- #### 1. Install the API Server in Your TouchDesigner Project:
26
+ ### 2. Set up TouchDesigner Components
27
+ 1. Extract the TouchDesigner components from `touchdesigner-mcp-td.zip`.
28
+ 2. Import `mcp_webserver_base.tox` into your TouchDesigner project.
29
+ 3. Place it at `/project1/mcp_webserver_base`.
24
30
 
25
- Since you're using npx, you'll need to download the TouchDesigner components separately:
26
- 1. Download `touchdesigner-mcp-td.zip` from the [releases page](https://github.com/8beeeaaat/touchdesigner-mcp/releases)
27
- 2. Extract the zip file to get the directory
28
- 3. Import `mcp_webserver_base.tox` from the extracted files directly under the TouchDesigner project you want to control.
29
- Example: Place it as `/project1/mcp_webserver_base`
31
+ https://github.com/user-attachments/assets/215fb343-6ed8-421c-b948-2f45fb819ff4
30
32
 
31
- **⚠️ 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. Do not move or reorganize files within the extracted directory.
33
+ You can check the startup logs by opening the Textport from the TouchDesigner menu.
32
34
 
33
- #### 2. Configure your AI agent:
35
+ ![import](https://github.com/8beeeaaat/touchdesigner-mcp/blob/main/assets/textport.png)
36
+
37
+ ### 3. Install the Desktop Extension
38
+ Double-click the `touchdesigner-mcp.dxt` file to install the extension in Claude Desktop.
39
+
40
+ https://github.com/user-attachments/assets/0786d244-8b82-4387-bbe4-9da048212854
41
+
42
+ ### 4. Connect to the Server
43
+ The extension will automatically handle the connection to the TouchDesigner server.
44
+
45
+ **⚠️ 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.
46
+
47
+ </details>
48
+
49
+ <details>
50
+ <summary>Method 2: Using npx</summary>
51
+
52
+ *Requires Node.js to be installed.*
53
+
54
+ ### 1. Set up TouchDesigner Components
55
+ 1. Download and extract the TouchDesigner components from `touchdesigner-mcp-td.zip` ([releases page](https://github.com/8beeeaaat/touchdesigner-mcp/releases)).
56
+ 2. Import `mcp_webserver_base.tox` into your TouchDesigner project.
57
+ 3. Place it at `/project1/mcp_webserver_base`.
34
58
 
35
- *Example for Claude Desktop*
59
+ https://github.com/user-attachments/assets/215fb343-6ed8-421c-b948-2f45fb819ff4
60
+
61
+ You can check the startup logs by opening the Textport from the TouchDesigner menu.
62
+
63
+ ![import](https://github.com/8beeeaaat/touchdesigner-mcp/blob/main/assets/textport.png)
64
+
65
+ ### 2. Set up the MCP Server Configuration
66
+
67
+ *Example for Claude Desktop:*
36
68
  ```json
37
69
  {
38
70
  "mcpServers": {
39
71
  "touchdesigner": {
40
72
  "command": "npx",
41
- "args": [
42
- "-y",
43
- "touchdesigner-mcp-server@prerelease",
44
- "--stdio"
45
- ]
73
+ "args": ["-y", "touchdesigner-mcp-server", "--stdio"]
46
74
  }
47
75
  }
48
76
  }
49
77
  ```
50
78
 
51
- **Note:** You can customize the TouchDesigner server connection by adding `--host` and `--port` arguments:
79
+ **Customization:** You can customize the TouchDesigner server connection by adding `--host` and `--port` arguments:
52
80
  ```json
53
81
  "args": [
54
82
  "-y",
55
- "touchdesigner-mcp-server@prerelease",
83
+ "touchdesigner-mcp-server",
56
84
  "--stdio",
57
85
  "--host=http://custom_host",
58
86
  "--port=9982"
@@ -61,45 +89,43 @@ Example: Place it as `/project1/mcp_webserver_base`
61
89
  </details>
62
90
 
63
91
  <details>
64
- <summary>Method 2: Using Docker Image</summary>
92
+ <summary>Method 3: Using a Docker Image</summary>
65
93
 
66
94
  [![tutorial](https://github.com/8beeeaaat/touchdesigner-mcp/blob/main/assets/tutorial_docker.png)](https://www.youtube.com/watch?v=BRWoIEVb0TU)
67
95
 
68
- #### 1. Clone the repository:
96
+ ### 1. Clone the repository
69
97
  ```bash
70
98
  git clone https://github.com/8beeeaaat/touchdesigner-mcp.git
71
99
  cd touchdesigner-mcp
72
100
  ```
73
101
 
74
- #### 2. Build the Docker image:
102
+ ### 2. Build the Docker image
75
103
  ```bash
76
- git clone https://github.com/8beeeaaat/touchdesigner-mcp.git
77
- cd touchdesigner-mcp
78
104
  make build
79
105
  ```
80
106
 
81
- #### 3. Install the API Server in Your TouchDesigner Project:
107
+ ### 3. Install the API Server in Your TouchDesigner Project
82
108
 
83
- Start TouchDesigner and import the `td/mcp_webserver_base.tox` component directly under the TouchDesigner project you want to control.
84
- Example: Place it as `/project1/mcp_webserver_base`
109
+ Start TouchDesigner and import the `td/mcp_webserver_base.tox` component into the project you want to control.
110
+ Example: Place it at `/project1/mcp_webserver_base`.
85
111
 
86
- Importing the tox will trigger the `td/import_modules.py` script, which loads modules such as API server controllers.
112
+ Importing the `.tox` file will trigger the `td/import_modules.py` script, which loads the necessary modules for the API server.
87
113
 
88
- ![import](https://github.com/8beeeaaat/touchdesigner-mcp/blob/main/assets/import.png)
114
+ https://github.com/user-attachments/assets/215fb343-6ed8-421c-b948-2f45fb819ff4
89
115
 
90
- You can check boot logs by opening the Textport from the TouchDesigner menu.
116
+ You can check the startup logs by opening the Textport from the TouchDesigner menu.
91
117
 
92
118
  ![import](https://github.com/8beeeaaat/touchdesigner-mcp/blob/main/assets/textport.png)
93
119
 
94
- #### 4. Start the MCP server container with your TouchDesigner configuration
120
+ ### 4. Start the MCP server container
95
121
 
96
122
  ```bash
97
123
  docker-compose up -d
98
124
  ```
99
125
 
100
- #### 5. Configure your AI agent to use the Docker container:
126
+ ### 5. Configure your AI agent to use the Docker container
101
127
 
102
- *Example for Claude Desktop*
128
+ *Example for Claude Desktop:*
103
129
  ```json
104
130
  {
105
131
  "mcpServers": {
@@ -120,9 +146,9 @@ Example: Place it as `/project1/mcp_webserver_base`
120
146
  }
121
147
  }
122
148
  }
123
- ```
149
+ ```
124
150
 
125
- *On Windows systems, include the drive letter like C: e.g. `C:\\path\\to\\your\\touchdesigner-mcp\\docker-compose.yml`*
151
+ *On Windows systems, include the drive letter, e.g., `C:\path\to\your\touchdesigner-mcp\docker-compose.yml`.*
126
152
 
127
153
  **Note:** You can customize the TouchDesigner server connection by adding `--host` and `--port` arguments:
128
154
  ```json
@@ -138,14 +164,14 @@ Example: Place it as `/project1/mcp_webserver_base`
138
164
 
139
165
  ## Verify Connection
140
166
 
141
- If the MCP server is recognized, setup is complete.
167
+ If the MCP server is recognized, the setup is complete.
142
168
  If it's not recognized, try restarting your AI agent.
143
- If you see an error at startup, try launching the agent again after starting TouchDesigner first.
144
- When the API server is running properly in TouchDesigner, the agent can use the provided tools to operate TouchDesigner.
169
+ If you see an error at startup, try launching the agent again after starting TouchDesigner.
170
+ When the API server is running properly in TouchDesigner, the agent can use the provided tools to operate it.
145
171
 
146
172
  ### Directory Structure Requirements
147
173
 
148
- **Critical:** When using any method (Docker, npx), maintain the exact directory structure:
174
+ **Critical:** When using any method, you must maintain the original directory structure:
149
175
 
150
176
  ```
151
177
  td/
@@ -164,7 +190,7 @@ The `mcp_webserver_base.tox` component uses relative paths to locate Python modu
164
190
 
165
191
  ## MCP Server Features
166
192
 
167
- This server enables operations on TouchDesigner via the Model Context Protocol (MCP) and provides references to various implementation documents.
193
+ This server enables AI agents to perform operations in TouchDesigner using the Model Context Protocol (MCP).
168
194
 
169
195
  ### Tools
170
196
 
@@ -172,16 +198,16 @@ Tools allow AI agents to perform actions in TouchDesigner.
172
198
 
173
199
  | Tool Name | Description |
174
200
  | :---------------------- | :----------------------------------------------------------------- |
175
- | `create_td_node` | Create a new node. |
176
- | `delete_td_node` | Delete an existing node. |
177
- | `exec_node_method` | Call a Python method on a node. |
178
- | `execute_python_script` | Execute an arbitrary Python script in TD. |
179
- | `get_td_class_details` | Get details of a TD Python class/module. |
180
- | `get_td_classes` | Get a list of TouchDesigner Python classes. |
181
- | `get_td_info` | Get information about the TD server environment. |
182
- | `get_td_node_parameters`| Get parameters of a specific node. |
183
- | `get_td_nodes` | Get nodes under a parent path (optionally filtered). |
184
- | `update_td_node_parameters` | Update parameters of a specific node. |
201
+ | `create_td_node` | Creates a new node. |
202
+ | `delete_td_node` | Deletes an existing node. |
203
+ | `exec_node_method` | Calls a Python method on a node. |
204
+ | `execute_python_script` | Executes an arbitrary Python script in TouchDesigner. |
205
+ | `get_td_class_details` | Gets details of a TouchDesigner Python class or module. |
206
+ | `get_td_classes` | Gets a list of TouchDesigner Python classes. |
207
+ | `get_td_info` | Gets information about the TouchDesigner server environment. |
208
+ | `get_td_node_parameters`| Gets the parameters of a specific node. |
209
+ | `get_td_nodes` | Gets nodes under a parent path, with optional filtering. |
210
+ | `update_td_node_parameters` | Updates the parameters of a specific node. |
185
211
 
186
212
  ### Prompts
187
213
 
@@ -189,20 +215,20 @@ Prompts provide instructions for AI agents to perform specific actions in TouchD
189
215
 
190
216
  | Prompt Name | Description |
191
217
  | :------------------| :-------------------------------------------------------------------------- |
192
- | `Search node` | Fuzzy search for nodes and retrieve information based on name, family, type. |
193
- | `Node connection` | Provide instructions to connect nodes within TouchDesigner. |
194
- | `Check node errors`| Check errors for a specified node, recursively for child nodes if any. |
218
+ | `Search node` | Fuzzy searches for nodes and retrieves information based on name, family, or type. |
219
+ | `Node connection` | Provides instructions to connect nodes within TouchDesigner. |
220
+ | `Check node errors`| Checks for errors on a specified node, and recursively for its children. |
195
221
 
196
222
  ### Resources
197
223
 
198
- Not implemented
224
+ Not implemented.
199
225
 
200
226
 
201
227
  ## For Developers
202
228
 
203
229
  ### Quick Start for Development
204
230
 
205
- 1. **Setup environment:**
231
+ 1. **Set up your environment:**
206
232
  ```bash
207
233
  # Clone and install dependencies
208
234
  git clone https://github.com/8beeeaaat/touchdesigner-mcp.git
@@ -220,61 +246,61 @@ Not implemented
220
246
  3. **Available commands:**
221
247
  ```bash
222
248
  npm run test # Run unit and integration tests
223
- npm run dev # Launch MCP inspector for debugging
249
+ npm run dev # Launch the MCP inspector for debugging
224
250
  ```
225
251
 
226
- **Note:** When you update the code, restart both the MCP server and TouchDesigner to reflect changes.
252
+ **Note:** When you update the code, you must restart both the MCP server and TouchDesigner to apply the changes.
227
253
 
228
254
  ### Project Structure Overview
229
255
 
230
256
  ```
231
257
  ├── src/ # MCP server source code
232
- │ ├── api/ # OpenAPI spec for TD WebServer
258
+ │ ├── api/ # OpenAPI spec for the TouchDesigner WebServer
233
259
  │ ├── core/ # Core utilities (logger, error handling)
234
260
  │ ├── features/ # MCP feature implementations
235
261
  │ │ ├── prompts/ # Prompt handlers
236
262
  │ │ ├── resources/ # Resource handlers
237
263
  │ │ └── tools/ # Tool handlers (e.g., tdTools.ts)
238
- │ ├── gen/ # Code generated from OpenAPI schema for MCP server
264
+ │ ├── gen/ # Code generated from the OpenAPI schema for the MCP server
239
265
  │ ├── server/ # MCP server logic (connections, main server class)
240
- │ ├── tdClient/ # TD connection API client
241
- │ ├── index.ts # Main entry point for Node.js server
266
+ │ ├── tdClient/ # TouchDesigner connection API client
267
+ │ ├── index.ts # Main entry point for the Node.js server
242
268
  │ └── ...
243
- ├── td/ # TouchDesigner related files
269
+ ├── td/ # TouchDesigner-related files
244
270
  │ ├── modules/ # Python modules for TouchDesigner
245
- │ │ ├── mcp/ # Core logic for handling MCP requests in TD
271
+ │ │ ├── mcp/ # Core logic for handling MCP requests in TouchDesigner
246
272
  │ │ │ ├── controllers/ # API request controllers (api_controller.py, generated_handlers.py)
247
273
  │ │ │ └── services/ # Business logic (api_service.py)
248
- │ │ ├── td_server/ # Python model code generated from OpenAPI schema
274
+ │ │ ├── td_server/ # Python model code generated from the OpenAPI schema
249
275
  │ │ └── utils/ # Shared Python utilities
250
276
  │ ├── templates/ # Mustache templates for Python code generation
251
277
  │ ├── genHandlers.js # Node.js script for generating generated_handlers.py
252
- │ ├── import_modules.py # Helper script to import API server modules into TD
278
+ │ ├── import_modules.py # Helper script to import API server modules into TouchDesigner
253
279
  │ └── mcp_webserver_base.tox # Main TouchDesigner component
254
280
  ├── tests/ # Test code
255
281
  │ ├── integration/
256
282
  │ └── unit/
257
- └── orval.config.ts # Orval config (TS client generation)
283
+ └── orval.config.ts # Orval config (TypeScript client generation)
258
284
  ```
259
285
 
260
286
 
261
287
  ### API Code Generation Workflow
262
288
 
263
- This project uses OpenAPI-based code generation tools (Orval / openapi-generator-cli):
289
+ This project uses OpenAPI-based code generation tools (Orval and openapi-generator-cli).
264
290
 
265
291
  **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`.
266
292
 
267
293
  1. **Python server generation (`npm run gen:webserver`):**
268
294
  * Uses `openapi-generator-cli` via Docker.
269
295
  * Reads `src/api/index.yml`.
270
- * Generates a Python server skeleton (`td/modules/td_server/`) based on the API definition. This code runs inside TouchDesigner via WebServer DAT.
296
+ * Generates a Python server skeleton (`td/modules/td_server/`) based on the API definition. This code runs inside TouchDesigner's WebServer DAT.
271
297
  * **Requires Docker to be installed and running.**
272
298
  2. **Python handler generation (`npm run gen:handlers`):**
273
299
  * Uses a custom Node.js script (`td/genHandlers.js`) and Mustache templates (`td/templates/`).
274
300
  * Reads the generated Python server code or OpenAPI spec.
275
- * Generates handler implementations (`td/modules/mcp/controllers/generated_handlers.py`) that connect to business logic in `td/modules/mcp/services/api_service.py`.
301
+ * Generates handler implementations (`td/modules/mcp/controllers/generated_handlers.py`) that connect to the business logic in `td/modules/mcp/services/api_service.py`.
276
302
  3. **TypeScript client generation (`npm run gen:mcp`):**
277
- * Uses `Orval` to generate API client code and Zod schemas for tool validation from the schema YAML bundled by `openapi-generator-cli`.
303
+ * Uses `Orval` to generate an API client and Zod schemas for tool validation from the schema YAML, which is bundled by `openapi-generator-cli`.
278
304
  * Generates a typed TypeScript client (`src/tdClient/`) used by the Node.js server to make requests to the WebServer DAT.
279
305
 
280
306
  The build process (`npm run build`) runs all necessary generation steps (`npm run gen`), followed by TypeScript compilation (`tsc`).
@@ -283,13 +309,13 @@ The build process (`npm run build`) runs all necessary generation steps (`npm ru
283
309
 
284
310
  We welcome your contributions!
285
311
 
286
- 1. Fork the repository
287
- 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
288
- 3. Make your changes
289
- 4. Add tests and ensure everything works (`npm test`)
290
- 5. Commit your changes (`git commit -m 'Add some amazing feature'`)
291
- 6. Push to your branch (`git push origin feature/amazing-feature`)
292
- 7. Open a pull request
312
+ 1. Fork the repository.
313
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`).
314
+ 3. Make your changes.
315
+ 4. Add tests and ensure everything works (`npm test`).
316
+ 5. Commit your changes (`git commit -m 'Add some amazing feature'`).
317
+ 6. Push to your branch (`git push origin feature/amazing-feature`).
318
+ 7. Open a pull request.
293
319
 
294
320
  Please always include appropriate tests when making implementation changes.
295
321
 
@@ -3,7 +3,7 @@
3
3
  * Do not edit manually.
4
4
  * TouchDesigner API
5
5
  * OpenAPI schema for generating TouchDesigner API client code
6
- * OpenAPI spec version: 0.4.0-alpha.5
6
+ * OpenAPI spec version: 0.4.0
7
7
  */
8
8
  import { customInstance } from '../../api/customInstance.js';
9
9
  // eslint-disable-next-line @typescript-eslint/no-redeclare
@@ -3,7 +3,7 @@
3
3
  * Do not edit manually.
4
4
  * TouchDesigner API
5
5
  * OpenAPI schema for generating TouchDesigner API client code
6
- * OpenAPI spec version: 0.4.0-alpha.5
6
+ * OpenAPI spec version: 0.4.0
7
7
  */
8
8
  import { z as zod } from 'zod';
9
9
  /**
@@ -18,7 +18,7 @@ export class TouchDesignerServer {
18
18
  constructor() {
19
19
  this.server = new McpServer({
20
20
  name: "TouchDesigner",
21
- version: "0.4.0-alpha.5",
21
+ version: "0.4.0",
22
22
  }, {
23
23
  capabilities: {
24
24
  prompts: {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "touchdesigner-mcp-server",
3
- "version": "0.4.0-alpha.5",
3
+ "version": "0.4.0",
4
4
  "description": "MCP server for TouchDesigner",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,6 +36,7 @@
36
36
  "@types/jsdom": "^21.1.7",
37
37
  "@types/node": "^24.0.7",
38
38
  "@vitest/coverage-v8": "^3.2.4",
39
+ "archiver": "^7.0.1",
39
40
  "msw": "^2.10.2",
40
41
  "mustache": "^4.2.0",
41
42
  "npm-run-all": "^4.1.5",
@@ -60,6 +61,7 @@
60
61
  "build": "run-s build:*",
61
62
  "build:gen": "npm run gen",
62
63
  "build:dist": "tsc && shx chmod +x dist/*.js",
64
+ "build:dxt": "npx @anthropic-ai/dxt pack",
63
65
  "lint": "run-p lint:*",
64
66
  "lint:biome": "biome check",
65
67
  "lint:tsc": "tsc --noEmit",
@@ -72,7 +74,8 @@
72
74
  "gen": "run-s gen:*",
73
75
  "gen:webserver": "openapi-generator-cli generate -i ./src/api/index.yml -g python-flask -o ./td/modules/td_server",
74
76
  "gen:handlers": "node td/genHandlers.js",
75
- "gen:mcp": "orval --config ./orval.config.ts"
77
+ "gen:mcp": "orval --config ./orval.config.ts",
78
+ "package:dxt": "run-s build build:dxt"
76
79
  },
77
80
  "files": [
78
81
  "dist/**/*"