touchdesigner-mcp-server 0.2.9 → 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 CHANGED
@@ -19,18 +19,20 @@ TouchDesigner MCPは、AIモデルとTouchDesigner WebServer DAT 間のブリッ
19
19
 
20
20
  #### 方法1: Dockerイメージを利用(推奨)
21
21
 
22
+ [![tutorial](https://github.com/8beeeaaat/touchdesigner-mcp/blob/main/assets/tutorial_docker.png)](https://www.youtube.com/watch?v=BRWoIEVb0TU)
23
+
22
24
  ##### 1. リポジトリをクローン:
23
25
  ```bash
24
26
  git clone https://github.com/8beeeaaat/touchdesigner-mcp.git
25
27
  cd touchdesigner-mcp
26
28
  ```
27
29
 
28
- ##### 2. 環境設定ファイルの設置とビルド
29
- .envのテンプレートファイルをコピーし、必要に応じて TD_WEB_SERVER_URL を調整してから Dockerイメージをビルドしてください。
30
+ ##### 2. 環境設定ファイルの設置とコードのビルド
31
+ .envのテンプレートファイルをコピーし、必要に応じて TD_WEB_SERVER_HOST / TD_WEB_SERVER_PORT を調整してから Dockerイメージをビルドしてください。
30
32
 
31
33
  ```bash
32
34
  cp dotenv .env
33
- docker-compose build
35
+ make build
34
36
  ```
35
37
 
36
38
  ##### 3. TouchDesigner プロジェクトにMCP連携用のAPIサーバーを設置
@@ -46,25 +48,39 @@ TouchDesigner のメニューから Textportを起動してサーバーの起動
46
48
 
47
49
  ![import](https://github.com/8beeeaaat/touchdesigner-mcp/blob/main/assets/textport.png)
48
50
 
49
- ##### 4. AIエージェントがDockerコンテナを使用するように設定して起動:
51
+ #### 4. MCPサーバーのコンテナを起動
52
+
53
+ ```bash
54
+ docker-compose up -d
55
+ ```
56
+
57
+ ##### 5. AIエージェントがDockerコンテナを使用するように設定して起動:
50
58
 
51
59
  *例 Claude Desktop*
52
60
  ```json
53
61
  {
54
62
  "mcpServers": {
55
63
  "touchdesigner": {
64
+ "command": "docker",
56
65
  "args": [
57
- "run",
58
- "--rm",
66
+ "compose",
67
+ "-f",
68
+ "/path/to/your/touchdesigner-mcp/docker-compose.yml",
69
+ "exec",
59
70
  "-i",
60
71
  "touchdesigner-mcp-server",
61
- ],
62
- "command": "docker"
72
+ "node",
73
+ "dist/index.js",
74
+ "--stdio"
75
+ ]
63
76
  }
64
77
  }
65
78
  }
66
79
  ```
67
80
 
81
+ *Windows環境では C:\\ の様にドライブレターを含めてください。 例. `C:\\path\\to\\your\\touchdesigner-mcp\\docker-compose.yml`*
82
+
83
+
68
84
  #### 方法2: NPMパッケージ を利用する
69
85
 
70
86
  Node.jsから直接ビルド済みのjsを利用する場合は、以下の手順に従います:
@@ -159,8 +175,8 @@ TouchDesigner で APIサーバーが実行されていれば、エージェン
159
175
  ### クライアント・APIサーバーコードのビルド
160
176
 
161
177
  1. `cp dotenv .env`
162
- 2. `.env` ファイルの `TD_WEB_SERVER_URL` を開発環境に合わせて変更
163
- 3. `docker-compose build` もしくは `npm run build` を実行してコードを再生成する
178
+ 2. `.env` ファイルの `TD_WEB_SERVER_HOST`, `TD_WEB_SERVER_PORT` を開発環境に合わせて変更
179
+ 3. `make build` もしくは `npm run build` を実行してコードを再生成する
164
180
 
165
181
  ビルドしたコードを再反映する場合は MCPサーバーと TouchDesigner を再起動してください
166
182
 
package/README.md CHANGED
@@ -19,6 +19,8 @@ TouchDesigner MCP acts as a bridge between AI models and the TouchDesigner WebSe
19
19
 
20
20
  #### Method 1: Using Docker Image (Recommended)
21
21
 
22
+ [![tutorial](https://github.com/8beeeaaat/touchdesigner-mcp/blob/main/assets/tutorial_docker.png)](https://www.youtube.com/watch?v=BRWoIEVb0TU)
23
+
22
24
  ##### 1. Clone the repository:
23
25
  ```bash
24
26
  git clone https://github.com/8beeeaaat/touchdesigner-mcp.git
@@ -26,11 +28,11 @@ cd touchdesigner-mcp
26
28
  ```
27
29
 
28
30
  ##### 2. Set up the environment file and build:
29
- Copy the template file and adjust the TD_WEB_SERVER_URL as needed before building the Docker image.
31
+ Copy the template file and adjust the TD_WEB_SERVER_HOST and TD_WEB_SERVER_PORT as needed before building the Docker image.
30
32
 
31
33
  ```bash
32
34
  cp dotenv .env
33
- docker-compose build
35
+ make build
34
36
  ```
35
37
 
36
38
  ##### 3. Install the API Server in Your TouchDesigner Project:
@@ -46,25 +48,38 @@ You can check boot logs by opening the Textport from the TouchDesigner menu.
46
48
 
47
49
  ![import](https://github.com/8beeeaaat/touchdesigner-mcp/blob/main/assets/textport.png)
48
50
 
49
- ##### 4. Configure your AI agent to use the Docker container:
51
+ ##### 4. Start the MCP server container
52
+
53
+ ```bash
54
+ docker-compose up -d
55
+ ```
56
+
57
+ ##### 5. Configure your AI agent to use the Docker container:
50
58
 
51
59
  *Example for Claude Desktop*
52
60
  ```json
53
61
  {
54
62
  "mcpServers": {
55
63
  "touchdesigner": {
64
+ "command": "docker",
56
65
  "args": [
57
- "run",
58
- "--rm",
66
+ "compose",
67
+ "-f",
68
+ "/path/to/your/touchdesigner-mcp/docker-compose.yml",
69
+ "exec",
59
70
  "-i",
60
- "touchdesigner-mcp-server"
61
- ],
62
- "command": "docker"
71
+ "touchdesigner-mcp-server",
72
+ "node",
73
+ "dist/index.js",
74
+ "--stdio"
75
+ ]
63
76
  }
64
77
  }
65
78
  }
66
79
  ```
67
80
 
81
+ *On Windows systems, include the drive letter like C: e.g. `C:\\path\\to\\your\\touchdesigner-mcp\\docker-compose.yml`*
82
+
68
83
  #### Method 2: Using the NPM Package
69
84
 
70
85
  To use the pre-built JS directly from Node.js:
@@ -160,8 +175,8 @@ Not implemented
160
175
  ### Building Client and API Server Code
161
176
 
162
177
  1. `cp dotenv .env`
163
- 2. Adjust `TD_WEB_SERVER_URL` in the `.env` file to match your development environment
164
- 3. Run `docker-compose build` or `npm run build` to regenerate the code
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
165
180
 
166
181
  When you need to reflect the built code, please restart both the MCP server and TouchDesigner.
167
182
 
@@ -173,14 +188,6 @@ You can check communication logs by opening the Textport from the TouchDesigner
173
188
  - `npm run dev`
174
189
  Launch @modelcontextprotocol/inspector to debug various features.
175
190
 
176
- *TIPS*
177
- `mcp_webserver_base.tox` includes a WebServer DAT configured to link the MCP server and TouchDesigner.
178
- Ensure this DAT is active and running on the port specified by `TD_WEB_SERVER_URL` in your `.env` file (default: `9981`).
179
- To change the port:
180
- 1. Change `TD_WEB_SERVER_PORT` in `.env`
181
- 2. Run `docker-compose build` or `npm run build` to regenerate client code
182
- 3. Change the port in mcp_webserver_base (WebServer DAT) and restart the DAT
183
-
184
191
  ### Project Structure Overview
185
192
 
186
193
  ```
@@ -1,5 +1,5 @@
1
1
  import Axios from "axios";
2
- const API_BASE_URL = process.env.TD_WEB_SERVER_URL;
2
+ const API_BASE_URL = `${process.env.TD_WEB_SERVER_HOST}:${process.env.TD_WEB_SERVER_PORT}`;
3
3
  export const AXIOS_INSTANCE = Axios.create(API_BASE_URL ? { baseURL: API_BASE_URL } : {});
4
4
  export const customInstance = (config, options) => {
5
5
  const source = Axios.CancelToken.source();
@@ -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.9
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
@@ -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.9
6
+ * OpenAPI spec version: 0.2.10
7
7
  */
8
8
  import { z as zod } from 'zod';
9
9
  /**
@@ -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("Server connected and ready to process requests");
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}`);
@@ -18,7 +18,7 @@ export class TouchDesignerServer {
18
18
  constructor() {
19
19
  this.server = new McpServer({
20
20
  name: "TouchDesigner",
21
- version: "0.2.9",
21
+ version: "0.2.10",
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.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "MCP server for TouchDesigner",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,27 +17,27 @@
17
17
  },
18
18
  "homepage": "https://github.com/8beeeaaat/touchdesigner-mcp#readme",
19
19
  "dependencies": {
20
- "@modelcontextprotocol/sdk": "^1.10.2",
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.3"
27
+ "zod": "^3.24.4"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@biomejs/biome": "1.9.4",
31
31
  "@openapitools/openapi-generator-cli": "^2.20.0",
32
32
  "@types/jsdom": "^21.1.7",
33
- "@types/node": "^22.15.3",
34
- "@vitest/coverage-v8": "^3.1.2",
35
- "msw": "^2.7.5",
33
+ "@types/node": "^22.15.17",
34
+ "@vitest/coverage-v8": "^3.1.3",
35
+ "msw": "^2.8.2",
36
36
  "mustache": "^4.2.0",
37
37
  "npm-run-all": "^4.1.5",
38
38
  "orval": "^7.9.0",
39
39
  "typescript": "^5.8.3",
40
- "vitest": "^3.1.2",
40
+ "vitest": "^3.1.3",
41
41
  "yaml": "^2.7.1"
42
42
  },
43
43
  "type": "module",
@@ -2,7 +2,7 @@ openapi: 3.0.0
2
2
  info:
3
3
  description: OpenAPI schema for generating TouchDesigner API client code
4
4
  title: TouchDesigner API
5
- version: 0.2.9
5
+ version: 0.2.10
6
6
  servers:
7
7
  - url: "{baseUrl}"
8
8
  variables: