-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Home
Give an AI agent hands and eyes on a live TradingView chart.
TradingView MCP is a Model Context Protocol server that connects Claude (or any MCP client) to a running TradingView Desktop instance over the Chrome DevTools Protocol (CDP). Instead of scraping screenshots or guessing at prices, the agent reads the actual chart state — symbols, indicators, Pine Script output, order-book depth — and drives the UI directly: changing symbols, tuning indicators, writing and compiling Pine Script, running bar replay, and taking screenshots.
84 tools across 15 categories, all speaking to the same chart you're looking at.
Claude / MCP client ←→ MCP Server (stdio) ←→ CDP (localhost:9222) ←→ TradingView Desktop
An LLM by itself can talk about markets. Wired to this bridge, it can actually operate your charting platform:
-
Read ground truth, not guesses.
data_get_study_valuesreturns the real RSI/MACD/EMA numbers off your chart.quote_getreturns the live price. No hallucinated levels. -
See what custom indicators draw. Pine Scripts paint lines, labels, tables, and boxes that normal data APIs can't see. The
data_get_pine_*tools read them — so "what levels is my indicator showing?" gets a real answer. See Reading Custom Pine Output. -
Close the Pine Script dev loop. Inject code → compile → read errors → read
log.info()output → check strategy results, all without leaving the conversation. See Agent Workflows. - Practice and backtest. Drive bar replay, place replay trades, pull Strategy Tester metrics and equity curves.
- Stay cheap on context. Every heavy tool has a compact mode. A screenshot is ~300 bytes (a file path), not a megabyte of pixels. See Context Management.
| If you want to… | Go to |
|---|---|
| Get it running and make your first call | Getting Started |
| See every tool and what it does | Tool Reference |
| Learn the "which tool when" decision tree | Agent Workflows |
| Read levels/labels/tables drawn by Pine indicators | Reading Custom Pine Output |
| Keep an agent's context lean | Context Management |
| Understand how the CDP bridge works internally | Architecture Internals |
| Contribute — bug reports, new endpoints, new tools | Contributing |
1. scripts\launch_tv_debug.bat # launch TradingView with CDP on :9222
2. tv_health_check # confirm the bridge is connected
3. chart_get_state # symbol, timeframe, indicators + entity IDs
4. data_get_study_values # live numbers from every visible indicator
5. capture_screenshot # visual confirmation
That's the whole loop: connect → read state → act → verify.
Note: This wiki documents the tool surface and agent workflows. For install/config specifics and contribution guidelines, see the README, SETUP_GUIDE, and CONTRIBUTING in the repo.
TradingView MCP Bridge · 84 tools · CDP bridge to TradingView Desktop · Community project, not affiliated with TradingView
Guides
Reference
Contribute
Repo