How to bypass manual chart analysis by connecting Anthropic’s most powerful CLI tool directly to TradingView Desktop for real-time setups and execution strategy.
This article is a deep dive into the “TradingView MCP” bridge. We aren’t just talking about asking an AI for price predictions; we are talking about giving Claude “eyes” on your charts. You will learn how to configure the Model Context Protocol (MCP) to let Claude read indicators, take screenshots, and validate trade setups in real-time.
⏱️ Estimated reading time: 10–12 minutes
Most traders treat AI like a sophisticated Magic 8-Ball. They copy-paste price data into a chat window and ask, “Will BTC go up?” The result is usually a generic, outdated response that lacks the nuance of the current market structure.
But last month, everything changed. With the release of Claude Code and the Model Context Protocol (MCP), we gained the ability to stop telling the AI what’s happening and start showing it. By connecting Claude directly to your TradingView Desktop instance, you transform the LLM from a static chatbot into a dynamic co-pilot that can see your EMA crosses, identify RSI divergences, and suggest entries while you’re still sipping your morning coffee.
The biggest enemy of a systematic trader is latency in decision-making. By the time you’ve analyzed three different timeframes, checked your bias, and calculated your position size, the “optimal” entry is often gone.
Standard AI tools fail here because they lack real-time context. They don’t know that a massive sell wall just appeared on your Level 2 data or that a specific indicator on your 5-minute chart just flashed a “Buy.” Claude Code, through the MCP bridge, closes this gap by reading your active TradingView window directly.
The Model Context Protocol (MCP) is an open standard that enables developers to build “servers” that provide tools to LLMs. In this case, we use a specialized MCP server that talks to TradingView Desktop via the Chrome DevTools Protocol (CDP).
When configured correctly, Claude doesn’t just “chat” — it executes functions like:
Before we dive into the terminal, ensure you have:
You cannot launch TradingView from a desktop shortcut for this to work. It must be launched with a remote debugging port.
Start-Process "PATH_TO_YOUR_TRADINGVIEW.EXE" -ArgumentList "--remote-debugging-port=9222"
You need to tell Claude where the TradingView “translator” is located. This is done via the .claude.json configuration file.
Once TradingView is running and the server is configured, open Claude Code and type: tv_health_check
If the response shows your current ticker (e.g., “Connected to BTCUSD on 15m chart”), you are officially trading in the future.
Now that the “eyes” are open, how do you get the “brain” to work? You need a Systematic Prompting Framework.
The “Analyst” Prompt:
Claude will then:
Here is the honest truth that most “AI Influencers” hide:
After running this setup for several weeks, my biggest takeaway is patience. Claude is exceptionally good at preventing “Revenge Trading.” If you ask Claude to validate a setup and it says, “The indicators don’t match your strategy,” it removes the emotional urge to force a trade.
Key Findings:
Model Context Protocol (MCP) is a method to grant Claude Code access to external applications. In this case, it connects to TradingView Desktop. Once configured, Claude can read data from your charts, manage indicators, and take screenshots directly within the chat.
Claude connects to TradingView via a specific port 9222 using the Chrome DevTools Protocol. Because of this, TradingView must be launched in a specific way rather than through a standard shortcut.
cd "C:\Users\YOUR_NAME\.claude\tools"
git clone https://github.com/tradesdontlie/tradingview-mcp.git
cd tradingview-mcp
npm install
Note: npm install installs necessary libraries and may take 1–2 minutes.
Claude Code stores settings in claude.json located in your user's home folder (e.g., C:\Users\YOUR_NAME\.claude.json).
"mcpServers": {
"tradingview-desktop": {
"type": "stdio",
"command": "node",
"args": [
"C:\\Users\\YOUR_NAME\\.claude\\tools\\tradingview-mcp\\src\\server.js"
],
"env": {}
}
}
Important: Replace YOUR_NAME with your actual Windows username and ensure the path to server.js is correct. Use double backslashes \\ for the path as required by the JSON format.
TradingView must be launched with port 9222 open.
Option A: Via Script Navigate to the repository folder in PowerShell and run: .\scripts\launch_tv_debug.bat The script will automatically find TradingView, close any active instances, and relaunch it with the correct port.
Option B: Manual Launch (If Option A fails) If the script cannot find the executable (common with WindowsApps versions), use PowerShell to find the path:
Once TradingView is running, open Claude Code and type: tv_health_check If successful, Claude will confirm the connection and show the current symbol on your chart.
Troubleshooting
ErrorSolutionTradingView not foundThe script failed to find the .exe. Use Option B from Step 5.CDP connection failedTradingView is running without the debug port. Restart it using the Step 5 methods.node: command not foundNode.js is not installed or not in your PATH. Reinstall Node.js.Error in .claude.jsonCheck for missing brackets or ensure you used double backslashes \\.
When you start Claude Code, it automatically launches the Node.js server defined in claude.json. The server connects to TradingView via port 9222, enabling Claude to interact with your charts. TradingView must be launched with the --remote-debugging-port=9222 flag before opening Claude Code.
If you enjoyed this, please:
Thanks for reading!
Questions? Find me on:
Also, Telegram for free trading signals. No privet or pay groups.
Claude Code and Tradingview was originally published in Coinmonks on Medium, where people are continuing the conversation by highlighting and responding to this story.


