Skip to main content
Glama
firyomaefx

TradingView Chrome MCP

by firyomaefx

TradingView Chrome MCP β€” Standalone Windows .exe

CI License: MIT

Let your AI assistant remote-control your TradingView tab in Chrome β€” with a single portable Windows executable.

This is a local MCP server that sits between Claude, Codex CLI, ChatGPT Desktop, Cursor, or any MCP host and your existing TradingView tab. It reads charts, writes Pine Script v6, fixes compile errors automatically, manages watchlists, sets alerts, and takes screenshots β€” all from plain English commands. No API keys, no TradingView credentials, and the AI never trades on your behalf.

  • πŸ–₯️ Windows-first portable .exe β€” single file, no Node.js installer, no registry changes.

  • πŸ”Œ Two browser drivers β€” Playwright/CDP (default) or a loaded Chrome extension.

  • 🧠 Autonomous Pine Script repair loop β€” write β†’ compile β†’ detect error β†’ LLM patch β†’ add-to-chart β†’ verify.

  • πŸ”’ Approval-gated writes β€” symbol changes, saves, and layout switches wait for your dashboard OK.

  • πŸ“° Optional sentiment/news module β€” bullish/bearish headline heuristics and financial-news feed (opt-in via TV_ENABLE_SENTIMENT_NEWS=1).

  • πŸ“ˆ Paper-trading backtests β€” simulated long/short strategy runs, clearly labeled not real trading (Pro/Team/Owner).

  • 🌐 Self-contained local dashboard β€” control, audit log, screenshots, and emergency stop at http://127.0.0.1:3939.


Download the standalone Windows app

Go to the latest release and download tradingview-chrome-mcp.exe.

Put it anywhere β€” desktop, USB drive, or project folder β€” and double-click it.

First launch unpacks the embedded Node.js runtime and dependencies to:

%LOCALAPPDATA%\tradingview-chrome-mcp

Subsequent launches reuse that cache and start in seconds. All logs, backups, screenshots, and exports are written there, so the .exe itself is 100% portable.


Related MCP server: TradingView MCP Bridge

Quick start (Windows)

1. Run the .exe

# Default dashboard opens at http://127.0.0.1:3939
.\tradingview-chrome-mcp.exe

The launcher will:

  1. Detect or start Chrome.

  2. Open the local dashboard.

  3. Start the MCP server over STDIO (and an optional HTTP transport if enabled).

2. Register with your AI host

Claude Desktop / Claude Code

Add to %APPDATA%\Claude\claude_desktop_config.json:

{
  "mcpServers": {
    "tradingview-chrome-mcp": {
      "command": "C:\\Users\\%USERNAME%\\AppData\\Local\\tradingview-chrome-mcp\\tradingview-chrome-mcp.exe",
      "env": {
        "TV_DASHBOARD_PORT": "3939",
        "TV_LOG_LEVEL": "info",
        "TV_APPROVAL_TIMEOUT_MS": "120000"
      }
    }
  }
}

Codex CLI

If you used the PowerShell installer, Codex is registered automatically. Otherwise:

codex mcp add tradingview-chrome-mcp "C:\Users\%USERNAME%\AppData\Local\tradingview-chrome-mcp\tradingview-chrome-mcp.exe"

ChatGPT Desktop / Cursor / Windsurf

Point the host at the .exe as an STDIO MCP server with the same environment variables.

3. Ask the AI to trade for you (in words, not money)

Read my TradingView chart and tell me the current symbol and timeframe.
Create a Pine Script v6 EMA crossover indicator called "EMA Cross" and add it to the chart.
Fix all Pine Script compile errors and keep trying until the indicator loads.

Installation options

Method

Best for

Build step

One-click launcher

Windows setup .exe (recommended)

Windows users who want Start-menu/desktop shortcuts

No

Install, then double-click shortcut

Portable .exe

Windows users who want a single file with no installer

No

Double-click

PowerShell installer

Windows users who prefer CLI install

No

irm ... | iex

Build from source

Developers or macOS/Linux

npm install && npm run build

