loading…
Search for a command to run...
loading…
Enables automated trading analysis and chart management through the TradingView Desktop app. Provides tools for morning brief workflows, Pine Script development
Enables automated trading analysis and chart management through the TradingView Desktop app. Provides tools for morning brief workflows, Pine Script development, chart navigation, and replay mode practice with local data processing.
If you found this from the YouTube video — welcome. This is the improved fork. Everything you need is below.
Built on top of the original tradingview-mcp by @tradesdontlie. Full credit to them for the foundation. This fork adds a morning brief workflow, a rules config, and fixes the launch bug on TradingView Desktop v2.14+.
[!WARNING] Not affiliated with TradingView Inc. or Anthropic. This tool connects to your locally running TradingView Desktop app via Chrome DevTools Protocol. Review the Disclaimer before use.
[!IMPORTANT] Requires a valid TradingView subscription. This tool does not bypass any TradingView paywall. It reads from and controls the TradingView Desktop app already running on your machine.
[!NOTE] All data processing happens locally. Nothing is sent anywhere. No TradingView data leaves your machine.
| Feature | What it does |
|---|---|
morning_brief |
One command that scans your watchlist, reads all your indicators, and returns structured data for Claude to generate your session bias |
session_save / session_get |
Saves your daily brief to ~/.tradingview-mcp/sessions/ so you can compare today vs yesterday |
rules.json |
Write your trading rules once — bias criteria, risk rules, watchlist. The morning brief applies them automatically every day |
| Launch bug fix | Fixed tv_launch compatibility with TradingView Desktop v2.14+ |
tv brief CLI |
Run your morning brief from the terminal in one word |
Paste this into Claude Code and it will handle everything:
Set up TradingView MCP Jackson for me.
Clone https://github.com/LewisWJackson/tradingview-mcp-jackson.git to ~/tradingview-mcp-jackson, run npm install, then add it to my MCP config at ~/.claude/.mcp.json (merge with any existing servers, don't overwrite them).
The config block is: { "mcpServers": { "tradingview": { "command": "node", "args": ["/Users/YOUR_USERNAME/tradingview-mcp-jackson/src/server.js"] } } } — replace YOUR_USERNAME with my actual username.
Then copy rules.example.json to rules.json and open it so I can fill in my trading rules.
Finally restart and verify with tv_health_check.
Or follow the manual steps below.
git clone https://github.com/LewisWJackson/tradingview-mcp-jackson.git ~/tradingview-mcp-jackson
cd ~/tradingview-mcp-jackson
npm install
cp rules.example.json rules.json
Open rules.json and fill in:
TradingView must be running with the debug port enabled.
Mac:
./scripts/launch_tv_debug_mac.sh
Windows:
scripts\launch_tv_debug.bat
Linux:
./scripts/launch_tv_debug_linux.sh
Or use the MCP tool after setup: "Use tv_launch to start TradingView in debug mode"
Add to ~/.claude/.mcp.json (merge with any existing servers):
{
"mcpServers": {
"tradingview": {
"command": "node",
"args": ["/Users/YOUR_USERNAME/tradingview-mcp-jackson/src/server.js"]
}
}
}
Replace YOUR_USERNAME with your actual username. On Mac: echo $USER to check.
Restart Claude Code, then ask: "Use tv_health_check to verify TradingView is connected"
Ask Claude: "Run morning_brief and give me my session bias"
Or from the terminal:
npm link # install tv CLI globally (one time)
tv brief
This is the feature that turns this from a toolkit into a daily habit.
Before every session:
tv brief in your terminal (or ask Claude: "run morning_brief")rules.json criteria, and prints:BTCUSD | BIAS: Bearish | KEY LEVEL: 94,200 | WATCH: RSI crossing 50 on 4H
ETHUSD | BIAS: Neutral | KEY LEVEL: 3,180 | WATCH: Ribbon direction on daily
SOLUSD | BIAS: Bullish | KEY LEVEL: 178.50 | WATCH: Hold above 20 EMA
Overall: Cautious session. BTC leading bearish, SOL the exception — watch for divergence.
session_save)session_get)tv command, pipe-friendly JSON outputClaude reads CLAUDE.md automatically when working in this project. It contains the full decision tree.
| You say... | Claude uses... |
|---|---|
| "Run my morning brief" | morning_brief → apply rules → session_save |
| "What was my bias yesterday?" | session_get |
| "What's on my chart?" | chart_get_state → data_get_study_values → quote_get |
| "Give me a full analysis" | quote_get → data_get_study_values → data_get_pine_lines → data_get_pine_labels → capture_screenshot |
| "Switch to BTCUSD 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 |
| "Draw a level at 94200" | draw_shape (horizontal_line) |
| Tool | What it does |
|---|---|
morning_brief |
Scan watchlist, read indicators, return structured data for session bias. Reads rules.json automatically. |
session_save |
Save the generated brief to ~/.tradingview-mcp/sessions/YYYY-MM-DD.json |
session_get |
Retrieve today's brief (or yesterday's if today not saved yet) |
| 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) |
Read line.new(), label.new(), table.new(), box.new() output from any visible Pine indicator.
| Tool | When to use |
|---|---|
data_get_pine_lines |
Horizontal price levels (support/resistance, session levels) |
data_get_pine_labels |
Text annotations + prices ("PDH 24550", "Bias Long") |
data_get_pine_tables |
Data tables (session stats, analytics dashboards) |
data_get_pine_boxes |
Price zones as {high, low} pairs |
Always use study_filter to target a specific indicator: study_filter: "MyIndicator".
| 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") |
indicator_set_inputs / indicator_toggle_visibility |
Change indicator settings, show/hide |
| 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_analyze |
Offline static analysis (no chart needed) |
pine_check |
Server-side compile check (no chart needed) |
| 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 |
| Tool | What it does |
|---|---|
pane_set_layout |
Change grid: s, 2h, 2v, 2x2, 4, 6, 8 |
pane_set_symbol |
Set symbol on any pane |
draw_shape |
Draw horizontal_line, trend_line, rectangle, text |
alert_create / alert_list / alert_delete |
Manage price alerts |
batch_run |
Run action across multiple symbols/timeframes |
watchlist_get / watchlist_add |
Read/modify watchlist |
capture_screenshot |
Screenshot (regions: full, chart, strategy_tester) |
tv_launch / tv_health_check |
Launch TradingView and verify connection |
tv brief # run morning brief
tv session get # get today's saved brief
tv session save --brief "..." # save a brief
tv status # check connection
tv quote # current price
tv symbol BTCUSD # 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 stream quote | jq '.close' # monitor price ticks
Full command list: tv --help
| Problem | Solution |
|---|---|
cdp_connected: false |
TradingView isn't running with --remote-debugging-port=9222. Use the launch script. |
ECONNREFUSED |
TradingView isn't running or port 9222 is blocked |
| MCP server not showing in Claude Code | Check ~/.claude/.mcp.json syntax, restart Claude Code |
tv command not found |
Run npm link from the project directory |
morning_brief — "No rules.json found" |
Run cp rules.example.json rules.json and fill it in |
morning_brief — watchlist empty |
Add symbols to the watchlist array in rules.json |
| Tools return stale data | TradingView still loading — wait a few seconds |
| Pine Editor tools fail | Open Pine Editor panel first: ui_open_panel pine-editor open |
Claude Code ←→ MCP Server (stdio) ←→ CDP (port 9222) ←→ TradingView Desktop (Electron)
tv command)This fork is built on tradingview-mcp by @tradesdontlie. The original tool is the foundation — go star their repo.
This project is provided for personal, educational, and research purposes only.
This tool uses the Chrome DevTools Protocol (CDP), a standard debugging interface built into all 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.
By using this software you agree that:
Use at your own risk.
MIT — see LICENSE. Applies to source code only, not to TradingView's software, data, or trademarks.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"tradingview-mcp-jackson": {
"command": "npx",
"args": []
}
}
}