tradesdontlie/tradingview-mcpPublic

AI-assisted TradingView chart analysis — connect Claude Code to your TradingView Desktop for personal workflow automation

AI summary: Bridge for AI-assisted TradingView chart analysis and Pine Script automation.

Stars
6.7K
+2 today
Forks
2.8K
Watchers
96
Open issues
65
Open PRs
198
Contributors
~11
Commits
97
Branches
19

JavaScriptOtherCreated Mar 29, 2026Last push 2mo ago+61 stars this week+262 this month

Quick answers

What is tradingview-mcp?
Bridge for AI-assisted TradingView chart analysis and Pine Script automation.
What does tradingview-mcp do?
This project provides a Model Context Protocol (MCP) bridge that connects AI assistants, like Claude Code, directly to a locally running TradingView Desktop application. It uses the Chrome DevTools Protocol to read chart data and control the application interface. It enables AI-assisted technical analysis, automated workflow execution, and interactive Pine Script development entirely within the user's local environment, without circumventing TradingView's paywalls.
Who is tradingview-mcp for?
Algorithmic traders, Pine Script developers, and technical analysts who want to integrate AI assistants with their local TradingView workflow.
How do I get started with tradingview-mcp?
https://github.com/tradesdontlie/tradingview-mcp
How popular is tradingview-mcp on GitHub?
tradesdontlie/tradingview-mcp has 6,705 stars and 2,792 forks on GitHub, and gained 61 stars in the last 7 days.
What license does tradingview-mcp use?
tradesdontlie/tradingview-mcp is released under the Other license.

Star history

since Sep 18, 2026
02K4K6KSep 2026Sep 2026Sep 2026Oct 2026
6.7K stars as of Oct 3, 2026. Measured daily since Sep 18, 2026; GitHub no longer exposes earlier star timestamps.

Contribution activity