Launch-TV-MCP.ps1

Vercel-hosted SSE fork

Teams needing a remote market-data MCP

Next.js build

No

Full install details: INSTALL.md Β· Tool reference: TOOL_REFERENCE.md


Chrome extension driver (optional)

The .exe defaults to Playwright over Chrome DevTools Protocol. If you prefer to drive an already-running Chrome instance without --remote-debugging-port, use the Chrome extension driver:

  1. Open chrome://extensions and enable Developer mode.

  2. Click Load unpacked and select the extension/ folder from this repo.

  3. Run the .exe with:

$env:TV_BROWSER_DRIVER = "extension"
$env:TV_EXTENSION_WS_PORT = "9223"
$env:TV_EXTENSION_TOKEN = "tradingview-chrome-mcp"
.\TradingView-Chrome-MCP-0.8.0-portable.exe

The extension connects to the .exe over a local WebSocket, injects MAIN-world scripts into the TradingView tab, and exposes all 53 tools. This is the path that enables the autonomous Pine Script repair loop to catch red compile-error toasts the instant they appear.


Features

Feature

What it means

Portable .exe

Single file; extracts to and writes inside %LOCALAPPDATA%\tradingview-chrome-mcp.

Windows setup .exe

Classic installer; creates Start-menu and optional desktop shortcuts in %LOCALAPPDATA%\TradingView Chrome MCP.

Chrome profile reuse

Optional TV_ALLOW_REAL_PROFILE=1 keeps you logged into TradingView.

Approval gate

Writes wait for your OK in the local dashboard.

Emergency stop

One button disables every tool instantly.

Local audit log

Every action is written to logs/audit.jsonl.

No credential extraction

Cookies, tokens, and passwords are never read.

Pine Script v6

Create, patch, save, compile, rename, attach, back up, and restore scripts.

Autonomous repair loop

tv_pine_autofix runs read β†’ compile β†’ LLM patch β†’ save β†’ add-to-chart β†’ verify.

Error toast observer

The Chrome extension catches red compilation errors as soon as they appear.

Alerts & watchlists

Read, add, sync, and delete symbols and price alerts.

Layouts & indicators

Save, duplicate, rename, reset, switch layouts; add/remove/hide/show/update indicators.

Screenshots & data export

Capture the chart or export visible metadata.

Sentiment & news (opt-in)

Bullish/bearish headline scoring and Yahoo Finance RSS feed.

Paper trading (Pro+)

Deterministic simulated backtests; every result is labeled simulated: true.

Browser pool (experimental)

Reuse Playwright contexts across tools; emergency stop propagates.


Tool categories

The server exposes 60 tools grouped by job:

  • Diagnostics β€” ping, mcp_client_info

  • Chart control β€” tv_status, tv_read_chart, tv_chart_metadata, tv_change_symbol, tv_change_timeframe, tv_ensure_chart

  • Pine Script β€” tv_open_pine_editor, tv_read_pine_source, tv_pine_create, tv_pine_patch, tv_pine_save, tv_pine_add_to_chart, tv_pine_compile_errors, tv_rename_script, tv_pine_backup, tv_pine_list_backups, tv_pine_restore, tv_pine_autofix

  • Watchlists β€” tv_watchlist_read, tv_watchlist_add_symbol, tv_watchlist_sync

  • Alerts β€” tv_alert_create, tv_alert_list, tv_alert_delete

  • Layouts β€” tv_layout_list, tv_layout_switch, tv_layout_save, tv_layout_duplicate, tv_layout_rename, tv_layout_reset, tv_layout_export

  • Indicators β€” tv_indicator_add, tv_indicator_remove, tv_indicator_hide, tv_indicator_show, tv_indicator_settings

  • Drawing β€” tv_drawing_add_trendline

  • Verification β€” tv_chart_verify

  • Utilities β€” tv_screenshot, tv_dismiss_dialogs, tv_read_strategy_tester, tv_chart_data_export, browser_status, browser_list_tabs

  • Paper trading β€” tv_paper_trade

  • Safety β€” emergency_stop, emergency_clear

  • Licensing β€” licence_status, activate_licence, edition_limits

  • Audit & Sync β€” audit_verify, sync_status


