touchdesigner-mcp-server 0.2.8 → 0.2.10
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 +91 -78
- package/README.md +94 -82
- package/dist/api/customInstance.js +2 -4
- package/dist/gen/endpoints/TouchDesignerAPI.js +1 -1
- package/dist/gen/mcp/touchDesignerAPI.zod.js +1 -1
- package/dist/server/connectionManager.js +1 -1
- package/dist/server/touchDesignerServer.js +1 -1
- package/package.json +9 -8
- package/td/modules/td_server/.openapi-generator/VERSION +1 -1
- package/td/modules/td_server/openapi_server/openapi/openapi.yaml +1 -1
package/README.ja.md
CHANGED
|
@@ -15,20 +15,29 @@ TouchDesigner MCPは、AIモデルとTouchDesigner WebServer DAT 間のブリッ
|
|
|
15
15
|
|
|
16
16
|
## 利用方法
|
|
17
17
|
|
|
18
|
-
*Node.js がインストールされていることが前提となります*
|
|
18
|
+
*Docker または Node.js がインストールされていることが前提となります*
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
#### 方法1: Dockerイメージを利用(推奨)
|
|
21
|
+
|
|
22
|
+
[](https://www.youtube.com/watch?v=BRWoIEVb0TU)
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
##### 1. リポジトリをクローン:
|
|
25
|
+
```bash
|
|
26
|
+
git clone https://github.com/8beeeaaat/touchdesigner-mcp.git
|
|
27
|
+
cd touchdesigner-mcp
|
|
28
|
+
```
|
|
23
29
|
|
|
24
|
-
|
|
25
|
-
|
|
30
|
+
##### 2. 環境設定ファイルの設置とコードのビルド
|
|
31
|
+
.envのテンプレートファイルをコピーし、必要に応じて TD_WEB_SERVER_HOST / TD_WEB_SERVER_PORT を調整してから Dockerイメージをビルドしてください。
|
|
26
32
|
|
|
27
|
-
|
|
33
|
+
```bash
|
|
34
|
+
cp dotenv .env
|
|
35
|
+
make build
|
|
36
|
+
```
|
|
28
37
|
|
|
29
|
-
|
|
38
|
+
##### 3. TouchDesigner プロジェクトにMCP連携用のAPIサーバーを設置
|
|
30
39
|
|
|
31
|
-
TouchDesignerを起動し、`td/mcp_webserver_base.tox`
|
|
40
|
+
TouchDesignerを起動し、`td/mcp_webserver_base.tox` コンポーネントを操作したいTouchDesignerプロジェクト直下にimportします。
|
|
32
41
|
例: `/project1/mcp_webserver_base` となるように配置
|
|
33
42
|
|
|
34
43
|
tox のimport により `td/import_modules.py` スクリプトが動作し、APIサーバのコントローラなどのモジュールがロードされます。
|
|
@@ -39,8 +48,65 @@ TouchDesigner のメニューから Textportを起動してサーバーの起動
|
|
|
39
48
|
|
|
40
49
|

|
|
41
50
|
|
|
42
|
-
|
|
43
|
-
|
|
51
|
+
#### 4. MCPサーバーのコンテナを起動
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
docker-compose up -d
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
##### 5. AIエージェントがDockerコンテナを使用するように設定して起動:
|
|
58
|
+
|
|
59
|
+
*例 Claude Desktop*
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"mcpServers": {
|
|
63
|
+
"touchdesigner": {
|
|
64
|
+
"command": "docker",
|
|
65
|
+
"args": [
|
|
66
|
+
"compose",
|
|
67
|
+
"-f",
|
|
68
|
+
"/path/to/your/touchdesigner-mcp/docker-compose.yml",
|
|
69
|
+
"exec",
|
|
70
|
+
"-i",
|
|
71
|
+
"touchdesigner-mcp-server",
|
|
72
|
+
"node",
|
|
73
|
+
"dist/index.js",
|
|
74
|
+
"--stdio"
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
*Windows環境では C:\\ の様にドライブレターを含めてください。 例. `C:\\path\\to\\your\\touchdesigner-mcp\\docker-compose.yml`*
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
#### 方法2: NPMパッケージ を利用する
|
|
85
|
+
|
|
86
|
+
Node.jsから直接ビルド済みのjsを利用する場合は、以下の手順に従います:
|
|
87
|
+
|
|
88
|
+
[](https://www.youtube.com/watch?v=jFaUP1fYum0)
|
|
89
|
+
|
|
90
|
+
##### 1. パッケージのインストール
|
|
91
|
+
```bash
|
|
92
|
+
mkdir some && cd ./some # 必要に応じて任意のディレクトリを作成
|
|
93
|
+
npm install touchdesigner-mcp-server
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
##### 2. TouchDesigner プロジェクトにMCP連携用のAPIサーバーを設置
|
|
97
|
+
|
|
98
|
+
TouchDesignerを起動し、`some/node_modules/touchdesigner-mcp-server/td/mcp_webserver_base.tox` コンポーネントを操作したいTouchDesignerプロジェクト直下にimportします。
|
|
99
|
+
例: `/project1/mcp_webserver_base` となるように配置
|
|
100
|
+
|
|
101
|
+
tox のimport により `some/node_modules/touchdesigner-mcp-server/td/import_modules.py` スクリプトが動作し、APIサーバのコントローラなどのモジュールがロードされます。
|
|
102
|
+
|
|
103
|
+

|
|
104
|
+
|
|
105
|
+
TouchDesigner のメニューから Textportを起動してサーバーの起動ログを確認することができます。
|
|
106
|
+
|
|
107
|
+

|
|
108
|
+
|
|
109
|
+
##### 3. AIエージェントの設定:
|
|
44
110
|
|
|
45
111
|
*例 Claude Desktop*
|
|
46
112
|
```json
|
|
@@ -51,8 +117,7 @@ TouchDesignerが起動した状態で、AIエージェント(Claude Desktop,Cu
|
|
|
51
117
|
"/path/to/your/node_modules/touchdesigner-mcp-server/dist/index.js", // <-- node_modules/touchdesigner-mcp-server/dist/index.js への絶対パスに置き換えてください
|
|
52
118
|
"--stdio"
|
|
53
119
|
],
|
|
54
|
-
"command": "node"
|
|
55
|
-
"transportType": "stdio"
|
|
120
|
+
"command": "node"
|
|
56
121
|
}
|
|
57
122
|
}
|
|
58
123
|
}
|
|
@@ -60,10 +125,12 @@ TouchDesignerが起動した状態で、AIエージェント(Claude Desktop,Cu
|
|
|
60
125
|
|
|
61
126
|
*Windows環境では C:\\ の様にドライブレターを含めてください。 例. `C:\\path\\to\\your\\node_modules\\touchdesigner-mcp-server\\dist\\index.js`*
|
|
62
127
|
|
|
128
|
+
### 3. 接続確認
|
|
129
|
+
|
|
63
130
|
MCPサーバーが認識されていればセットアップは完了です。
|
|
64
131
|
認識されない場合はAIエージェントを再起動するなどしてください。
|
|
65
132
|
起動時にエラーが表示される場合はTouchDesignerを先に起動してから再度エージェントを起動してください。
|
|
66
|
-
TouchDesigner で APIサーバーが実行されていれば、エージェントは提供された TouchDesigner
|
|
133
|
+
TouchDesigner で APIサーバーが実行されていれば、エージェントは提供された ツール等を通じてTouchDesignerを使用できます。
|
|
67
134
|
|
|
68
135
|

|
|
69
136
|
|
|
@@ -105,77 +172,23 @@ TouchDesigner で APIサーバーが実行されていれば、エージェン
|
|
|
105
172
|
|
|
106
173
|
## 開発者向け
|
|
107
174
|
|
|
108
|
-
###
|
|
175
|
+
### クライアント・APIサーバーコードのビルド
|
|
109
176
|
|
|
110
|
-
1.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
2. 依存パッケージのインストール
|
|
116
|
-
```bash
|
|
117
|
-
cd touchdesigner-mcp
|
|
118
|
-
npm install
|
|
119
|
-
```
|
|
120
|
-
3. 環境設定ファイルの設置とビルド
|
|
121
|
-
```
|
|
122
|
-
# テンプレートをコピーし、必要に応じて TD_WEB_SERVER_URL を調整してください
|
|
123
|
-
cp dotenv .env
|
|
124
|
-
|
|
125
|
-
# プロジェクトのビルド(APIクライアント/サーバー向けスキーマを生成し、MCPリソースをコンパイルします)
|
|
126
|
-
# このコマンドを実行する前にDockerデーモンが実行されていることを確認してください
|
|
127
|
-
npm run build
|
|
128
|
-
```
|
|
177
|
+
1. `cp dotenv .env`
|
|
178
|
+
2. `.env` ファイルの `TD_WEB_SERVER_HOST`, `TD_WEB_SERVER_PORT` を開発環境に合わせて変更
|
|
179
|
+
3. `make build` もしくは `npm run build` を実行してコードを再生成する
|
|
129
180
|
|
|
130
|
-
|
|
181
|
+
ビルドしたコードを再反映する場合は MCPサーバーと TouchDesigner を再起動してください
|
|
131
182
|
|
|
132
|
-
|
|
133
|
-
`npm run
|
|
134
|
-
|
|
135
|
-
- TouchDesigner WebSever DAT向けのAPIサーバーコード
|
|
136
|
-
|
|
137
|
-
#### 2. **TouchDesigner に MCPサーバー向けWebServerをインポートする:**
|
|
138
|
-
TouchDesignerを起動し、`td/mcp_webserver_base.tox` コンポーネントをTouchDesignerプロジェクト直下にimportします。
|
|
139
|
-
tox のimport により `td/import_modules.py` スクリプトが動作し、APIサーバのコントローラなどのモジュールがロードされます。
|
|
140
|
-
|
|
141
|
-
#### 3. **APIサーバの動作確認:**
|
|
142
|
-
`td/modules` ディレクトリ内のPythonモジュールが `mcp_webserver_base` コンポーネントからアクセス可能であることを確認します。
|
|
143
|
-
`npm run test` を実行することでMCPサーバーコードのユニットテストと TouchDesigner への結合テストが実行されます。
|
|
183
|
+
### APIサーバの動作確認
|
|
184
|
+
- `npm run test`
|
|
185
|
+
MCPサーバーコードのユニットテストと TouchDesigner への結合テストが実行されます。
|
|
144
186
|
TouchDesigner のメニューから Textportを起動すると通信のログを確認することができます。
|
|
145
187
|
|
|
146
|
-
`npm run dev`
|
|
147
|
-
|
|
148
|
-
*TIPS*
|
|
149
|
-
`mcp_webserver_base.tox` には、MCPサーバーとTouchDesignerを連携させるように設定された WebServer DAT が含まれています。
|
|
150
|
-
このDATがActiveであり、`.env` ファイルの `TD_WEB_SERVER_URL` で指定されたポートで実行されていることを確認してください。(デフォルト: `9981`)
|
|
151
|
-
実行するポートを任意のものに変更したい場合は、以下の手順に従ってください。
|
|
152
|
-
1. `.env` ファイルの `TD_WEB_SERVER_PORT` を変更
|
|
153
|
-
2. `npm run build` を再実行
|
|
154
|
-
3. mcp_webserver_base (WebServer DAT) のポートを変更し、WebServer DATをRestart
|
|
155
|
-
|
|
156
|
-
### MCP対応 AIエージェントとの接続
|
|
157
|
-
|
|
158
|
-
TouchDesignerが起動した状態で、AIエージェント(Cursor, Claude Desktop, VSCode CopilotChatなど)をMCPサーバーに接続するように設定します。
|
|
159
|
-
|
|
160
|
-
#### 例. Claude Desktop
|
|
161
|
-
```json
|
|
162
|
-
{
|
|
163
|
-
"mcpServers": {
|
|
164
|
-
"dev_touchdesigner": {
|
|
165
|
-
"args": [
|
|
166
|
-
"/path/to/your/touchdesigner-mcp/dist/index.js", // <-- ビルド後の /dist/index.js への絶対パスに置き換えてください
|
|
167
|
-
"--stdio"
|
|
168
|
-
],
|
|
169
|
-
"command": "node",
|
|
170
|
-
"transportType": "stdio"
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
*Windows環境では C:\\ の様にドライブレターを含めてください。 例. `C:\\path\\to\\your\\touchdesigner-mcp\\dist\\index.js`*
|
|
188
|
+
- `npm run dev`
|
|
189
|
+
@modelcontextprotocol/inspector が起動し、各種機能をデバッグすることができます。
|
|
177
190
|
|
|
178
|
-
###
|
|
191
|
+
### プロジェクト構造の概要
|
|
179
192
|
|
|
180
193
|
```
|
|
181
194
|
├── src/ # MCPサーバー ソースコード
|
package/README.md
CHANGED
|
@@ -15,20 +15,29 @@ TouchDesigner MCP acts as a bridge between AI models and the TouchDesigner WebSe
|
|
|
15
15
|
|
|
16
16
|
## Usage
|
|
17
17
|
|
|
18
|
-
*Requires Node.js to be installed*
|
|
18
|
+
*Requires Docker or Node.js to be installed*
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
#### Method 1: Using Docker Image (Recommended)
|
|
21
|
+
|
|
22
|
+
[](https://www.youtube.com/watch?v=BRWoIEVb0TU)
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
##### 1. Clone the repository:
|
|
25
|
+
```bash
|
|
26
|
+
git clone https://github.com/8beeeaaat/touchdesigner-mcp.git
|
|
27
|
+
cd touchdesigner-mcp
|
|
28
|
+
```
|
|
23
29
|
|
|
24
|
-
|
|
25
|
-
|
|
30
|
+
##### 2. Set up the environment file and build:
|
|
31
|
+
Copy the template file and adjust the TD_WEB_SERVER_HOST and TD_WEB_SERVER_PORT as needed before building the Docker image.
|
|
26
32
|
|
|
27
|
-
|
|
33
|
+
```bash
|
|
34
|
+
cp dotenv .env
|
|
35
|
+
make build
|
|
36
|
+
```
|
|
28
37
|
|
|
29
|
-
|
|
38
|
+
##### 3. Install the API Server in Your TouchDesigner Project:
|
|
30
39
|
|
|
31
|
-
Start TouchDesigner and import the `td/mcp_webserver_base.tox` component directly under
|
|
40
|
+
Start TouchDesigner and import the `td/mcp_webserver_base.tox` component directly under the TouchDesigner project you want to control.
|
|
32
41
|
Example: Place it as `/project1/mcp_webserver_base`
|
|
33
42
|
|
|
34
43
|
Importing the tox will trigger the `td/import_modules.py` script, which loads modules such as API server controllers.
|
|
@@ -39,10 +48,66 @@ You can check boot logs by opening the Textport from the TouchDesigner menu.
|
|
|
39
48
|
|
|
40
49
|

|
|
41
50
|
|
|
42
|
-
|
|
43
|
-
With TouchDesigner running, configure your AI agent (Claude Desktop, Cursor, VSCode CopilotChat, etc.) to connect to the MCP server.
|
|
51
|
+
##### 4. Start the MCP server container
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
```bash
|
|
54
|
+
docker-compose up -d
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
##### 5. Configure your AI agent to use the Docker container:
|
|
58
|
+
|
|
59
|
+
*Example for Claude Desktop*
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"mcpServers": {
|
|
63
|
+
"touchdesigner": {
|
|
64
|
+
"command": "docker",
|
|
65
|
+
"args": [
|
|
66
|
+
"compose",
|
|
67
|
+
"-f",
|
|
68
|
+
"/path/to/your/touchdesigner-mcp/docker-compose.yml",
|
|
69
|
+
"exec",
|
|
70
|
+
"-i",
|
|
71
|
+
"touchdesigner-mcp-server",
|
|
72
|
+
"node",
|
|
73
|
+
"dist/index.js",
|
|
74
|
+
"--stdio"
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
*On Windows systems, include the drive letter like C: e.g. `C:\\path\\to\\your\\touchdesigner-mcp\\docker-compose.yml`*
|
|
82
|
+
|
|
83
|
+
#### Method 2: Using the NPM Package
|
|
84
|
+
|
|
85
|
+
To use the pre-built JS directly from Node.js:
|
|
86
|
+
|
|
87
|
+
[](https://www.youtube.com/watch?v=jFaUP1fYum0)
|
|
88
|
+
|
|
89
|
+
##### 1. Install the package
|
|
90
|
+
```bash
|
|
91
|
+
mkdir some && cd ./some # If you need a new directory
|
|
92
|
+
npm install touchdesigner-mcp-server
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
##### 2. Install the API Server in Your TouchDesigner Project:
|
|
96
|
+
|
|
97
|
+
Start TouchDesigner and import the `some/node_modules/touchdesigner-mcp-server/td/mcp_webserver_base.tox` component directly under the TouchDesigner project you want to control.
|
|
98
|
+
Example: Place it as `/project1/mcp_webserver_base`
|
|
99
|
+
|
|
100
|
+
Importing the tox will trigger the `some/node_modules/touchdesigner-mcp-server/td/import_modules.py` script, which loads modules such as API server controllers.
|
|
101
|
+
|
|
102
|
+

|
|
103
|
+
|
|
104
|
+
You can check boot logs by opening the Textport from the TouchDesigner menu.
|
|
105
|
+
|
|
106
|
+

|
|
107
|
+
|
|
108
|
+
##### 3. Configure your AI agent:
|
|
109
|
+
|
|
110
|
+
*Example for Claude Desktop*
|
|
46
111
|
```json
|
|
47
112
|
{
|
|
48
113
|
"mcpServers": {
|
|
@@ -51,19 +116,20 @@ With TouchDesigner running, configure your AI agent (Claude Desktop, Cursor, VSC
|
|
|
51
116
|
"/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
|
|
52
117
|
"--stdio"
|
|
53
118
|
],
|
|
54
|
-
"command": "node"
|
|
55
|
-
"transportType": "stdio"
|
|
119
|
+
"command": "node"
|
|
56
120
|
}
|
|
57
121
|
}
|
|
58
122
|
}
|
|
59
123
|
```
|
|
60
124
|
|
|
61
|
-
*On Windows
|
|
125
|
+
*On Windows systems, include the drive letter like C: e.g. `C:\\path\\to\\your\\node_modules\\touchdesigner-mcp-server\\dist\\index.js`*
|
|
126
|
+
|
|
127
|
+
### 3. Verify Connection
|
|
62
128
|
|
|
63
129
|
If the MCP server is recognized, setup is complete.
|
|
64
|
-
|
|
65
|
-
If you see an error at startup, try launching the agent again after starting TouchDesigner.
|
|
66
|
-
|
|
130
|
+
If it's not recognized, try restarting your AI agent.
|
|
131
|
+
If you see an error at startup, try launching the agent again after starting TouchDesigner first.
|
|
132
|
+
When the API server is running properly in TouchDesigner, the agent can use the provided tools to operate TouchDesigner.
|
|
67
133
|
|
|
68
134
|

|
|
69
135
|
|
|
@@ -106,77 +172,23 @@ Not implemented
|
|
|
106
172
|
|
|
107
173
|
## For Developers
|
|
108
174
|
|
|
109
|
-
### Building
|
|
110
|
-
|
|
111
|
-
1. Clone the repository
|
|
112
|
-
```bash
|
|
113
|
-
git clone https://github.com/8beeeaaat/touchdesigner-mcp.git
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
2. Install dependencies
|
|
117
|
-
```bash
|
|
118
|
-
cd touchdesigner-mcp
|
|
119
|
-
npm install
|
|
120
|
-
```
|
|
121
|
-
3. Set up environment file and build
|
|
122
|
-
```
|
|
123
|
-
# Copy the template and adjust TD_WEB_SERVER_URL as needed
|
|
124
|
-
cp dotenv .env
|
|
125
|
-
|
|
126
|
-
# Build the project (generates API client/server schemas and compiles MCP resources)
|
|
127
|
-
# Make sure the Docker daemon is running before executing this command
|
|
128
|
-
npm run build
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### TouchDesigner Setup
|
|
175
|
+
### Building Client and API Server Code
|
|
132
176
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
- API server code for TouchDesigner WebServer DAT
|
|
177
|
+
1. `cp dotenv .env`
|
|
178
|
+
2. Adjust `TD_WEB_SERVER_HOST` and `TD_WEB_SERVER_PORT` in the `.env` file to match your development environment
|
|
179
|
+
3. Run `make build` or `npm run build` to regenerate the code
|
|
137
180
|
|
|
138
|
-
|
|
139
|
-
Start TouchDesigner and import the `td/mcp_webserver_base.tox` component directly under your project.
|
|
140
|
-
Importing the tox will trigger the `td/import_modules.py` script, which loads modules such as API server controllers.
|
|
181
|
+
When you need to reflect the built code, please restart both the MCP server and TouchDesigner.
|
|
141
182
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
Run
|
|
183
|
+
### Verifying the API Server
|
|
184
|
+
- `npm run test`
|
|
185
|
+
Run unit tests for the MCP server code and integration tests with TouchDesigner.
|
|
145
186
|
You can check communication logs by opening the Textport from the TouchDesigner menu.
|
|
146
187
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
*TIPS*
|
|
150
|
-
`mcp_webserver_base.tox` includes a WebServer DAT configured to link the MCP server and TouchDesigner.
|
|
151
|
-
Ensure this DAT is active and running on the port specified by `TD_WEB_SERVER_URL` in your `.env` file (default: `9981`).
|
|
152
|
-
To change the port:
|
|
153
|
-
1. Change `TD_WEB_SERVER_PORT` in `.env`
|
|
154
|
-
2. Re-run `npm run build`
|
|
155
|
-
3. Change the port in mcp_webserver_base (WebServer DAT) and restart the DAT
|
|
156
|
-
|
|
157
|
-
### Connecting with MCP-compatible AI Agents
|
|
158
|
-
|
|
159
|
-
With TouchDesigner running, configure your AI agent (Cursor, Claude Desktop, VSCode CopilotChat, etc.) to connect to the MCP server.
|
|
160
|
-
|
|
161
|
-
#### Example: Claude Desktop
|
|
162
|
-
```json
|
|
163
|
-
{
|
|
164
|
-
"mcpServers": {
|
|
165
|
-
"dev_touchdesigner": {
|
|
166
|
-
"args": [
|
|
167
|
-
"/path/to/your/touchdesigner-mcp/dist/index.js", // <-- Replace with the absolute path to /dist/index.js after build
|
|
168
|
-
"--stdio"
|
|
169
|
-
],
|
|
170
|
-
"command": "node",
|
|
171
|
-
"transportType": "stdio"
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
*On Windows system, please include the drive letter such as C: e.g. `C:\\path\\to\\your\\touchdesigner-mcp\\dist\\index.js`*
|
|
188
|
+
- `npm run dev`
|
|
189
|
+
Launch @modelcontextprotocol/inspector to debug various features.
|
|
178
190
|
|
|
179
|
-
### Project Structure
|
|
191
|
+
### Project Structure Overview
|
|
180
192
|
|
|
181
193
|
```
|
|
182
194
|
├── src/ # MCP server source code
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import Axios from "axios";
|
|
2
|
-
const API_BASE_URL = process.env.
|
|
3
|
-
export const AXIOS_INSTANCE = Axios.create({
|
|
4
|
-
baseURL: API_BASE_URL,
|
|
5
|
-
});
|
|
2
|
+
const API_BASE_URL = `${process.env.TD_WEB_SERVER_HOST}:${process.env.TD_WEB_SERVER_PORT}`;
|
|
3
|
+
export const AXIOS_INSTANCE = Axios.create(API_BASE_URL ? { baseURL: API_BASE_URL } : {});
|
|
6
4
|
export const customInstance = (config, options) => {
|
|
7
5
|
const source = Axios.CancelToken.source();
|
|
8
6
|
const promise = AXIOS_INSTANCE({
|
|
@@ -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.2.
|
|
6
|
+
* OpenAPI spec version: 0.2.10
|
|
7
7
|
*/
|
|
8
8
|
import { customInstance } from '../../api/customInstance.js';
|
|
9
9
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
@@ -23,7 +23,7 @@ export class ConnectionManager {
|
|
|
23
23
|
this.transport = transport;
|
|
24
24
|
try {
|
|
25
25
|
await this.server.connect(transport);
|
|
26
|
-
this.logger.log(
|
|
26
|
+
this.logger.log(`Server connected and ready to process requests: ${process.env.TD_WEB_SERVER_HOST}:${process.env.TD_WEB_SERVER_PORT}`);
|
|
27
27
|
const connectionResult = await this.checkTDConnection();
|
|
28
28
|
if (!connectionResult.success) {
|
|
29
29
|
throw new Error(`Failed to connect to TouchDesigner: ${connectionResult.error.message}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "touchdesigner-mcp-server",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"description": "MCP server for TouchDesigner",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,26 +17,27 @@
|
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/8beeeaaat/touchdesigner-mcp#readme",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
20
|
+
"@modelcontextprotocol/sdk": "^1.11.1",
|
|
21
21
|
"@mozilla/readability": "^0.6.0",
|
|
22
22
|
"@types/axios": "^0.14.4",
|
|
23
23
|
"@types/ws": "^8.18.1",
|
|
24
24
|
"@types/yargs": "^17.0.33",
|
|
25
25
|
"axios": "^1.9.0",
|
|
26
26
|
"dotenv": "^16.5.0",
|
|
27
|
-
"zod": "^3.24.
|
|
27
|
+
"zod": "^3.24.4"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@biomejs/biome": "1.9.4",
|
|
31
|
+
"@openapitools/openapi-generator-cli": "^2.20.0",
|
|
31
32
|
"@types/jsdom": "^21.1.7",
|
|
32
|
-
"@types/node": "^22.15.
|
|
33
|
-
"@vitest/coverage-v8": "^3.1.
|
|
34
|
-
"msw": "^2.
|
|
33
|
+
"@types/node": "^22.15.17",
|
|
34
|
+
"@vitest/coverage-v8": "^3.1.3",
|
|
35
|
+
"msw": "^2.8.2",
|
|
35
36
|
"mustache": "^4.2.0",
|
|
36
37
|
"npm-run-all": "^4.1.5",
|
|
37
38
|
"orval": "^7.9.0",
|
|
38
39
|
"typescript": "^5.8.3",
|
|
39
|
-
"vitest": "^3.1.
|
|
40
|
+
"vitest": "^3.1.3",
|
|
40
41
|
"yaml": "^2.7.1"
|
|
41
42
|
},
|
|
42
43
|
"type": "module",
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
"test:unit": "vitest run ./tests/unit",
|
|
59
60
|
"coverage": "vitest run --coverage",
|
|
60
61
|
"gen": "run-s gen:*",
|
|
61
|
-
"gen:webserver": "
|
|
62
|
+
"gen:webserver": "openapi-generator-cli generate -i ./src/api/index.yml -g python-flask -o ./td/modules/td_server",
|
|
62
63
|
"gen:handlers": "node td/genHandlers.js",
|
|
63
64
|
"gen:mcp": "orval --config ./orval.config.ts"
|
|
64
65
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
7.
|
|
1
|
+
7.13.0
|