Skip to content Skip to footer

CONTROL PANEL V2.1

HOW TO: Connecting Claude (Clawdbot) to Tradingview

Thank you to @ https://x.com/Tradesdontlie for this spectacular MCP I will link below.

TradingView MCP Setup Guide (Windows MSIX)

How to connect an AI assistant to TradingView Desktop via Chrome DevTools Protocol


What This Does

Gives your AI assistant (Nibbles/AstroClaw via OpenClaw in my discord) live eyes on your TradingView Desktop chart. It can:

  • Read current symbol, timeframe, price
  • Take screenshots of your chart
  • Read indicator values, drawn levels, Pine Script output
  • Change symbols/timeframes, draw lines, manage alerts
  • Run Pine Script development with AI assistance

Prerequisites

  • Windows 10/11
  • Node.js 18+ installed
  • TradingView Desktop (MSIX from tradingview.com/desktop)
  • Git

Step 1 — Install TradingView Desktop

Download and install from: https://www.tradingview.com/desktop/

On Windows this installs as an MSIX (Windows Store-style app). This is the only official installer now — the old standalone .exe no longer exists.

Log in to your TradingView account after installing.


Step 2 — Clone the MCP Repo

cd C:\Users\USER\.openclaw\workspace
git clone https://github.com/tradesdontlie/tradingview-mcp.git
cd tradingview-mcp
node "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" install

Note: If npm is blocked by PowerShell execution policy, call it via node npm-cli.js as shown above.


Step 3 — Launch TradingView with Debug Port (MSIX Workaround)

The Problem: TradingView installed as MSIX lives in C:\Program Files\WindowsApps\ which is locked by Windows. You cannot directly execute the .exe or pass it command-line arguments via normal means — even as Admin, even via shortcuts. The batch script in the repo (scripts\launch_tv_debug.bat) does NOT work with MSIX installs.

The Solution: Use the IApplicationActivationManager COM API — this is how Windows itself launches Store apps, and it accepts launch arguments.

Run this PowerShell script (saved at launch_msix_debug.ps1 in the repo folder):

cd C:\Users\USER\.openclaw\workspace\tradingview-mcp
powershell -ExecutionPolicy Bypass -File launch_msix_debug.ps1

Or run the content directly:

Add-Type @"
using System;
using System.Runtime.InteropServices;

public class TVLauncher2 {
    [ComImport, Guid("2e941141-7f97-4756-ba1d-9decde894a3d"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    interface IApplicationActivationManager {
        int ActivateApplication(string appUserModelId, string arguments, int options, out uint processId);
        int ActivateForFile(string appUserModelId, IntPtr itemArray, string verb, out uint processId);
        int ActivateForProtocol(string appUserModelId, IntPtr itemArray, out uint processId);
    }
    [ComImport, Guid("45ba127d-10a8-46ea-8ab7-56ea9078943c"), ClassInterface(ClassInterfaceType.None)]
    class ApplicationActivationManager {}
    public static uint Launch(string aumid, string args) {
        var mgr = (IApplicationActivationManager)new ApplicationActivationManager();
        uint pid;
        mgr.ActivateApplication(aumid, args, 0, out pid);
        return pid;
    }
}
"@

$aumid = "TradingView.Desktop_n534cwy3pjxzj!TradingView.Desktop"
$processId = [TVLauncher2]::Launch($aumid, "--remote-debugging-port=9222")
Write-Host "Launched PID: $processId"

Key details:

  • AUMID format: <PackageFamilyName>!<ApplicationId>
  • PackageFamilyName: TradingView.Desktop_n534cwy3pjxzj
  • ApplicationId (from MSIX manifest): TradingView.Desktop
  • Full AUMID: TradingView.Desktop_n534cwy3pjxzj!TradingView.Desktop
  • The !App suffix that most docs show is WRONG for this package — it’s !TradingView.Desktop

Step 4 — Verify CDP Connection

Invoke-WebRequest -Uri "http://localhost:9222/json/version" -UseBasicParsing

You should get a JSON response with TradingView/Electron version info. If you do, you’re connected.

Or use the CLI:

cd C:\Users\USER\.openclaw\workspace\tradingview-mcp
node src/cli/index.js status

Expected output:

{
  "success": true,
  "cdp_connected": true,
  "chart_symbol": "CME_MINI:ES1!",
  "chart_resolution": "60",
  "api_available": true
}

Step 5 — Take a Screenshot (Proof It Works)

node src/cli/index.js screenshot

Screenshot saves to screenshots/ folder in the repo directory.


Common Commands

# Check connection
node src/cli/index.js status

# Get current quote
node src/cli/index.js quote

# Change symbol
node src/cli/index.js symbol ES1!

# Change timeframe (1, 5, 15, 60, D, W)
node src/cli/index.js timeframe 5

# Screenshot
node src/cli/index.js screenshot

# Get OHLCV summary
node src/cli/index.js ohlcv --summary

Troubleshooting

ProblemCauseFix
launch_tv_debug.bat says “TradingView not found”MSIX install not in expected pathUse launch_msix_debug.ps1 instead
Access denied launching exe directlyMSIX security restrictionUse the COM API workaround (Step 3)
CDP port not respondingTV launched without debug flagClose TV, rerun launch_msix_debug.ps1
0x80270254 COM errorWrong AUMID suffixUse !TradingView.Desktop not !App
npm blocked by execution policyPowerShell script policyCall via node npm-cli.js directly

How to Find Your AUMID (if TV updates and breaks)

$pkg = Get-AppxPackage | Where-Object { $_.Name -like "*TradingView*" }
Write-Host "Family: $($pkg.PackageFamilyName)"
Get-AppxPackageManifest $pkg | Select-Xml "//ns:Application/@Id" -Namespace @{ns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"} | ForEach-Object { Write-Host "AppId: $($_.Node.Value)" }
# AUMID = Family!AppId

Notes

  • TradingView must be running with the debug port every session — it doesn’t persist
  • The launch_msix_debug.ps1 script handles kill + relaunch automatically
  • Nibbles can call this script autonomously to bring up the connection
  • 78 MCP tools available — see the repo README for full list
E-mail
Password
Confirm Password