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.0.tar.gz (51.1 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.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for td_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7bc3a31684907f25d6d945d97db09f7ede37b6c29bffca5eafbf9aefa26c2074
MD5 cdcebf47a7c1b8440d87a75f22c0ab77
BLAKE2b-256 55ae0dbc9f3504537ea22b195c637559a2a96639fcd92c8cc9606df370e50d5c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for td_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d03f4b8b071adf87e918d41fc3f1e373344de1f1f560e3777488c87a8eecb414
MD5 42e0f54a735bf966506d71a6f67bcf5f
BLAKE2b-256 7bc3b4730e10f861b5f63674e1cbd261448dfcccd53ddab7b9d09a5e90e833c2

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