What Is TradingView MCP?
The integration that lets Claude AI literally drive your TradingView desktop app.
The Concept
The tradingview-mcp project (Model Context Protocol) by Tradesdontlie lets Claude Code control the TradingView desktop app using Chrome DevTools Protocol. No screenshots. No copy-paste. No official API needed — just pure AI + TradingView working together.
What Claude Can Do
- Read any chart, any indicator — even premium ones
- Pull live OHLCV data, drawings, and watchlists
- Auto-write Pine Script v5 strategies from plain English
- Run strategy tester, optimize parameters, debug and iterate in loops
- Scan your entire watchlist and surface the top setups every morning
- 100% local on your machine — your data never leaves
Why It's Going Viral
Traders are posting clips of Claude building full multi-timeframe strategies in 60 seconds flat. What used to take hours of Pine Script debugging now takes a single prompt.
✓ Writing Pine Script v5 strategy: RSI(14) + EMA(21/55) mean reversion...
✓ Backtest complete: 67% win rate, 2.3 profit factor, 12.4% net profit.
✓ Optimizing RSI period (10-20) and EMA lengths... Best: RSI(12), EMA(18/52) → 71% win rate, 2.8 PF.
Strategy applied to your chart. Want me to test on other timeframes?
Prerequisites
Everything you need before we start. Most of this you probably already have.
TradingView Desktop
You need the desktop Electron app — not the browser version. The MCP server connects via Chrome DevTools Protocol, which only works with the desktop app.
Browser Won't Work
The web version of TradingView does not expose the DevTools port. You must use the desktop app.
Claude Code (CLI)
Install the latest version of Claude Code with tool use (MCP) enabled. This is what will communicate with the TradingView MCP server.
Git & Terminal
You'll need Git installed and basic terminal/command line access to clone the repo and run the server.
Node.js
The MCP server runs on Node.js. Make sure you have Node.js v18+ installed. Check with node --version in your terminal.
Quick Checklist
- TradingView Desktop app downloaded and installed
- Claude Code installed (latest version)
- Git installed (
git --version) - Node.js v18+ installed (
node --version) - A TradingView account (free tier works, but Pro/Premium unlocks more indicators)
Install the MCP Server
Clone the repo, install dependencies, and start the server. Takes about 2 minutes.
Install with Claude Code
Paste this into Claude Code and it will handle the rest:
Install the TradingView MCP server. Clone https://github.com/tradesdontlie/tradingview-mcp.git, run npm install, add it to my MCP config at ~/.claude/.mcp.json, and launch TradingView with the debug port. Then verify the connection with tv_health_check.
Claude Code will clone the repo, install dependencies, configure the MCP server, and verify the connection — all automatically.
That's It
Once Claude confirms the health check passes, you're connected. Skip ahead to the Live Demo section to start using it.
Or Follow the Manual Steps
-
01
Open your terminal
Open Terminal (macOS), Command Prompt / PowerShell (Windows), or your preferred terminal app.
-
02
Clone the tradingview-mcp repo
Run the following command to download the project:
git clone https://github.com/tradesdontlie/tradingview-mcp.git
-
03
Navigate into the folder and install
cd tradingview-mcp && npm install
-
04
Add to your MCP config
Add the TradingView MCP server to your config file at
~/.claude/.mcp.json. See the repo's README for the exact JSON block. -
05
Launch TradingView with debug port
Open the TradingView desktop app with remote debugging enabled. The MCP server connects via Chrome DevTools Protocol.
-
06
Verify the connection
Run
tv_health_checkto confirm the MCP server can see your TradingView instance.
Troubleshooting
If the server can't connect: make sure TradingView Desktop is open before you start the server. Restart both apps if needed. Check the repo's README for port configuration if you're running other DevTools connections.
Connect Claude to TradingView
Tell Claude about the MCP server and watch the magic happen.
Configure Claude Code
-
01
Open Claude Code in your terminal
Launch Claude Code (make sure it's the latest version with MCP support).
-
02
Add the MCP server to your config
The TradingView MCP server needs to be added to your MCP config at
~/.claude/.mcp.json. The exact JSON block is in the project's README. -
03
Verify the connection
Run the health check to confirm everything is working:
tv_health_check
If the health check passes, you're connected. If not, make sure TradingView Desktop is open and the MCP server is running.
Connection Successful
Claude now has full read/write access to your TradingView desktop app. It can read charts, write Pine Script, run backtests, and more — all from natural language prompts.
What You Can Do
Example prompts to try right now. Copy any of these into Claude and watch it work.
Build a Strategy from Scratch
Scan the 15-minute chart of BTCUSDT. Build me a high-probability mean-reversion strategy using RSI and EMA, backtest it on the last 30 days, then optimize the parameters live.
Claude will read the live chart, write a complete Pine Script v5 strategy, inject it into TradingView, run the strategy tester, show results, then iterate and improve it automatically.
Morning Watchlist Scanner
Go through my watchlist and tell me which coins are showing bullish divergence on the 4H RSI right now. Rank them by strength.
Claude scans every ticker in your watchlist, reads the indicators, and surfaces the top setups — like having a full-time analyst.
Debug & Improve Existing Scripts
Read the Pine Script indicator currently on my chart. It's repainting — find the bug and fix it. Then add alerts for when the signal fires.
Claude reads your existing Pine Script code directly from the chart, identifies issues, fixes them, and adds new features — all in one go.
Multi-Timeframe Analysis
Analyze ETHUSDT across the 1H, 4H, and daily charts. Give me a confluence report: what are the key levels, what's the trend on each timeframe, and where would you enter a long?
Claude switches between timeframes, reads indicators and price action on each, and gives you a structured confluence report.
Important: Risk Disclaimer
Past performance ≠ future results. Always forward-test in a demo account first. Never blindly trade AI-generated strategies with real money until YOU verify them. This is a tool to 10x your edge — not a replacement for your own analysis and risk management.
Execute Your Strategies
You've built the strategy — now take it live with leverage on Weex.
The Play
-
01
Let Claude build & optimize the strategy in TradingView
Use the prompts from the previous section to have Claude create and backtest your strategy.
-
02
Copy the logic or export the signals
Have Claude explain the exact entry/exit rules, or set up TradingView alerts for the strategy signals.
-
03
Trade it live on Weex with leverage
Execute the strategy on Weex — one of the fastest-growing derivative exchanges with up to 200x leverage on majors and deep liquidity.
-
04
Stack the deposit bonus + trading rewards
Sign up through the link below and unlock extra deposit bonuses, priority access to new token listings, and zero-fee trading periods.
Deposit Bonus
Up to $10,000 in bonus rewards when you sign up and deposit through our link. Stack this on top of your trading profits.
200x Leverage
Trade majors with up to 200x leverage and deep liquidity. Execute the strategies Claude builds for you with precision.
Always Forward-Test First
Before going live with real capital, always test your AI-generated strategies on a demo account or with minimal position sizes. Leverage amplifies both gains AND losses.
You're All Set
Claude + TradingView + Weex — the full AI trading stack. Build strategies with AI, backtest in TradingView, and execute with leverage on Weex.