-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Getting Started
This page gets you from zero to a working agent-controlled chart. For full install details and platform-specific notes, see the repo's SETUP_GUIDE.
- TradingView Desktop installed (Mac, Windows, or Linux). Windows Store/MSIX installs are supported.
-
Node.js (see
package.jsonfor the supported version). - An MCP client — Claude Code, Claude Desktop, or any client that speaks MCP over stdio.
The bridge talks to TradingView over the Chrome DevTools Protocol on port 9222. TradingView must be started with remote debugging turned on.
Windows:
scripts\launch_tv_debug.bat
Any platform, from the agent: just call the tv_launch tool. It auto-detects the install location on Mac, Windows, and Linux (including Windows MSIX/Store installs). If a Store install blocks the debug port, it automatically relaunches from a local package copy.
tv_launch
First-time MSIX fallback copies ~330 MB once, so that launch can take a minute.
tv_health_check
A healthy response reports the CDP connection, the current symbol/timeframe/chart type, and which internal API paths are available. If it fails, TradingView isn't running with CDP — go back to step 1 or call tv_launch.
Two companion probes:
-
tv_discover— reports which known TradingView API paths are reachable and their methods. -
tv_ui_state— reports which panels are open and which buttons are visible/enabled.
Point your MCP client at the server (stdio transport). Example shape for a claude MCP config — adjust the path to your checkout:
{
"mcpServers": {
"tradingview": {
"command": "node",
"args": ["C:/Users/you/tradingview-mcp/tradingview-mcp/src/server.js"]
}
}
}See SETUP_GUIDE for the exact config per client.
chart_get_state # symbol, timeframe, chart type, indicators (with entity IDs)
quote_get # live price snapshot
data_get_study_values # current numeric values from every visible indicator
capture_screenshot # save a PNG and get the file path back
Call chart_get_state once at the start of a task — it hands you the entity IDs you'll reference in later calls. Don't re-poll it repeatedly.
chart_set_symbol symbol: "AAPL"
chart_set_timeframe timeframe: "15"
chart_manage_indicator name: "Relative Strength Index" # add a study
Indicator names must be full names, not abbreviations:
"Relative Strength Index"not"RSI","Moving Average Exponential"not"EMA","Bollinger Bands"not"BB". Or useindicator_searchto find the exact title first.
| Symptom | Fix |
|---|---|
tv_health_check fails |
TradingView not running with CDP. Run the launch script or tv_launch. |
| Port 9222 in use / blocked | Another Chromium app may hold it; close it, or on Windows MSIX let tv_launch do its local-copy fallback. |
| Pine graphics tools return nothing | The indicator must be visible on the chart. See Reading Custom Pine Output. |
| Indicator won't add | Use the full name, or indicator_search to find the exact title. |
- Agent Workflows — the "which tool when" decision tree.
- Tool Reference — all 84 tools.
- Context Management — keep responses small and cheap.
TradingView MCP Bridge · 84 tools · CDP bridge to TradingView Desktop · Community project, not affiliated with TradingView
Guides
Reference
Contribute
Repo