Configuration

Set environment variables before launching the .exe:

Variable

Default

Purpose

TV_DEFAULT_TRADINGVIEW_URL

https://www.tradingview.com/chart/

Chart URL to open when no tab exists.

TV_ALLOW_CHROME_LAUNCH

0

Set to 1 to let the launcher start Chrome if none is found.

TV_ALLOW_CHROME_KILL

0

Set to 1 to let the launcher close conflicting Chrome instances.

TV_ALLOW_REAL_PROFILE

0

Set to 1 to reuse your real Chrome profile.

TV_DASHBOARD_PORT

3939

Local dashboard port.

TV_DASHBOARD_TOKEN

random

Bearer token required by dashboard /api/*.

TV_MCP_HTTP_PORT

3940

Optional Streamable HTTP transport; set 0 to disable.

TV_BROWSER_DRIVER

playwright

playwright or extension.

TV_EXTENSION_WS_PORT

9223

WebSocket port for extension mode.

TV_EXTENSION_TOKEN

tradingview-chrome-mcp

Shared secret between .exe and extension.

TV_APPROVAL_TIMEOUT_MS

120000

How long writes wait for your approval.

TV_DATA_DIR

%LOCALAPPDATA%\tradingview-chrome-mcp

Logs, backups, screenshots, exports.

OPENAI_API_KEY / ANTHROPIC_API_KEY

β€”

Enables autonomous tv_pine_autofix patching.

TV_AUTOFIX_MODEL

gpt-4o / claude-3-5-sonnet-20241022

LLM used by the repair loop.

TV_ENABLE_SENTIMENT_NEWS

0

Set to 1 to expose tv_market_sentiment and tv_financial_news.

TV_ENABLE_BROWSER_POOL

0

Set to 1 to enable the experimental Playwright browser-pool reuse.

TV_ENABLE_BOTH_BACKENDS

0

Set to 1 to expose market-data API tools alongside the browser backend.

Example: open directly on XAUUSD

$env:TV_DEFAULT_TRADINGVIEW_URL = "https://www.tradingview.com/chart/?symbol=OANDA%3AXAUUSD"
.\tradingview-chrome-mcp.exe

How the autonomous Pine Script loop works

AI writes Pine Script
        β”‚
        β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  MCP .exe (Windows)   β”‚
β”‚  STDIO / HTTP bridge  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
            β”‚ JSON-RPC over WebSocket (extension driver)
            β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Chrome extension       β”‚
β”‚ service worker         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
            β”‚ chrome.scripting.executeScript({ world: "MAIN" })
            β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ TradingView tab        β”‚
β”‚ Monaco editor          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
            β”‚ compile error toast appears
            β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ error_observer.js      β”‚
β”‚ MutationObserver       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
            β”‚ PINE_SCRIPT_ERROR_DETECTED
            β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ MCP .exe receives errorβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
            β”‚ error text passed to AI
            β–Ό
AI patches code and retries

Building the .exe from source

On a Windows machine with Node.js 22.5+ (24+ recommended):

git clone https://github.com/firyomaefx/tradingview-chrome-mcp.git
cd tradingview-chrome-mcp
npm install
npm run build:exe

Outputs:

  • TradingView-Chrome-MCP-0.8.0-portable.exe (~1.2 GB) β€” single-file portable app.

  • TradingView-Chrome-MCP-0.8.0-windows-setup.exe (~1.2 GB) β€” classic Windows installer.

Both embed Node.js, the compiled server, and all runtime dependencies via caxa. The setup .exe is produced only if Inno Setup 6 or 7 is installed.


Run from source (no .exe)

For development or non-Windows platforms. Requires Node.js 22.5+ (24+ recommended) β€” the server uses the built-in node:sqlite module, which is missing in Node 20. On an unsupported Node it prints an actionable upgrade message and exits.

git clone https://github.com/firyomaefx/tradingview-chrome-mcp.git
cd tradingview-chrome-mcp
npm install                       # no native deps; no build tools required
npx playwright install chromium   # only needed for the default playwright driver
npm run build                     # required: dist/ is gitignored and not shipped
npm start                         # MCP server over STDIO; boots with zero config

The server starts with no .env at all. To customize ports, Chrome path, cloud sync, or the LLM key: cp .env.example .env and edit. See INSTALL.md Option C for the launcher-with-shortcuts flow.


Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      STDIO / HTTP       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  MCP host       β”‚  ───────────────────────▢  β”‚  tradingview-chrome  β”‚
β”‚  (Claude, Codex,β”‚                           β”‚  -mcp.exe             β”‚
β”‚  ChatGPT, etc.) β”‚                           β”‚                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                           β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
                                              β”‚  β”‚ Tool registry β”‚   β”‚
                                              β”‚  β”‚ Policy +      β”‚   β”‚
                                              β”‚  β”‚ approvals     β”‚   β”‚
                                              β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
                                              β”‚          β”‚           β”‚
                                              β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”   β”‚
                                              β”‚  β”‚ Browser driverβ”‚   β”‚
                                              β”‚  β”‚ (Playwright   β”‚   β”‚
                                              β”‚  β”‚  or extension)β”‚   β”‚
                                              β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
                                              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                         β”‚
                                              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                              β”‚  Google Chrome      β”‚
                                              β”‚  TradingView tab    β”‚
                                              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Read ARCHITECTURE.md for diagrams, invariants, and transport details.


Security & privacy

  • No credential storage. Cookies, tokens, and passwords are never read or transmitted.

  • Temporary Chrome profile by default. Isolated unless you opt into TV_ALLOW_REAL_PROFILE=1.

  • Dashboard bearer token. All dashboard API calls require Authorization: Bearer <TV_DASHBOARD_TOKEN>.

  • Local-only audit logs. Every action is written to logs/audit.jsonl with sensitive inputs redacted.

  • Approval-gated writes. Destructive tools require explicit dashboard approval.

  • Emergency stop. Instantly disables all tool execution.

  • Domain allowlist. Browser tools only run on tradingview.com / www.tradingview.com.

  • No remote telemetry in local mode. The Vercel-hosted fork is separate and opt-in.


Project layout

tradingview-chrome-mcp/
β”œβ”€β”€ src/                    # Local MCP server
β”‚   β”œβ”€β”€ server/             # STDIO + HTTP transports
β”‚   β”œβ”€β”€ tools/              # Tool registry (60 tools)
β”‚   β”œβ”€β”€ adapters/           # TradingView DOM automation
β”‚   β”œβ”€β”€ browser/            # Playwright + extension drivers
β”‚   β”œβ”€β”€ dashboard/          # Local Express control panel
β”‚   β”œβ”€β”€ permissions/        # Policy + approval queue
β”‚   β”œβ”€β”€ detect/             # MCP host client detection
β”‚   β”œβ”€β”€ telemetry/          # Privacy-first telemetry helpers
β”‚   └── config.ts           # Centralized config
β”œβ”€β”€ extension/              # Optional Chrome extension (MV3)
β”œβ”€β”€ scripts/                # Launchers, installer (Inno Setup .iss)
β”œβ”€β”€ vercel-hosted/          # Separate Vercel SSE fork
β”œβ”€β”€ tests/                  # Unit + integration tests
└── docs/                   # README, INSTALL, HOSTED, etc.

Development status

  • Version: 0.8.0

  • Default branch: main

  • Local tests: 123 passing

  • CI: .github/workflows/ci.yml runs Windows and Ubuntu jobs on every push.


License

MIT. See LICENSE.

Install Server
F
license - not found
A
quality
A
maintenance

Maintenance

–Maintainers
–Response time
4dRelease cycle
3Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • AI-powered browser automation β€” navigate, click, fill forms, and extract data from any website.

  • Renders interactive Chart.js charts and dashboards inline in AI conversations.

  • Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/firyomaefx/tradingview-chrome-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server