TouchDesigner AI Companion
Enables users to capture TouchDesigner node network screenshots and ask Claude for context-aware analysis, diagnosis, and suggestions via MCP tools.
README
TouchDesigner AI Companion
A local desktop tool that captures your TouchDesigner node network via hotkey, sends the screenshot to Claude (with vision + function calling), and returns targeted, context-aware answers about your patches — with full session memory and Langfuse observability.
Stack
| Layer | Tool |
|---|---|
| Language | Python 3.11+ |
| Screenshot | mss + Pillow |
| Hotkey listener | pynput |
| MCP server | mcp Python SDK (FastMCP) |
| LLM | Claude Sonnet 4 (claude-sonnet-4-20250514) |
| Observability | Langfuse |
| Session storage | SQLite |
How to run
# 1. Clone and enter the project
git clone <repo-url> td-companion
cd td-companion
# 2. Install dependencies
pip install -r requirements.txt
# 3. Set your API keys
cp .env.example .env
# Edit .env with your ANTHROPIC_API_KEY and Langfuse keys
# 4. Launch
python main.py
# 5. Focus your TouchDesigner window, press Ctrl+Shift+T,
# type your question, and get an answer.
macOS: Grant Accessibility permissions to your terminal app when prompted by
pynput.
How it works
- Hotkey → Screenshot — Pressing
Ctrl+Shift+Ttriggersmssto capture your full screen. The PNG bytes are held in memory and sent to Claude as a base64 image. - Claude with function calling — The image + question + full session history are sent to Claude Sonnet 4. Claude can invoke four MCP-defined tools (
analyze_network,suggest_next_node,diagnose_problem,explain_node) by extracting what it sees in the screenshot and routing the question to the right analytical frame. - Session persistence + observability — Every turn (user question + assistant answer) is saved to a local SQLite database and logged as a Langfuse trace with model, token usage, and I/O metadata for debugging and cost tracking.
Project structure
td-companion/
├── main.py # Entry point, hotkey listener, main loop
├── screenshot.py # mss screen capture → PNG bytes
├── agent.py # Claude API with vision + function calling
├── session.py # SQLite session read/write
├── observability.py # Langfuse trace logging
├── mcp_server/
│ ├── __init__.py
│ └── tools.py # 4 FastMCP tools + Anthropic tool schemas
├── .env.example
├── .gitignore
└── requirements.txt
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
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
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.