commits per day, last 52 weeks
OctNovDecJanFebMarAprMayJunJulAugSepMonWedFri2025-10-05: 0 commits2025-10-06: 0 commits2025-10-07: 0 commits2025-10-08: 0 commits2025-10-09: 0 commits2025-10-10: 0 commits2025-10-11: 0 commits2025-10-12: 0 commits2025-10-13: 0 commits2025-10-14: 0 commits2025-10-15: 0 commits2025-10-16: 0 commits2025-10-17: 0 commits2025-10-18: 0 commits2025-10-19: 0 commits2025-10-20: 0 commits2025-10-21: 0 commits2025-10-22: 0 commits2025-10-23: 0 commits2025-10-24: 0 commits2025-10-25: 0 commits2025-10-26: 0 commits2025-10-27: 0 commits2025-10-28: 0 commits2025-10-29: 0 commits2025-10-30: 0 commits2025-10-31: 0 commits2025-11-01: 0 commits2025-11-02: 0 commits2025-11-03: 0 commits2025-11-04: 0 commits2025-11-05: 0 commits2025-11-06: 0 commits2025-11-07: 0 commits2025-11-08: 0 commits2025-11-09: 0 commits2025-11-10: 0 commits2025-11-11: 0 commits2025-11-12: 0 commits2025-11-13: 0 commits2025-11-14: 0 commits2025-11-15: 0 commits2025-11-16: 0 commits2025-11-17: 0 commits2025-11-18: 0 commits2025-11-19: 0 commits2025-11-20: 0 commits2025-11-21: 0 commits2025-11-22: 0 commits2025-11-23: 0 commits2025-11-24: 0 commits2025-11-25: 0 commits2025-11-26: 0 commits2025-11-27: 0 commits2025-11-28: 0 commits2025-11-29: 0 commits2025-11-30: 0 commits2025-12-01: 0 commits2025-12-02: 0 commits2025-12-03: 0 commits2025-12-04: 0 commits2025-12-05: 0 commits2025-12-06: 0 commits2025-12-07: 0 commits2025-12-08: 0 commits2025-12-09: 0 commits2025-12-10: 0 commits2025-12-11: 0 commits2025-12-12: 0 commits2025-12-13: 0 commits2025-12-14: 0 commits2025-12-15: 0 commits2025-12-16: 0 commits2025-12-17: 0 commits2025-12-18: 0 commits2025-12-19: 0 commits2025-12-20: 0 commits2025-12-21: 0 commits2025-12-22: 0 commits2025-12-23: 0 commits2025-12-24: 0 commits2025-12-25: 0 commits2025-12-26: 0 commits2025-12-27: 0 commits2025-12-28: 0 commits2025-12-29: 0 commits2025-12-30: 0 commits2025-12-31: 0 commits2026-01-01: 0 commits2026-01-02: 0 commits2026-01-03: 0 commits2026-01-04: 0 commits2026-01-05: 0 commits2026-01-06: 0 commits2026-01-07: 0 commits2026-01-08: 0 commits2026-01-09: 0 commits2026-01-10: 0 commits2026-01-11: 0 commits2026-01-12: 0 commits2026-01-13: 0 commits2026-01-14: 0 commits2026-01-15: 0 commits2026-01-16: 0 commits2026-01-17: 0 commits2026-01-18: 0 commits2026-01-19: 0 commits2026-01-20: 0 commits2026-01-21: 0 commits2026-01-22: 0 commits2026-01-23: 0 commits2026-01-24: 0 commits2026-01-25: 0 commits2026-01-26: 0 commits2026-01-27: 0 commits2026-01-28: 0 commits2026-01-29: 0 commits2026-01-30: 0 commits2026-01-31: 0 commits2026-02-01: 0 commits2026-02-02: 0 commits2026-02-03: 0 commits2026-02-04: 0 commits2026-02-05: 0 commits2026-02-06: 0 commits2026-02-07: 0 commits2026-02-08: 0 commits2026-02-09: 0 commits2026-02-10: 0 commits2026-02-11: 0 commits2026-02-12: 0 commits2026-02-13: 0 commits2026-02-14: 0 commits2026-02-15: 0 commits2026-02-16: 0 commits2026-02-17: 0 commits2026-02-18: 0 commits2026-02-19: 0 commits2026-02-20: 0 commits2026-02-21: 0 commits2026-02-22: 0 commits2026-02-23: 0 commits2026-02-24: 0 commits2026-02-25: 0 commits2026-02-26: 0 commits2026-02-27: 0 commits2026-02-28: 0 commits2026-03-01: 0 commits2026-03-02: 0 commits2026-03-03: 0 commits2026-03-04: 0 commits2026-03-05: 0 commits2026-03-06: 0 commits2026-03-07: 0 commits2026-03-08: 0 commits2026-03-09: 0 commits2026-03-10: 0 commits2026-03-11: 0 commits2026-03-12: 0 commits2026-03-13: 0 commits2026-03-14: 0 commits2026-03-15: 0 commits2026-03-16: 1 commit2026-03-17: 0 commits2026-03-18: 0 commits2026-03-19: 0 commits2026-03-20: 0 commits2026-03-21: 0 commits2026-03-22: 0 commits2026-03-23: 0 commits2026-03-24: 0 commits2026-03-25: 3 commits2026-03-26: 0 commits2026-03-27: 0 commits2026-03-28: 0 commits2026-03-29: 9 commits2026-03-30: 1 commit2026-03-31: 11 commits2026-04-01: 0 commits2026-04-02: 0 commits2026-04-03: 5 commits2026-04-04: 0 commits2026-04-05: 0 commits2026-04-06: 0 commits2026-04-07: 0 commits2026-04-08: 0 commits2026-04-09: 1 commit2026-04-10: 0 commits2026-04-11: 0 commits2026-04-12: 0 commits2026-04-13: 0 commits2026-04-14: 0 commits2026-04-15: 0 commits2026-04-16: 0 commits2026-04-17: 0 commits2026-04-18: 0 commits2026-04-19: 0 commits2026-04-20: 0 commits2026-04-21: 0 commits2026-04-22: 0 commits2026-04-23: 0 commits2026-04-24: 0 commits2026-04-25: 1 commit2026-04-26: 0 commits2026-04-27: 0 commits2026-04-28: 0 commits2026-04-29: 0 commits2026-04-30: 0 commits2026-05-01: 0 commits2026-05-02: 0 commits2026-05-03: 0 commits2026-05-04: 0 commits2026-05-05: 0 commits2026-05-06: 0 commits2026-05-07: 0 commits2026-05-08: 0 commits2026-05-09: 0 commits2026-05-10: 0 commits2026-05-11: 0 commits2026-05-12: 0 commits2026-05-13: 0 commits2026-05-14: 0 commits2026-05-15: 0 commits2026-05-16: 0 commits2026-05-17: 0 commits2026-05-18: 0 commits2026-05-19: 0 commits2026-05-20: 0 commits2026-05-21: 0 commits2026-05-22: 1 commit2026-05-23: 0 commits2026-05-24: 0 commits2026-05-25: 0 commits2026-05-26: 0 commits2026-05-27: 1 commit2026-05-28: 0 commits2026-05-29: 0 commits2026-05-30: 0 commits2026-05-31: 0 commits2026-06-01: 1 commit2026-06-02: 2 commits2026-06-03: 0 commits2026-06-04: 0 commits2026-06-05: 0 commits2026-06-06: 1 commit2026-06-07: 1 commit2026-06-08: 0 commits2026-06-09: 0 commits2026-06-10: 0 commits2026-06-11: 0 commits2026-06-12: 0 commits2026-06-13: 1 commit2026-06-14: 0 commits2026-06-15: 0 commits2026-06-16: 0 commits2026-06-17: 0 commits2026-06-18: 0 commits2026-06-19: 1 commit2026-06-20: 0 commits2026-06-21: 0 commits2026-06-22: 0 commits2026-06-23: 1 commit2026-06-24: 0 commits2026-06-25: 0 commits2026-06-26: 0 commits2026-06-27: 0 commits2026-06-28: 0 commits2026-06-29: 0 commits2026-06-30: 1 commit2026-07-01: 1 commit2026-07-02: 0 commits2026-07-03: 0 commits2026-07-04: 18 commits2026-07-05: 1 commit2026-07-06: 1 commit2026-07-07: 0 commits2026-07-08: 0 commits2026-07-09: 0 commits2026-07-10: 0 commits2026-07-11: 0 commits2026-07-12: 0 commits2026-07-13: 0 commits2026-07-14: 0 commits2026-07-15: 0 commits2026-07-16: 0 commits2026-07-17: 0 commits2026-07-18: 0 commits2026-07-19: 0 commits2026-07-20: 0 commits2026-07-21: 1 commit2026-07-22: 0 commits2026-07-23: 0 commits2026-07-24: 0 commits2026-07-25: 0 commits2026-07-26: 0 commits2026-07-27: 0 commits2026-07-28: 0 commits2026-07-29: 0 commits2026-07-30: 0 commits2026-07-31: 0 commits2026-08-01: 0 commits2026-08-02: 0 commits2026-08-03: 0 commits2026-08-04: 0 commits2026-08-05: 0 commits2026-08-06: 0 commits2026-08-07: 0 commits2026-08-08: 0 commits2026-08-09: 0 commits2026-08-10: 0 commits2026-08-11: 0 commits2026-08-12: 0 commits2026-08-13: 0 commits2026-08-14: 0 commits2026-08-15: 0 commits2026-08-16: 0 commits2026-08-17: 0 commits2026-08-18: 0 commits2026-08-19: 0 commits2026-08-20: 0 commits2026-08-21: 0 commits2026-08-22: 0 commits2026-08-23: 0 commits2026-08-24: 0 commits2026-08-25: 0 commits2026-08-26: 0 commits2026-08-27: 0 commits2026-08-28: 0 commits2026-08-29: 0 commits2026-08-30: 0 commits2026-08-31: 0 commits2026-09-01: 0 commits2026-09-02: 0 commits2026-09-03: 0 commits2026-09-04: 0 commits2026-09-05: 0 commits2026-09-06: 0 commits2026-09-07: 0 commits2026-09-08: 0 commits2026-09-09: 0 commits2026-09-10: 0 commits2026-09-11: 0 commits2026-09-12: 0 commits2026-09-13: 0 commits2026-09-14: 0 commits2026-09-15: 0 commits2026-09-16: 0 commits2026-09-17: 0 commits2026-09-18: 0 commits2026-09-19: 0 commits2026-09-20: 0 commits2026-09-21: 0 commits2026-09-22: 0 commits2026-09-23: 0 commits2026-09-24: 0 commits2026-09-25: 0 commits2026-09-26: 0 commits2026-09-27: 0 commits2026-09-28: 0 commits2026-09-29: 0 commits2026-09-30: 0 commits2026-10-01: 0 commits2026-10-02: 0 commits2026-10-03: 0 commits
65 commits in the last yearLessMore

