TD-MCP
MCP server + web dashboard for TouchDesigner. Inspect, optimize, and control TD patches from Claude Code or the browser.
README
TD-MCP
MCP server + web dashboard for TouchDesigner. Inspect, optimize, and control TD patches from Claude Code or the browser.
Claude Code <--MCP(stdio)--> td-mcp server <--HTTP--> TD WebServer DAT (port 9981)
|
Web Dashboard (:8080)
Features
22 MCP tools across 4 groups:
| Group | Tools |
|---|---|
| Inspect | List ops, trace signal flow, read CHOP channels, read/set params |
| Optimize | Cook time stats, find hotspots, find unused ops, suggest fixes |
| Cleanup | Find bypassed ops, delete dead ops (dry-run default), validate network |
| Templates | 5 CHOP recipes, DAW mapping generator (OSC + MIDI CC) |
Web dashboard (FastAPI + htmx):
- Live connection status
- Network health overview
- Cook time hotspot visualization
- Recipe browser with script preview
- Cleanup tool with dry-run
- Script runner with safety validation
Built-in CHOP recipes:
audio_reactive_basic-- audio in > RMS > lag > math > nullaudio_fft_bands-- FFT > split low/mid/high bandslfo_modulator-- LFO with range mappingmidi_cc_mapper-- MIDI CC > smooth > range > outputosc_receiver-- OSC input for Bitwig/Ableton sync
Install
pip install -e ".[dev]"
Requires Python 3.10+.
Usage
MCP Server (for Claude Code)
td-mcp
Add to your Claude Code MCP config:
{
"mcpServers": {
"td-mcp": {
"command": "td-mcp",
"args": []
}
}
}
Web Dashboard
td-mcp-web
Opens at http://localhost:8080. Dark-themed, auto-polls TD status every 5s.
Or run directly:
uvicorn td_mcp.web:app --port 8080 --app-dir src
Tests
pytest
26 tests covering client, server, tools, safety, models.
TouchDesigner Setup
On the TD machine (Luci's side):
- Create a WebServer DAT in your project
- Set Port to
9981 - Paste the contents of
td/webserver_callbacks.pyinto the DAT's callbacks - Toggle Active ON
That's it. The MCP server and web dashboard connect to this endpoint.
Safety
All scripts executed in TD go through safety.py which blocks:
- File I/O, network, subprocess imports
eval/exec/compile/__import__/run- Dunder attribute access (
__class__,__globals__, etc.) - Encoding bypass attempts (hex/unicode/octal escapes,
chr/ord) - Max 10,000 chars per script
Project Structure
td-mcp/
src/td_mcp/
server.py # FastMCP server -- 22 tools via stdio
web.py # FastAPI web dashboard
td_client.py # Async HTTP client to TD WebServer DAT
safety.py # Script validator
models.py # Pydantic models
tools/
inspect.py # List ops, trace signal flow, read CHOPs
optimize.py # Cook time hotspots, find unused/dead-end ops
cleanup.py # Delete dead ops (dry-run default), validate network
templates.py # 5 built-in CHOP recipes + DAW mapping generator
td/
webserver_callbacks.py # Drop-in for TD's WebServer DAT
tests/
test_models.py
test_safety.py
test_server.py
test_td_client.py
test_tools.py
pyproject.toml
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.