Cindy Zhu.
Free guides
Building things Claude

How to connect Claude to your TradingView charts

Hey, it's Cindy ๐ŸŒฑ This uses an open-source MCP bridge that lets Claude Code read and control the TradingView Desktop app running on your own machine.
btw the waitlist for AI System Club is now open! If you're keen on using AI to automate your content, video editing, job search, business or build AI agents, feel free to sign up (only if you want to hehe). Ps. the waitlist gets first dibs:)
Read this before you start. This is analysis help, not financial advice, and nothing here places a trade. The bridge is a community project by tradesdontlie, not a TradingView product, and it is not affiliated with or endorsed by TradingView. It works by talking to undocumented internals of the desktop app, so a TradingView update can break it without warning. The repo also notes that programmatic interaction with TradingView data may conflict with their terms of use, and that responsibility sits with you.
before you start

What you actually need

One correction on the version of this going around: it is not free on both sides. Here is the honest gate.

TradingView Desktop, paid plan The desktop app, not the browser tab. The bridge reads the real-time data your account already has, and the maintainer states a valid TradingView subscription is required.
Claude Code on Pro or Max Claude Code runs in your terminal and is included with Pro and Max, not with the free plan (Anthropic's plan note). Pro starts at $20 a month.
Node.js 18 or newer Grab it from nodejs.org if you do not have it. Check with node --version in your terminal before you begin.
About 10 minutes Five if everything cooperates. The step that trips people up is launching TradingView with the debug flag, so that one gets its own section below.

copy this

The one-prompt setup

Open your terminal, type claude to start Claude Code, and paste this. It does the install, the registration, the launch, and the health check, and it will not tell you it worked until the connection actually responds.

๐Ÿ‘ฉโ€๐Ÿ’ป install the TradingView bridge
Install the TradingView MCP bridge for me and get it working end to end. The repo is https://github.com/tradesdontlie/tradingview-mcp and it connects you to my locally running TradingView Desktop app over the Chrome DevTools Protocol on port 9222.

Do this in order and tell me what you are doing at each step.

1. Check that I have Node.js 18 or newer by running node --version. If I do not, stop and tell me instead of continuing.

2. Clone the repo into ~/tradingview-mcp, cd into it, and run npm install. Show me any errors in full rather than summarising them.

3. Register it with Claude Code as a stdio MCP server named tradingview, pointing at src/server.js inside that folder using the absolute path, never a relative one. Show me the exact command you ran and the resulting config entry.

4. Launch TradingView Desktop with remote debugging enabled, using the launch script in the repo's scripts folder for my operating system. If TradingView is already running without the debug flag, tell me to quit it completely first, because that flag only applies at launch and a running instance will not pick it up.

5. Run tv_health_check and show me the raw result. If it fails, diagnose it properly: check whether port 9222 is listening, whether the desktop app is actually running, and whether the server shows as connected in claude mcp list. Do not tell me the setup succeeded until the health check passes.

At the end, list the tools you now have available and give me three example things I could ask you to do with my chart.
If Claude asks permission to run commands, that is the expected behaviour. Read what it is about to run, then approve. You can always ask it to explain a command before you say yes.

the manual route

Or install it by hand

Same result, four steps, and you see exactly what lands on your machine.

  1. ๐Ÿ“ฆ Clone and install. In your terminal, run the three commands below. This pulls the bridge down and installs its dependencies. Nothing is running yet.
    git clone https://github.com/tradesdontlie/tradingview-mcp.git
    cd tradingview-mcp
    npm install
  2. ๐Ÿ”Œ Launch TradingView with the debug port open. Quit TradingView Desktop completely first, then run the script for your system from inside the repo folder. The debug port is off by default and only turns on at launch, which is why a running app will not work.
    # macOS
    ./scripts/launch_tv_debug_mac.sh
    
    # Windows
    scripts\launch_tv_debug.bat
    
    # Linux
    ./scripts/launch_tv_debug_linux.sh
  3. โž• Register it with Claude Code. Run this from anywhere, swapping in your real home path. The -- separates the Claude Code flags from the command that actually starts the server (MCP reference).
    claude mcp add --transport stdio tradingview -- node /Users/you/tradingview-mcp/src/server.js
  4. โœ… Verify before you trust it. Run claude mcp list and look for tradingview with a connected status. Then start Claude Code and ask it to run tv_health_check. If both come back clean, you are connected. Inside a session, /mcp shows the same panel.

what to ask

The 5 things worth asking once it is connected

These are prompts for Claude Code, once the bridge is live and your chart is open. Swap the bracketed parts for yours.

1 ยท read my chart and mark the levels
Read my current TradingView chart and tell me what is actually on it: the symbol, the timeframe, the recent price action, and any indicators I already have loaded. Then identify the clearest support and resistance levels in the visible range and draw each one onto the chart as a horizontal line labelled with its price. Explain in plain language why you chose each level, and tell me which ones you consider weak, so I am judging your reasoning rather than trusting a line because it appeared.
2 ยท build me a custom indicator
Write me a Pine Script indicator that does this: [describe it in one sentence, for example "a 14-period RSI that shades the chart background when it crosses above 70 or below 30"]. Inject it into my TradingView Pine editor, compile it, and fix any compilation errors yourself before you show me anything. Then add an alert condition for each of those states so I am notified without watching the screen, and tell me exactly what I still need to click inside TradingView to activate the alert, since that part is not something you can do for me.
3 ยท scan my whole watchlist
Read my TradingView watchlist, then work through each symbol one at a time on the daily timeframe and record where price is sitting relative to its 50 and 200 period moving averages, plus whether it is near a recent high or low. Build me one table at the end, ranked from cleanest setup to messiest, with a single sentence of reasoning per row. Tell me up front roughly how long this will take given the number of symbols, and skip any symbol whose data does not load rather than filling it in with a guess.
4 ยท test the idea instead of assuming it
Turn this idea into a Pine Script strategy so I can test it rather than believe it: [describe the entry, the exit, and the stop in one or two sentences]. Write it, inject it into my Pine editor, compile it, and fix any errors before showing me. Then tell me where to read the results in TradingView's Strategy Tester panel, which numbers actually matter (net profit, max drawdown, number of trades, profit factor), and how few trades would make the whole result statistically meaningless.
5 ยท practise on replay
Set my chart to [symbol] on the [timeframe] and start bar replay from [date] so I can practise reading price without knowing what happens next. Step forward one bar at a time whenever I say next, and do not reveal anything beyond the current bar under any circumstances, including in your commentary. When I call an entry, log my reasoning as I gave it, then keep stepping and afterwards tell me what actually happened and what a disciplined exit would have looked like compared to what I said.

know this

What it can and cannot do

Can read your chart Symbol, timeframe, price data, indicator values, existing drawings and alerts, plus screenshots it can look at directly.
Can write Pine Script Draft, inject, compile, read the errors, and iterate. This is the part that genuinely saves hours (Pine Script docs).
Cannot place trades Chart interaction only. Nothing here touches a broker, an order, or your money.
Cannot reach TradingView's servers Everything runs against the app on your own machine over localhost, so your data and scripts stay local.
The backtest caveat that matters most. Claude writes the strategy, but TradingView's Strategy Tester produces the numbers, and a backtest is a description of the past, not a promise. A strategy that looks brilliant across 12 trades has told you almost nothing. Ask Claude for the trade count and the max drawdown before you look at the profit figure.

if it breaks

Troubleshooting

  1. ๐Ÿ”Œ Health check fails. Nine times out of ten TradingView is running without the debug flag. Quit it fully, including from the dock or system tray, then relaunch with the script from step 2 and try again.
  2. ๐Ÿ”Ž Check the port yourself. Run curl http://localhost:9222/json/version. A JSON response means the debug port is open and the problem is elsewhere. An error means TradingView is not listening and the launch step did not take.
  3. ๐Ÿ“ The server shows as failed. Run claude mcp list. A failure here is almost always a relative path or a wrong home directory in the registration. Re-register with the full absolute path to src/server.js, and confirm node --version reports 18 or higher.
  4. ๐ŸŒฑ It worked yesterday, not today. A TradingView update probably changed something internal. Check the repo's issues page to see whether others hit the same break, and consider pinning your desktop version if you rely on this daily.
Worth saying plainly: a tool that reads charts faster does not make you a better trader, and a confident summary from an AI is still a summary. The honest use here is doing the boring parts quickly, testing ideas instead of assuming them, and keeping every decision yours.

Proof

TradingView MCP bridge, source and full tool list
Claude Code, connecting MCP servers
Using Claude Code with your Pro or Max plan
TradingView Desktop
Pine Script documentation
Node.js downloads

the waitlist is now open

AI System Club is launching soon

Build AI systems with me through recorded lessons you can follow at your own pace. Join the waitlist for first access and the founding price.

btw this list gets first dibs
the moment doors open :)