Skip to main content

MCP server for controlling TouchDesigner from AI coding agents

Project description

td-mcp

MCP (Model Context Protocol) server for controlling TouchDesigner from AI coding agents like Claude Code and Codex CLI.

Setup

1. TouchDesigner Side

  1. Create a WebServer DAT
  2. Set Port to 9980
  3. Paste the contents of td_bridge/webserver_callbacks.py into the WebServer DAT callbacks
  4. Toggle Active ON

2. Agent Side

Claude Code (.mcp.json)

{
  "mcpServers": {
    "touchdesigner": {
      "command": "uvx",
      "args": ["td-mcp"],
      "env": {
        "TD_HOST": "127.0.0.1",
        "TD_PORT": "9980"
      }
    }
  }
}

Local Development (before PyPI publish)

{
  "mcpServers": {
    "touchdesigner": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/td-mcp", "python", "-m", "td_mcp"],
      "env": {
        "TD_HOST": "127.0.0.1",
        "TD_PORT": "9980"
      }
    }
  }
}

Codex CLI

codex mcp add touchdesigner \
  --env TD_HOST=127.0.0.1 \
  --env TD_PORT=9980 \
  -- uvx td-mcp

Tools

Tool Description
td_get_root Get project root path (call first)
td_create_op Create an operator
td_delete_op Delete an operator
td_list_ops List child operators
td_get_op_info Get operator info
td_set_params Set parameters (batch)
td_get_params Get parameters (with schema discovery)
td_connect Connect operators
td_disconnect Disconnect operators
td_find_empty_space Find empty space in network editor
td_execute Execute Python code in TD
td_get_screenshot Capture TOP screenshot

Environment Variables

Variable Default Description
TD_HOST 127.0.0.1 TouchDesigner host
TD_PORT 9980 WebServer DAT port
TD_TIMEOUT 10.0 Request timeout (seconds)

Architecture

AI Agent → MCP Server (stdio) → HTTP Client → TouchDesigner WebServer DAT

Security Note

td_execute allows arbitrary Python execution inside TouchDesigner. Use only in trusted local environments.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

td_mcp-0.1.2.tar.gz (51.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

td_mcp-0.1.2-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file td_mcp-0.1.2.tar.gz.

File metadata

  • Download URL: td_mcp-0.1.2.tar.gz
  • Upload date:
  • Size: 51.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for td_mcp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e83823b1c6a06c8b46f8b7b023a7d1507c5025d1765eef16ea3ee750b35f0b18
MD5 46171f80ffcb5164aa63c93b73d580fa
BLAKE2b-256 815b52d5ff7f15e30b8d319c4403c17fbfb19ee8ea3cf7c084caeabeff1a8350

See more details on using hashes here.

File details

Details for the file td_mcp-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: td_mcp-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for td_mcp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 27c170eedd31d14375a326cc3c74ff68f4121104cde00438afdf4caa234ef24a
MD5 db9e38a754c465c6551a6f9190f406ba
BLAKE2b-256 1084cad342762f41322db5109958f6c269c338267aef8d09007f5c67044c8699

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page