What tradingview-mcp does

This project provides a Model Context Protocol (MCP) bridge that connects AI assistants, like Claude Code, directly to a locally running TradingView Desktop application. It uses the Chrome DevTools Protocol to read chart data and control the application interface. It enables AI-assisted technical analysis, automated workflow execution, and interactive Pine Script development entirely within the user's local environment, without circumventing TradingView's paywalls.

Algorithmic traders, Pine Script developers, and technical analysts who want to integrate AI assistants with their local TradingView workflow.

  • Local execution: processes all data locally by interacting directly with the installed TradingView app.
  • Chrome DevTools integration: utilizes CDP to read charts and manipulate the TradingView interface.
  • Claude Code connectivity: exposes TradingView data to AI agents via the Model Context Protocol.
  • Pine Script assistance: helps developers write and debug custom trading indicators interactively.
  • Workflow automation: allows AI agents to automate repetitive chart analysis tasks.

Where teams use it

AI chart analysis

Use Claude to interpret current chart data and technical indicators directly from the desktop app.

Automate Pine Scripting

Have an AI agent assist in writing, testing, and debugging Pine Script strategies interactively.

Streamline workflows

Automate repetitive chart setups and data gathering using AI-driven commands.

Local algorithmic testing

Analyze market data securely on your local machine without sending sensitive strategies to the cloud.

Getting started: https://github.com/tradesdontlie/tradingview-mcp

README

main branch

TradingView MCP Bridge

MCP Toplist

Personal AI assistant for your TradingView Desktop charts. Connects Claude Code to your locally running TradingView app via Chrome DevTools Protocol for AI-assisted chart analysis, Pine Script development, and workflow automation.

Warning

This tool is not affiliated with, endorsed by, or associated with TradingView Inc. It interacts with your locally running TradingView Desktop application via Chrome DevTools Protocol. Review the Disclaimer before use.

Important

Requires a valid TradingView subscription. This tool does not bypass or circumvent any TradingView paywall or access control. It reads from and controls the TradingView Desktop app already running on your machine.

Note

All data processing occurs locally on your machine. No TradingView data is transmitted, stored, or redistributed externally by this tool.

Caution

This tool accesses undocumented internal TradingView APIs via the Electron debug interface. These can change or break without notice in any TradingView update. Pin your TradingView Desktop version if stability matters to you.

