@dpantani/tdmcp 0.4.0 → 0.6.1

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.md CHANGED
@@ -2,7 +2,11 @@
2
2
 
3
3
  [![CI](https://github.com/Pantani/tdmcp/actions/workflows/ci.yml/badge.svg)](https://github.com/Pantani/tdmcp/actions/workflows/ci.yml)
4
4
  [![Docs](https://github.com/Pantani/tdmcp/actions/workflows/docs.yml/badge.svg)](https://pantani.github.io/tdmcp/)
5
+ [![npm version](https://img.shields.io/npm/v/@dpantani/tdmcp?logo=npm&color=cb3837)](https://www.npmjs.com/package/@dpantani/tdmcp)
6
+ [![Node.js](https://img.shields.io/node/v/@dpantani/tdmcp?logo=nodedotjs&color=339933)](https://nodejs.org)
7
+ [![MCP server](https://img.shields.io/badge/MCP-server-000?logo=modelcontextprotocol&logoColor=white)](https://modelcontextprotocol.io)
5
8
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
9
+ [![tdmcp MCP server](https://glama.ai/mcp/servers/Pantani/tdmcp/badges/score.svg)](https://glama.ai/mcp/servers/Pantani/tdmcp)
6
10
 
7
11
  **tdmcp is a [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server
8
12
  for [TouchDesigner](https://derivative.ca)** — build TouchDesigner from plain
@@ -34,9 +38,10 @@ Full guides and reference live on the **docs site → <https://pantani.github.io
34
38
  | [What is tdmcp?](https://pantani.github.io/tdmcp/guide/what-is-tdmcp) | [Architecture](https://pantani.github.io/tdmcp/reference/architecture) |
35
39
  | [Install (no terminal)](https://pantani.github.io/tdmcp/guide/install) | [Tools reference](https://pantani.github.io/tdmcp/reference/tools) |
36
40
  | [Your first visual](https://pantani.github.io/tdmcp/guide/first-visual) | [Environment variables](https://pantani.github.io/tdmcp/reference/environment) |
37
- | [Prompt cookbook](https://pantani.github.io/tdmcp/guide/prompt-cookbook) | [CLI & local copilot](https://pantani.github.io/tdmcp/reference/cli) |
38
- | [Recipe gallery](https://pantani.github.io/tdmcp/guide/recipes) | [Bridge & REST API](https://pantani.github.io/tdmcp/reference/bridge-api) |
39
- | [Troubleshooting](https://pantani.github.io/tdmcp/guide/troubleshooting) | [Roadmap](docs/ROADMAP.md) · [Deployment](docs/DEPLOYMENT.md) |
41
+ | [Shader Park](https://pantani.github.io/tdmcp/guide/shader-park) | [CLI & local copilot](https://pantani.github.io/tdmcp/reference/cli) |
42
+ | [Prompt cookbook](https://pantani.github.io/tdmcp/guide/prompt-cookbook) | [Bridge & REST API](https://pantani.github.io/tdmcp/reference/bridge-api) |
43
+ | [Recipe gallery](https://pantani.github.io/tdmcp/guide/recipes) | [Roadmap](docs/ROADMAP.md) |
44
+ | [Troubleshooting](https://pantani.github.io/tdmcp/guide/troubleshooting) | [Deployment](docs/DEPLOYMENT.md) |
40
45
 
41
46
  🇧🇷 **Documentação em português:** <https://pantani.github.io/tdmcp/pt/>
42
47
 
@@ -66,7 +71,7 @@ Three pieces talk to each other on your computer:
66
71
 
67
72
  Node.js is only needed for the build-from-source path (**[Node 20+](https://nodejs.org)**).
68
73
  The one-click Claude Desktop extension needs nothing extra — the server is bundled
69
- inside the `.dxt`.
74
+ inside the `.mcpb` (formerly `.dxt`; legacy `.dxt` files still install).
70
75
 
71
76
  ## Get started
72
77
 
@@ -77,16 +82,16 @@ You set up **two sides**: your **AI** (so it gets the tdmcp tools) and
77
82
  **Cursor**? Paste this one message in:
78
83
 
79
84
  ```text
80
- Install and connect tdmcp for me by reading and following
81
- https://raw.githubusercontent.com/Pantani/tdmcp/main/tdmcp-install-prompt.md
85
+ Install and connect tdmcp for me using the official install guide:
86
+ https://pantani.github.io/tdmcp/guide/install
82
87
  Do every step yourself; only stop when you need me to paste one line into TouchDesigner.
83
88
  ```
84
89
 
85
90
  It clones, builds and wires everything up; the only manual step is pasting one
86
91
  line into TouchDesigner (Step 2 below).
87
92
 
88
- **🟢 Claude Desktop — one-click `.dxt` (no terminal, no Node).** Download
89
- **[tdmcp.dxt](https://github.com/Pantani/tdmcp/releases/latest/download/tdmcp.dxt)**,
93
+ **🟢 Claude Desktop — one-click `.mcpb` (no terminal, no Node).** Download
94
+ **[tdmcp.mcpb](https://github.com/Pantani/tdmcp/releases/latest/download/tdmcp.mcpb)**,
90
95
  then in Claude Desktop open **Settings → Extensions** and install it (drag it in or
91
96
  **Install from file**). Leave host/port at `127.0.0.1` / `9980`. Full walkthrough:
92
97
  [the install guide](https://pantani.github.io/tdmcp/guide/install).
@@ -105,7 +110,7 @@ Open TouchDesigner, open the **Textport** (`Dialogs → Textport and DATs`), pas
105
110
  this **one line** and press Enter:
106
111
 
107
112
  ```python
108
- import urllib.request; exec(urllib.request.urlopen("https://raw.githubusercontent.com/Pantani/tdmcp/main/td/bootstrap.py").read().decode())
113
+ import urllib.request; exec(urllib.request.urlopen("https://github.com/Pantani/tdmcp/raw/main/td/bootstrap.py").read().decode())
109
114
  ```
110
115
 
111
116
  You should see `[tdmcp] bridge running on port 9980 (/project1/tdmcp_bridge)`. ✅
@@ -131,7 +136,7 @@ the [prompt cookbook](https://pantani.github.io/tdmcp/guide/prompt-cookbook).
131
136
 
132
137
  ## What you can do
133
138
 
134
- **102+ tools** across three layers, plus an Obsidian vault integration — from
139
+ **179 tools** across three layers, plus library/packaging and Obsidian vault integrations — from
135
140
  one-line artist generators (`create_feedback_network`, `create_audio_reactive`,
136
141
  `create_particle_system`, `create_generative_art`, …) to building blocks
137
142
  (`create_control_panel`, `animate_parameter`, `create_external_io` for
@@ -278,9 +278,9 @@ declare const RecipeSchema: z.ZodObject<{
278
278
  node: z.ZodString;
279
279
  name: z.ZodString;
280
280
  kind: z.ZodDefault<z.ZodEnum<{
281
+ color: "color";
281
282
  float: "float";
282
283
  vec: "vec";
283
- color: "color";
284
284
  }>>;
285
285
  value: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>;
286
286
  label: z.ZodOptional<z.ZodString>;
@@ -441,6 +441,26 @@ declare class TouchDesignerClient {
441
441
  outputs?: string[] | undefined;
442
442
  family?: string | undefined;
443
443
  errors?: string[] | undefined;
444
+ flags?: {
445
+ bypass?: boolean | undefined;
446
+ render?: boolean | undefined;
447
+ display?: boolean | undefined;
448
+ lock?: boolean | undefined;
449
+ allowCooking?: boolean | undefined;
450
+ cloneImmune?: boolean | undefined;
451
+ is_clone?: boolean | undefined;
452
+ clone?: string | null | undefined;
453
+ } | undefined;
454
+ wires_in?: {
455
+ in_index: number | null;
456
+ from: string;
457
+ out_index: number;
458
+ }[] | undefined;
459
+ nodeX?: number | undefined;
460
+ nodeY?: number | undefined;
461
+ comment?: string | undefined;
462
+ color?: number[] | undefined;
463
+ tags?: string[] | undefined;
444
464
  }>;
445
465
  updateNodeParameters(path: string, parameters: Record<string, unknown>): Promise<{
446
466
  path: string;
@@ -452,6 +472,26 @@ declare class TouchDesignerClient {
452
472
  outputs?: string[] | undefined;
453
473
  family?: string | undefined;
454
474
  errors?: string[] | undefined;
475
+ flags?: {
476
+ bypass?: boolean | undefined;
477
+ render?: boolean | undefined;
478
+ display?: boolean | undefined;
479
+ lock?: boolean | undefined;
480
+ allowCooking?: boolean | undefined;
481
+ cloneImmune?: boolean | undefined;
482
+ is_clone?: boolean | undefined;
483
+ clone?: string | null | undefined;
484
+ } | undefined;
485
+ wires_in?: {
486
+ in_index: number | null;
487
+ from: string;
488
+ out_index: number;
489
+ }[] | undefined;
490
+ nodeX?: number | undefined;
491
+ nodeY?: number | undefined;
492
+ comment?: string | undefined;
493
+ color?: number[] | undefined;
494
+ tags?: string[] | undefined;
455
495
  }>;
456
496
  executePythonScript(script: string, returnOutput?: boolean): Promise<{
457
497
  result?: unknown;
@@ -514,6 +554,71 @@ declare class TouchDesignerClient {
514
554
  total_cook_time_ms?: number | undefined;
515
555
  gpu_memory_mb?: number | undefined;
516
556
  }>;
557
+ connectNodes(sourcePath: string, targetPath: string, sourceOutput?: number, targetInput?: number): Promise<{
558
+ source_path: string;
559
+ target_path: string;
560
+ source_output: number;
561
+ connected: boolean;
562
+ requested_input?: number | undefined;
563
+ actual_input?: number | undefined;
564
+ }>;
565
+ disconnectNodes(toPath: string, fromPath?: string, toInput?: number): Promise<{
566
+ to_path: string;
567
+ removed: {
568
+ input: number;
569
+ from: string;
570
+ }[];
571
+ warnings: string[];
572
+ from_path?: string | null | undefined;
573
+ to_input?: number | null | undefined;
574
+ }>;
575
+ readParameterModes(path: string, keys?: string[], nonDefaultOnly?: boolean): Promise<{
576
+ path: string;
577
+ type: string;
578
+ name: string;
579
+ parameters: {
580
+ name: string;
581
+ mode: string;
582
+ value?: unknown;
583
+ expr?: string | undefined;
584
+ bind_expr?: string | undefined;
585
+ export_op?: string | undefined;
586
+ }[];
587
+ warnings: string[];
588
+ }>;
589
+ setParameterMode(path: string, param: string, mode: string, expr?: string, value?: unknown): Promise<{
590
+ path: string;
591
+ param: string;
592
+ mode: string;
593
+ readback_mode: string;
594
+ readback_expr: string;
595
+ }>;
596
+ getDatText(path: string): Promise<{
597
+ path: string;
598
+ text: string;
599
+ is_table: boolean;
600
+ num_rows: number;
601
+ num_cols: number;
602
+ }>;
603
+ putDatText(path: string, text: string): Promise<{
604
+ path: string;
605
+ old_length: number;
606
+ new_length: number;
607
+ }>;
608
+ getLogs(severity?: string, maxLines?: number, scope?: string): Promise<{
609
+ lines: {
610
+ source: string;
611
+ message: string;
612
+ severity: string;
613
+ type: string;
614
+ absframe?: number | undefined;
615
+ frame?: number | undefined;
616
+ }[];
617
+ count: number;
618
+ available: boolean;
619
+ warnings: string[];
620
+ error_dat?: string | undefined;
621
+ }>;
517
622
  }
518
623
 
519
624
  /** Shared dependencies injected into every tool handler (keeps handlers testable). */
@@ -529,6 +634,11 @@ interface ToolContext {
529
634
  * allowed (the default); only an explicit `false` locks them out.
530
635
  */
531
636
  allowRawPython?: boolean;
637
+ /**
638
+ * Tool exposure profile. `"safe"` hides destructive/raw-code tools.
639
+ * Undefined means `"full"` (the default).
640
+ */
641
+ toolProfile?: "full" | "safe";
532
642
  }
533
643
 
534
644
  declare const ConfigSchema: z.ZodObject<{
@@ -555,6 +665,10 @@ declare const ConfigSchema: z.ZodObject<{
555
665
  on: "on";
556
666
  off: "off";
557
667
  }>>;
668
+ toolProfile: z.ZodDefault<z.ZodEnum<{
669
+ full: "full";
670
+ safe: "safe";
671
+ }>>;
558
672
  bridgeToken: z.ZodOptional<z.ZodString>;
559
673
  llmBaseUrl: z.ZodDefault<z.ZodString>;
560
674
  llmModel: z.ZodDefault<z.ZodString>;
@@ -577,6 +691,10 @@ declare function runCli(argv: string[], opts?: RunCliOptions): Promise<CliResult
577
691
  interface RunWatchOptions {
578
692
  config?: TdmcpConfig;
579
693
  includeHighFrequency?: boolean;
694
+ /** Only emit events whose `type` is in this list (e.g. ["beat","onset"]). */
695
+ filter?: string[];
696
+ /** Drop events whose `type` is in this list (e.g. ["timeline.frame"]). */
697
+ exclude?: string[];
580
698
  /** Where each event line goes; defaults to stdout. Overridable for tests. */
581
699
  write?: (line: string) => void;
582
700
  /** Inject a stream factory for tests; defaults to a real `TdEventStream`. */