td-mcp

td-mcp

A token-efficient MCP server for driving TouchDesigner from AI assistants, enabling building whole node networks in one call, searching CHOP channels by glob, inspecting operators compactly, and taking screenshots of TOPs.

Category
访问服务器

README

td-mcp

A lean, token-efficient MCP server for driving TouchDesigner from AI assistants like Claude.

Build whole node networks in one call, search CHOP channels by glob, inspect operators compactly, and screenshot any TOP so the assistant can see what it built. Battle-tested by building audio-reactive and hand-tracking projects end to end.

Why another TouchDesigner MCP?

Compared to a conventional per-node tool surface, td-mcp is designed to minimize round trips and context tokens:

  • td_build - create a whole network (operators + parameters + expressions + wires) in ONE call.
  • td_find_channels - glob-search every CHOP in the project (e.g. *pinch*) instead of dumping node trees.
  • td_get - returns only NON-default parameters.
  • td_screenshot - saves any TOP to PNG for visual verification.
  • td_ensure_cook - one call installs a per-frame force-cook (fixes the classic "GLSL/feedback network renders once then freezes" gotcha).
  • Wrong parameter names return close-match suggestions instead of bare errors.
  • Operator paths self-locate by name if the exact path moved.
  • One-line tool descriptions - tool schemas are loaded into every session, so short docs are cheaper.

Architecture

Claude / MCP client
   |  stdio (MCP)
server.py  (Python, FastMCP)
   |  HTTP POST 127.0.0.1:9980/api  (JSON)
TouchDesigner: /project1/td_mcp
   |- webserver   (Web Server DAT, port 9980)
   |- callbacks   (Text DAT - HTTP handler)
   |- dispatcher  (Text DAT - 16 command handlers, TD Python API)

The bridge is installed by script (no .tox drag-drop): re-runnable, self-healing, and the DAT contents always match the repo sources.

Setup

Requirements: uv, TouchDesigner (any recent build; tested on 2025.3x macOS).

  1. Clone and install:

    git clone https://github.com/YOURNAME/td-mcp && cd td-mcp && uv sync
    
  2. Install the bridge inside TouchDesigner - open the textport (Alt+T / Option+T) and run (adjust the path to your clone):

    exec(open('/path/to/td-mcp/td/install_bridge.py').read())
    

    Verify from a terminal: curl -s http://127.0.0.1:9980/api -d '{"cmd":"status"}'

  3. Register the server with your MCP client. For Claude Code, in .mcp.json:

    {
      "mcpServers": {
        "td": {
          "command": "uv",
          "args": ["--directory", "/path/to/td-mcp", "run", "python", "server.py"]
        }
      }
    }
    
  4. Restart the client and ask it to td_status.

Tools

Tool Purpose
td_status TD + bridge status
td_build whole network in one call (ops, params, exprs, wires)
td_create / td_delete single operator create / delete
td_set set params; {"expr": ...} for expressions, "PULSE" to pulse
td_connect wire two operators
td_get / td_list compact inspection
td_find_channels glob-search CHOP channels project-wide
td_read_chop live channel values
td_ensure_cook per-frame force-cook (anti-freeze)
td_screenshot save a TOP to PNG
td_save / td_load_tox save project / load a .tox
td_errors all erroring operators under a path
td_exec escape hatch: run Python inside TD

Field notes (learned the hard way)

  • TD's Python open() defaults to ASCII - the bridge sources are pure ASCII.
  • ParMode is not on the td module inside DAT modules; the dispatcher uses type(par.mode).EXPRESSION instead (version-proof).
  • Feedback TOPs need an actual input connection, not just a Target TOP.
  • COMP-to-COMP wiring requires matching connector families (a CHOP output cannot feed a DAT input) - check outputConnectors[i].outOP types.
  • After building feedback networks, pulse resetpulse once to flush any pre-expression frames the loop may have latched.

Credits

Bridge-over-Web-Server-DAT architecture inspired by 8beeeaaat/touchdesigner-mcp.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选