用途:让智能体通过 twozero MCP 控制正在运行的 TouchDesigner(TD)实例,创建算子、设置参数、连线、执行 Python 并构建实时视觉。架构为 Hermes Agent → MCP(Streamable HTTP)→ twozero.tox(端口 40404)→ TD Python,共 36 个原生工具,插件免费,仅本地通信。
主要能力:核心工具包括 td_execute_python(在 TD 中运行任意 Python)、td_create_operator(建节点并自动定位)、td_set_operator_pars(安全设参)、td_get_operator_info、td_get_network、td_get_errors、td_get_par_info、td_get_hints、td_get_focus;读写类有 td_read_dat、td_write_dat、td_read_chop、td_read_textport;视觉类有 td_get_screenshot、td_get_screenshots、td_get_screen_screenshot、td_navigate_to;搜索类有 td_find_op、td_search;系统类有 td_get_perf、td_list_instances、td_get_docs、td_agents_md、td_reinit_extension、td_clear_textport;输入自动化有 td_input_execute、td_input_status、td_input_clear、td_op_screen_rect、td_click_screen_point、td_screen_point_to_global。另有 4 个管理/开发工具(td_project_quit、td_test_session、td_dev_log、td_clear_dev_log)。
使用方式:运行 setup.sh 自动检查 TD、下载 twozero.tox、写入 Hermes 配置并测试连接;手动步骤为把 .tox 拖入 TD 网络编辑器点击 Install、在 twozero 设置中启用 MCP 自动启动、重启 Hermes 会话。验证命令:nc -z 127.0.0.1 40404 && echo "twozero MCP: READY"。工作流建议先发现(td_get_par_info、td_get_hints、td_get_focus、td_get_network),再清理与创建分两次调用,然后设参、连线、用 td_get_errors 与 td_get_perf 验证、截图或录制。
限制:非商业版 TD 分辨率上限 1280×1280,需用 outputresolution='custom';H.264/H.265/AV1 需商业许可,macOS 优先 prores,回退 mjpa。不要猜测参数名,先调用 td_get_par_info;脚本回调用相对路径;MCP 仅监听 localhost 且无认证,td_execute_python 拥有 TD 进程用户的完整文件系统权限。其余细节暂未提供。