How It Works (and why it's safe to run)

This tool does not connect to TradingView's servers, modify any TradingView files, or intercept any network traffic. It communicates exclusively with your locally running TradingView Desktop instance via Chrome DevTools Protocol (CDP) — a standard debugging interface built into all Chromium/Electron applications by Google, including VS Code, Slack, and Discord.

The debug port is disabled by default and must be explicitly enabled by you using a standard Chromium flag (--remote-debugging-port=9222). Nothing happens without that deliberate step.

What This Tool Does Not Do

  • Connect to TradingView's servers or APIs
  • Store, transmit, or redistribute any market data
  • Work without a valid TradingView subscription and installed Desktop app
  • Bypass any TradingView paywall or access restriction
  • Execute real trades (chart interaction only)
  • Work if TradingView changes their internal Electron structure

Research Context

This project explores an open research question: how can LLM-based agents interact with professional trading interfaces to support human decision-making?

Specifically it investigates:

  • How structured tool APIs (MCP) can bridge LLMs and stateful desktop financial applications
  • What latency, context, and reliability constraints emerge when an agent operates on live chart data
  • How agents handle ambiguous financial UI state (e.g. interpreting Pine Script output, reading indicator tables)
  • Whether natural language is an effective interface for chart navigation and Pine Script development
  • The failure modes of LLM agents operating in real-time data environments

This is not a trading bot. It is an interface layer that makes a trading application legible to an LLM agent, allowing researchers and developers to study human-AI collaboration in financial workflows.

See RESEARCH.md for open questions, findings, and related work.

Prerequisites

  • TradingView Desktop app (paid subscription required for real-time data)
  • Node.js 18+
  • Claude Code with MCP support (for MCP tools) or any terminal (for CLI)
  • macOS, Windows, or Linux

What It Does

Gives your AI assistant eyes and hands on your own chart:

  • Pine Script development — write, inject, compile, debug, and iterate on scripts with AI assistance
  • Chart navigation — change symbols, timeframes, zoom to dates, add/remove indicators
  • Visual analysis — read your chart's indicator values, price levels, and annotations
  • Draw on charts — trend lines, horizontal lines, rectangles, text annotations
  • Manage alerts — create, list, and delete price alerts
  • Replay practice — step through historical bars, practice entries/exits
  • Screenshots — capture chart state for AI visual analysis
  • Multi-pane layouts — set up 2x2, 3x1, etc. grids with different symbols per pane
  • Monitor your chart — stream JSONL from your locally running chart for local monitoring scripts
  • CLI access — every MCP tool is also a tv CLI command, pipe-friendly with JSON output
  • Launch TradingView — auto-detect and launch with debug mode from any platform

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.

Or follow the manual steps below.

Quick Start

1. Install

git clone https://github.com/tradesdontlie/tradingview-mcp.git
cd tradingview-mcp
npm install

2. Launch TradingView with CDP

TradingView Desktop must be running with Chrome DevTools Protocol enabled on port 9222.

Mac:

./scripts/launch_tv_debug_mac.sh

Windows:

scripts\launch_tv_debug.bat

Linux:

./scripts/launch_tv_debug_linux.sh

Or launch manually on any platform:

/path/to/TradingView --remote-debugging-port=9222

Or use the MCP tool (auto-detects your install):

"Use tv_launch to start TradingView in debug mode"

3. Add to Claude Code

Add to your Claude Code MCP config (~/.claude/.mcp.json or project .mcp.json):

{
  "mcpServers": {
    "tradingview": {
      "command": "node",
      "args": ["/path/to/tradingview-mcp/src/server.js"]
    }
  }
}

Replace /path/to/tradingview-mcp with your actual path.

4. Verify

Ask Claude: "Use tv_health_check to verify TradingView is connected"

CLI

Every MCP tool is also accessible as a tv CLI command. All output is JSON for piping with jq.

# Install globally (optional)
npm link

# Or run directly
node src/cli/index.js <command>

Quick Examples

tv status                          # check connection
tv quote                           # current price
tv symbol AAPL                     # change symbol
tv ohlcv --summary                 # price summary
tv screenshot -r chart             # capture chart
tv pine compile                    # compile Pine Script
tv pane layout 2x2                 # 4-chart grid
tv pane symbol 1 ES1!              # set pane symbol
tv stream quote | jq '.close'      # monitor price changes

All Commands

tv status / launch / state / symbol / timeframe / type / info / search
tv quote / ohlcv / values
tv data lines/labels/tables/boxes/strategy/trades/equity/depth/indicator
tv pine get/set/compile/analyze/check/save/new/open/list/errors/console
tv draw shape/list/get/remove/clear
tv alert list/create/delete
tv watchlist get/add
tv indicator add/remove/toggle/set/get
tv layout list/switch
tv pane list/layout/focus/symbol
tv tab list/new/close/switch
tv replay start/step/stop/status/autoplay/trade
tv stream quote/bars/values/lines/labels/tables/all
tv ui click/keyboard/hover/scroll/find/eval/type/panel/fullscreen/mouse
tv screenshot / discover / ui-state / range / scroll

Streaming

The tv stream commands poll your locally running TradingView Desktop instance at regular intervals via Chrome DevTools Protocol on localhost.

No connection is made to TradingView's servers. All data stays on your machine.

Warning

Programmatic consumption of TradingView data may conflict with their Terms of Use regardless of the data source. You are solely responsible for ensuring your usage complies.

tv stream quote                          # price tick monitoring
tv stream bars                           # bar-by-bar updates
tv stream values                         # indicator value monitoring
tv stream lines --filter "NY Levels"     # price level monitoring
tv stream tables --filter Profiler       # table data monitoring
tv stream all                            # all panes at once (multi-symbol)

How Claude Knows Which Tool to Use

Claude reads CLAUDE.md automatically when working in this project. It contains a complete decision tree:

You say... Claude uses...
"What's on my chart?" chart_get_state → data_get_study_values → quote_get
"What levels are showing?" data_get_pine_lines → data_get_pine_labels
"Read the session table" data_get_pine_tables with study_filter
"Give me a full analysis" quote_get → data_get_study_values → data_get_pine_lines → data_get_pine_labels → data_get_pine_tables → data_get_ohlcv (summary) → capture_screenshot
"Switch to AAPL daily" chart_set_symbol → chart_set_timeframe
"Write a Pine Script for..." pine_set_source → pine_smart_compile → pine_get_errors
"Start replay at March 1st" replay_start → replay_step → replay_trade
"Set up a 4-chart grid" pane_set_layout → pane_set_symbol for each pane
"Draw a level at 24500" draw_shape (horizontal_line)
"Take a screenshot" capture_screenshot

Tool Reference (78 MCP tools)

Chart Reading

Tool When to use Output size
chart_get_state First call — get symbol, timeframe, all indicator names + IDs ~500B
data_get_study_values Read current RSI, MACD, BB, EMA values from all indicators ~500B
quote_get Get latest price, OHLC, volume ~200B
data_get_ohlcv Get price bars. Use summary: true for compact stats 500B (summary) / 8KB (100 bars)

Custom Indicator Data (Pine Drawings)

Read line.new(), label.new(), table.new(), box.new() output from any visible Pine indicator.

Tool When to use Output size
data_get_pine_lines Read horizontal price levels (support/resistance, session levels) ~1-3KB
data_get_pine_labels Read text annotations + prices ("PDH 24550", "Bias Long") ~2-5KB
data_get_pine_tables Read data tables (session stats, analytics dashboards) ~1-4KB
data_get_pine_boxes Read price zones / ranges as {high, low} pairs ~1-2KB

Always use study_filter to target a specific indicator: study_filter: "Profiler".

Chart Control

Tool What it does
chart_set_symbol Change ticker (BTCUSD, AAPL, ES1!, NYMEX:CL1!)
chart_set_timeframe Change resolution (1, 5, 15, 60, D, W, M)
chart_set_type Change style (Candles, HeikinAshi, Line, Area, Renko)
chart_manage_indicator Add/remove indicators. Use full names: "Relative Strength Index" not "RSI"
chart_scroll_to_date Jump to a date (ISO: "2025-01-15")
chart_set_visible_range Zoom to exact range (unix timestamps)
symbol_info / symbol_search Symbol metadata and search
indicator_set_inputs / indicator_toggle_visibility Change indicator settings, show/hide

Multi-Pane Layouts

Tool What it does
pane_list List all panes with symbols and active state
pane_set_layout Change grid: s, 2h, 2v, 2x2, 4, 6, 8
pane_focus Focus a specific pane by index
pane_set_symbol Set symbol on any pane

Tab Management

Tool What it does
tab_list List open chart tabs
tab_new / tab_close Open/close tabs
tab_switch Switch to a tab by index

Pine Script Development

Tool Step
pine_set_source 1. Inject code into editor
pine_smart_compile 2. Compile with auto-detection + error check
pine_get_errors 3. Read compilation errors if any
pine_get_console 4. Read log.info() output
pine_save 5. Save to TradingView cloud
pine_get_source Read current script (warning: can be 200KB+ for complex scripts)
pine_new Create blank indicator/strategy/library
pine_open / pine_list_scripts Open or list saved scripts
pine_analyze Offline static analysis (no chart needed)
pine_check Server-side compile check (no chart needed)

Replay Mode

Tool Step
replay_start Enter replay at a date
replay_step Advance one bar
replay_autoplay Auto-advance (set speed in ms)
replay_trade Buy/sell/close positions
replay_status Check position, P&L, date
replay_stop Return to realtime

Drawing, Alerts, UI Automation

Tool What it does
draw_shape Draw horizontal_line, trend_line, rectangle, text
draw_list / draw_remove_one / draw_clear Manage drawings
alert_create / alert_list / alert_delete Manage price alerts
capture_screenshot Screenshot (regions: full, chart, strategy_tester)
batch_run Run action across multiple symbols/timeframes
watchlist_get / watchlist_add Read/modify watchlist
layout_list / layout_switch Manage saved layouts
ui_open_panel / ui_click / ui_evaluate UI automation
tv_launch / tv_health_check / tv_discover Connection management

Context Management

Tools return compact output by default to minimize context usage. For a typical "analyze my chart" workflow, total context is ~5-10KB instead of ~80KB.

Feature How it saves context
Pine lines Returns deduplicated price levels only, not every line object
Pine labels Capped at 50 per study, text+price only
Pine tables Pre-formatted row strings, no cell metadata
Pine boxes Deduplicated {high, low} zones only
OHLCV summary mode Stats + last 5 bars instead of all bars
Indicator inputs Encrypted/encoded blobs auto-filtered
verbose: true Pass on any pine tool to get raw data with IDs/colors when needed
study_filter Target one indicator instead of scanning all

Finding TradingView on Your System

Launch scripts and tv_launch auto-detect TradingView. If auto-detection fails:

Platform Common Locations
Mac /Applications/TradingView.app/Contents/MacOS/TradingView
Windows %LOCALAPPDATA%\TradingView\TradingView.exe, %PROGRAMFILES%\WindowsApps\TradingView*\TradingView.exe
Linux /opt/TradingView/tradingview, ~/.local/share/TradingView/TradingView, /snap/tradingview/current/tradingview

The key flag: --remote-debugging-port=9222

Testing

# Requires TradingView running with --remote-debugging-port=9222
npm test

29 tests covering: Pine Script static analysis, server-side compilation, and CLI routing.

Architecture

Claude Code  ←→  MCP Server (stdio)  ←→  CDP (port 9222)  ←→  TradingView Desktop (Electron)
  • Transport: MCP over stdio (84 tools) + CLI (tv command, 30 commands with 66 subcommands)
  • Connection: Chrome DevTools Protocol on localhost:9222
  • Streaming: Poll-and-diff loop with deduplication, JSONL output to stdout
  • No dependencies beyond @modelcontextprotocol/sdk and chrome-remote-interface

Attributions

This project is not affiliated with, endorsed by, or associated with:

  • TradingView Inc. — TradingView is a trademark of TradingView Inc.
  • Anthropic — Claude and Claude Code are trademarks of Anthropic, PBC.

This tool is an independent MCP server that connects to Claude Code via the standard MCP protocol. It does not contain or modify any Anthropic software.

Disclaimer

This project is provided for personal, educational, and research purposes only.

How this tool works: This tool uses Chrome DevTools Protocol (CDP), the standard debugging interface built into Chromium-based applications. It does not reverse engineer any proprietary TradingView protocol, connect to TradingView's servers, or bypass any access controls. The debug port must be explicitly enabled by the user via a standard Chromium command-line flag (--remote-debugging-port=9222).

By using this software, you acknowledge and agree that:

  1. You are solely responsible for ensuring your use of this tool complies with TradingView's Terms of Use and all applicable laws.
  2. TradingView's Terms of Use restrict automated data collection, scraping, and non-display usage of their platform and data. This tool uses Chrome DevTools Protocol to programmatically interact with the TradingView Desktop app, which may conflict with those terms.
  3. You assume all risk associated with using this tool. The authors are not responsible for any account bans, suspensions, legal actions, or other consequences resulting from its use.
  4. This tool must not be used for, including but not limited to:
    • Redistributing, reselling, or commercially exploiting TradingView's market data
    • Circumventing TradingView's access controls or subscription restrictions
    • Performing automated trading or algorithmic decision-making using extracted data
    • Violating the intellectual property rights of Pine Script indicator authors
    • Connecting to TradingView's servers or infrastructure (all access is via the locally running Desktop app)
  5. The streaming functionality monitors your locally running TradingView Desktop instance only. It does not connect to TradingView's servers or extract data from TradingView's infrastructure.
  6. Market data accessed through this tool remains subject to exchange and data provider licensing terms. Do not redistribute, store, or commercially exploit any data obtained through this tool.
  7. This tool accesses internal, undocumented TradingView application interfaces that may change or break at any time without notice.

Use at your own risk. If you are unsure whether your intended use complies with TradingView's terms, do not use this tool.

License

MIT — see LICENSE for details.

The MIT license applies to the source code of this project only. It does not grant any rights to TradingView's software, data, trademarks, or intellectual property.

View on GitHub

Recent activity

commits and pull requests

Code frequency

additions and deletions
+9.6K-9.6KWeek of 2026-03-15: +6,091 linesWeek of 2026-03-15: -0 linesWeek of 2026-03-22: +834 linesWeek of 2026-03-22: -84 linesWeek of 2026-03-29: +9,564 linesWeek of 2026-03-29: -5,896 linesWeek of 2026-04-05: +13 linesWeek of 2026-04-05: -0 linesWeek of 2026-04-12: +0 linesWeek of 2026-04-12: -0 linesWeek of 2026-04-19: +87 linesWeek of 2026-04-19: -33 linesWeek of 2026-04-26: +0 linesWeek of 2026-04-26: -0 linesWeek of 2026-05-03: +0 linesWeek of 2026-05-03: -0 linesWeek of 2026-05-10: +0 linesWeek of 2026-05-10: -0 linesWeek of 2026-05-17: +1 linesWeek of 2026-05-17: -1 linesWeek of 2026-05-24: +1 linesWeek of 2026-05-24: -1 linesWeek of 2026-05-31: +1,079 linesWeek of 2026-05-31: -11 linesWeek of 2026-06-07: +69 linesWeek of 2026-06-07: -5 linesWeek of 2026-06-14: +1 linesWeek of 2026-06-14: -0 linesWeek of 2026-06-21: +1 linesWeek of 2026-06-21: -1 linesWeek of 2026-06-28: +1,700 linesWeek of 2026-06-28: -485 linesWeek of 2026-07-05: +267 linesWeek of 2026-07-05: -3 linesWeek of 2026-07-12: +0 linesWeek of 2026-07-12: -0 linesWeek of 2026-07-19: +5 linesWeek of 2026-07-19: -5 linesWeek of 2026-07-26: +0 linesWeek of 2026-07-26: -0 linesWeek of 2026-08-02: +0 linesWeek of 2026-08-02: -0 linesWeek of 2026-08-09: +0 linesWeek of 2026-08-09: -0 linesWeek of 2026-08-16: +0 linesWeek of 2026-08-16: -0 linesWeek of 2026-08-23: +0 linesWeek of 2026-08-23: -0 linesWeek of 2026-08-30: +0 linesWeek of 2026-08-30: -0 linesWeek of 2026-09-06: +0 linesWeek of 2026-09-06: -0 linesWeek of 2026-09-13: +0 linesWeek of 2026-09-13: -0 linesMar 15, 2026Sep 13, 2026
+19.7K lines added, -6.5K removed over the last year.

Commits per week

last 52 weeks
260Week of 2025-10-05: 0 commitsWeek of 2025-10-12: 0 commitsWeek of 2025-10-19: 0 commitsWeek of 2025-10-26: 0 commitsWeek of 2025-11-02: 0 commitsWeek of 2025-11-09: 0 commitsWeek of 2025-11-16: 0 commitsWeek of 2025-11-23: 0 commitsWeek of 2025-11-30: 0 commitsWeek of 2025-12-07: 0 commitsWeek of 2025-12-14: 0 commitsWeek of 2025-12-21: 0 commitsWeek of 2025-12-28: 0 commitsWeek of 2026-01-04: 0 commitsWeek of 2026-01-11: 0 commitsWeek of 2026-01-18: 0 commitsWeek of 2026-01-25: 0 commitsWeek of 2026-02-01: 0 commitsWeek of 2026-02-08: 0 commitsWeek of 2026-02-15: 0 commitsWeek of 2026-02-22: 0 commitsWeek of 2026-03-01: 0 commitsWeek of 2026-03-08: 0 commitsWeek of 2026-03-15: 1 commitsWeek of 2026-03-22: 3 commitsWeek of 2026-03-29: 26 commitsWeek of 2026-04-05: 1 commitsWeek of 2026-04-12: 0 commitsWeek of 2026-04-19: 1 commitsWeek of 2026-04-26: 0 commitsWeek of 2026-05-03: 0 commitsWeek of 2026-05-10: 0 commitsWeek of 2026-05-17: 1 commitsWeek of 2026-05-24: 1 commitsWeek of 2026-05-31: 4 commitsWeek of 2026-06-07: 2 commitsWeek of 2026-06-14: 1 commitsWeek of 2026-06-21: 1 commitsWeek of 2026-06-28: 20 commitsWeek of 2026-07-05: 2 commitsWeek of 2026-07-12: 0 commitsWeek of 2026-07-19: 1 commitsWeek of 2026-07-26: 0 commitsWeek of 2026-08-02: 0 commitsWeek of 2026-08-09: 0 commitsWeek of 2026-08-16: 0 commitsWeek of 2026-08-23: 0 commitsWeek of 2026-08-30: 0 commitsWeek of 2026-09-06: 0 commitsWeek of 2026-09-13: 0 commitsWeek of 2026-09-20: 0 commitsWeek of 2026-09-27: 0 commitsOct 5, 2025Sep 27, 2026
65 commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 0 commitsSun 1:00 — 0 commitsSun 2:00 — 0 commitsSun 3:00 — 0 commitsSun 4:00 — 0 commitsSun 5:00 — 0 commitsSun 6:00 — 0 commitsSun 7:00 — 0 commitsSun 8:00 — 0 commitsSun 9:00 — 0 commitsSun 10:00 — 8 commitsSun 11:00 — 0 commitsSun 12:00 — 1 commitsSun 13:00 — 0 commitsSun 14:00 — 0 commitsSun 15:00 — 0 commitsSun 16:00 — 1 commitsSun 17:00 — 0 commitsSun 18:00 — 0 commitsSun 19:00 — 0 commitsSun 20:00 — 1 commitsSun 21:00 — 0 commitsSun 22:00 — 0 commitsSun 23:00 — 0 commitsMon 0:00 — 0 commitsMon 1:00 — 0 commitsMon 2:00 — 0 commitsMon 3:00 — 0 commitsMon 4:00 — 0 commitsMon 5:00 — 0 commitsMon 6:00 — 0 commitsMon 7:00 — 0 commitsMon 8:00 — 0 commitsMon 9:00 — 0 commitsMon 10:00 — 1 commitsMon 11:00 — 2 commitsMon 12:00 — 0 commitsMon 13:00 — 0 commitsMon 14:00 — 0 commitsMon 15:00 — 0 commitsMon 16:00 — 0 commitsMon 17:00 — 0 commitsMon 18:00 — 0 commitsMon 19:00 — 0 commitsMon 20:00 — 0 commitsMon 21:00 — 0 commitsMon 22:00 — 0 commitsMon 23:00 — 1 commitsTue 0:00 — 0 commitsTue 1:00 — 0 commitsTue 2:00 — 0 commitsTue 3:00 — 0 commitsTue 4:00 — 0 commitsTue 5:00 — 0 commitsTue 6:00 — 0 commitsTue 7:00 — 0 commitsTue 8:00 — 0 commitsTue 9:00 — 3 commitsTue 10:00 — 3 commitsTue 11:00 — 2 commitsTue 12:00 — 6 commitsTue 13:00 — 0 commitsTue 14:00 — 0 commitsTue 15:00 — 1 commitsTue 16:00 — 0 commitsTue 17:00 — 1 commitsTue 18:00 — 0 commitsTue 19:00 — 1 commitsTue 20:00 — 0 commitsTue 21:00 — 0 commitsTue 22:00 — 0 commitsTue 23:00 — 0 commitsWed 0:00 — 0 commitsWed 1:00 — 0 commitsWed 2:00 — 0 commitsWed 3:00 — 0 commitsWed 4:00 — 0 commitsWed 5:00 — 0 commitsWed 6:00 — 0 commitsWed 7:00 — 0 commitsWed 8:00 — 1 commitsWed 9:00 — 0 commitsWed 10:00 — 0 commitsWed 11:00 — 0 commitsWed 12:00 — 0 commitsWed 13:00 — 0 commitsWed 14:00 — 2 commitsWed 15:00 — 1 commitsWed 16:00 — 0 commitsWed 17:00 — 0 commitsWed 18:00 — 0 commitsWed 19:00 — 0 commitsWed 20:00 — 0 commitsWed 21:00 — 0 commitsWed 22:00 — 1 commitsWed 23:00 — 0 commitsThu 0:00 — 0 commitsThu 1:00 — 0 commitsThu 2:00 — 0 commitsThu 3:00 — 0 commitsThu 4:00 — 0 commitsThu 5:00 — 0 commitsThu 6:00 — 0 commitsThu 7:00 — 0 commitsThu 8:00 — 0 commitsThu 9:00 — 0 commitsThu 10:00 — 0 commitsThu 11:00 — 0 commitsThu 12:00 — 1 commitsThu 13:00 — 0 commitsThu 14:00 — 0 commitsThu 15:00 — 0 commitsThu 16:00 — 0 commitsThu 17:00 — 0 commitsThu 18:00 — 0 commitsThu 19:00 — 0 commitsThu 20:00 — 0 commitsThu 21:00 — 0 commitsThu 22:00 — 0 commitsThu 23:00 — 0 commitsFri 0:00 — 0 commitsFri 1:00 — 0 commitsFri 2:00 — 0 commitsFri 3:00 — 0 commitsFri 4:00 — 0 commitsFri 5:00 — 0 commitsFri 6:00 — 0 commitsFri 7:00 — 0 commitsFri 8:00 — 0 commitsFri 9:00 — 0 commitsFri 10:00 — 0 commitsFri 11:00 — 0 commitsFri 12:00 — 0 commitsFri 13:00 — 1 commitsFri 14:00 — 1 commitsFri 15:00 — 0 commitsFri 16:00 — 1 commitsFri 17:00 — 0 commitsFri 18:00 — 0 commitsFri 19:00 — 2 commitsFri 20:00 — 2 commitsFri 21:00 — 0 commitsFri 22:00 — 0 commitsFri 23:00 — 0 commitsSat 0:00 — 0 commitsSat 1:00 — 0 commitsSat 2:00 — 0 commitsSat 3:00 — 0 commitsSat 4:00 — 0 commitsSat 5:00 — 0 commitsSat 6:00 — 0 commitsSat 7:00 — 0 commitsSat 8:00 — 0 commitsSat 9:00 — 0 commitsSat 10:00 — 0 commitsSat 11:00 — 0 commitsSat 12:00 — 0 commitsSat 13:00 — 0 commitsSat 14:00 — 1 commitsSat 15:00 — 0 commitsSat 16:00 — 1 commitsSat 17:00 — 3 commitsSat 18:00 — 0 commitsSat 19:00 — 4 commitsSat 20:00 — 5 commitsSat 21:00 — 2 commitsSat 22:00 — 5 commitsSat 23:00 — 0 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.

Who is committing

last 52 weeks
Maintainer commits81 (84%)
Community commits16 (16%)

97 commits in total over the last year.

DateListRankStars gained
Sep 19, 2026daily#11+64
Sep 18, 2026daily#11+64
  • affaan-m/ECC

    The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

    272.8K stars · JavaScript

  • react/react

    The library for web and native user interfaces.

    250.9K stars · JavaScript

  • DietrichGebert/ponytail

    Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.

    154.6K stars · JavaScript

  • vercel/next.js

    The React Framework

    143.2K stars · JavaScript

  • addyosmani/agent-skills

    Production-grade engineering skills for AI coding agents.

    101.1K stars · JavaScript

  • Leonxlnx/taste-skill

    Taste-Skill - gives your AI good taste. stops the AI from generating boring, generic slop

    92.6K stars · JavaScript