Most research and tooling for LLM agents assume web APIs or server-side data access; this project instead asks a practical question: how do you give an LLM safe, deterministic "eyes and hands" on a stateful desktop trading UI without sending market data off your machine? The answer implemented here is a local MCP server that translates TradingView Desktop state and controls into a compact toolset an LLM (e.g., Claude Code) can call.
What Sets It Apart
- Local-only CDP bridge: communicates exclusively with a locally running TradingView Desktop instance over Chrome DevTools Protocol (Electron debug port), so no TradingView network traffic or market data is forwarded externally. This keeps data residency under the user's control while enabling agentic workflows.
- Purpose-built MCP toolset: exposes ~78 MCP tools (and a pipe-friendly
tvCLI) that map common chart workflows—symbol/timeframe control, indicator reads, Pine Script inject/compile, drawing, alerts, replay mode—into small JSON outputs sized to limit LLM context usage. - Agent-first integration: designed to be added to Claude Code's MCP config out-of-the-box; includes a decision tree (CLAUDE.md) so the agent selects compact calls (e.g.,
data_get_study_values,capture_screenshot) rather than dumping full UI state. - Streaming and context management: offers JSONL streaming, deduplication, and summary modes (OHLCV summary, capped labels) to keep the LLM's context budget practical for real-time monitoring and analysis.
Who It's For & Tradeoffs
Great fit if you are a developer or researcher exploring human–AI collaboration on financial charts and you can run TradingView Desktop locally with a paid subscription. It is especially useful for prototyping agent workflows (chart reading, Pine iteration, visual analysis) and for integrating Claude Code MCP agents into a desktop environment. Look elsewhere if you need server-side market data aggregation, want an official TradingView API integration, or expect guaranteed stability across TradingView updates—this tool depends on undocumented internal Electron interfaces and the debug port, so TradingView upgrades can break compatibility. Also, it explicitly does not execute real trades or bypass any exchange/data licensing.
Where It Fits
This project is a tooling layer between LLM agents and desktop financial UIs: not a trading bot or data reseller, but an interface for research into latency, ambiguity, UI-state interpretation, and agent failure modes when operating on live chart data.
Practical notes
Requires TradingView Desktop with --remote-debugging-port enabled, Node.js 18+, and a valid TradingView subscription for real-time data. Source code is MIT-licensed; the repository recommends pinning TradingView Desktop versions for stability and includes a detailed disclaimer about Terms of Use and user responsibility.