TradingView MCP
Provides Pine Script development tools for writing, injecting, compiling, and debugging scripts, as well as offline analysis and checking. Can also read data from custom Pine indicators (lines, labels, tables, boxes).
Controls and reads a live TradingView Desktop chart via Chrome DevTools Protocol, enabling chart navigation, indicator management, drawing tools, alerts, replay mode, screenshots, multi-pane layouts, and access to price data, study values, and custom Pine drawings. Also supports morning brief generation and session persistence.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@TradingView MCPRun a morning brief on my watchlist and save the session."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
TradingView MCP
Control and read a live TradingView Desktop chart from Claude Code via Chrome DevTools Protocol — plus a local web dashboard for market scanning, backtesting, and live NSE PCR data.
Built on tradingview-mcp-jackson by @LewisWJackson, itself built on tradingview-mcp by @tradesdontlie. Go star both.
Not affiliated with TradingView Inc. or Anthropic. Requires a valid TradingView subscription — this does not bypass any paywall, it only reads/controls the TradingView Desktop app already running on your machine. All data processing is local; nothing is sent anywhere. See Disclaimer.
What's New in This Fork
Feature | What it does |
| Scan your watchlist, apply |
| Run the morning brief from the terminal |
Launch fix |
|
Local web dashboard ( |
|
Light / dark theme | Toggle in the dashboard header, persists across sessions |
Related MCP server: TradingView MCP Bridge
Setup
Prerequisites: TradingView Desktop (paid subscription), Node.js 18+, Claude Code (or any terminal for the CLI), macOS/Windows/Linux.
git clone https://github.com/Kabeeraa27/TradingViewMCP.git
cd TradingViewMCP
npm install
cp rules.example.json rules.json # fill in your watchlist, bias & risk rulesLaunch TradingView with the debug port enabled (required for every MCP/CDP tool and the dashboard's scans):
OS | Command |
Windows |
|
Mac |
|
Linux |
|
Add to Claude Code — merge into ~/.claude/.mcp.json:
{
"mcpServers": {
"tradingview": {
"command": "node",
"args": ["/Users/YOUR_USERNAME/TradingViewMCP/src/server.js"]
}
}
}Restart Claude Code, then ask: "Use tv_health_check to verify TradingView is connected."
Optional — local dashboard (independent of Claude Code): npm run dashboard, then open http://localhost:3010. Live PCR fetches from NSE automatically, no extra config.
Optional — CLI: npm link once, then tv brief, tv status, tv --help, etc.
Or paste this into Claude Code and it handles the clone/install/config/verify for you:
Set up TradingView MCP for me.
Clone https://github.com/Kabeeraa27/TradingViewMCP.git to ~/TradingViewMCP, 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/TradingViewMCP/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.Runtime data (rules.json, strategy1-log.json, strategy1-lab-log.json, pcr/history.json) is gitignored — your trading data never gets committed or clobbered by git pull.
Morning Brief Workflow
TradingView is open (debug port on)
tv briefin your terminal (or ask Claude: "run morning_brief")Claude scans your watchlist, applies
rules.json, prints a bias per symbol:BTCUSD | BIAS: Bearish | KEY LEVEL: 94,200 | WATCH: RSI crossing 50 on 4H"save this brief" →
session_save; next morning, "get yesterday's session" →session_get
What This Tool Does
Morning brief · Pine Script dev (write/inject/compile/debug) · chart navigation & indicators · reading price levels/labels/tables from custom Pine drawings · drawing trend lines/levels/boxes · alerts · replay mode with P&L tracking · screenshots · multi-pane layouts · live JSONL streaming · CLI for every tool.
Claude picks the right tool automatically via the decision tree in CLAUDE.md.
Tool Reference (81 MCP tools)
Chart Reading
Tool | Use | Size |
| First call — symbol, timeframe, indicator IDs | ~500B |
| Current RSI/MACD/BB/EMA values | ~500B |
| Latest price, OHLC, volume | ~200B |
| Price bars — use | 500B–8KB |
Pine Drawings (line.new(), label.new(), table.new(), box.new())
Tool | Reads |
| Horizontal price levels |
| Text annotations + prices |
| Data tables |
| Price zones as |
Use study_filter: "MyIndicator" to target one indicator.
Chart Control
chart_set_symbol · chart_set_timeframe · chart_set_type · chart_manage_indicator (use full names, e.g. "Relative Strength Index" not "RSI") · chart_scroll_to_date · indicator_set_inputs / indicator_toggle_visibility
Pine Script
pine_set_source → pine_smart_compile → pine_get_errors → pine_get_console → pine_save. Offline: pine_analyze, pine_check.
Replay
replay_start → replay_step / replay_autoplay → replay_trade → replay_status → replay_stop
Multi-pane, alerts, drawing, UI
pane_set_layout (s/2h/2v/2x2/4/6/8) · pane_set_symbol · draw_shape · alert_create/list/delete · batch_run · watchlist_get/add · capture_screenshot · tv_launch / tv_health_check
Morning Brief
morning_brief (reads rules.json) · session_save · session_get
CLI
tv brief tv status tv symbol BTCUSD
tv session get tv quote tv ohlcv --summary
tv session save --brief "…" tv screenshot -r chart tv pine compile
tv pane layout 2x2 tv stream quote | jq '.close'Full list: tv --help
Troubleshooting
Problem | Solution |
| TradingView isn't running with |
MCP server not showing in Claude Code | Check |
|
|
"No rules.json found" |
|
Watchlist empty | Add symbols to |
Stale data | TradingView still loading — wait a few seconds |
Pine Editor tools fail | Open the panel first: |
Architecture
Claude Code ←→ MCP Server (stdio) ←→ CDP (port 9222) ←→ TradingView Desktop (Electron)CLI (tv) talks to the same server. No external network calls except live PCR (NSE) in the dashboard — everything else runs locally.
Disclaimer
For personal, educational, and research use only. Uses the Chrome DevTools Protocol — a standard Chromium debugging interface, explicitly enabled by you via a command-line flag. Does not reverse-engineer any proprietary protocol or bypass access controls.
By using this you agree: you're responsible for complying with TradingView's Terms of Use; this accesses undocumented internal APIs that may change anytime; it must not be used to redistribute/resell/commercially exploit TradingView's data; the authors aren't responsible for account bans or other consequences. Use at your own risk.
License
MIT — see LICENSE. Applies to source code only, not TradingView's software, data, or trademarks.
This server cannot be installed
Maintenance
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
- Flicense-qualityCmaintenanceEnables automated control of TradingView Desktop via Chrome DevTools Protocol with 78+ tools for chart manipulation, Pine Script development, and indicator analysis. Supports automated morning briefs for session bias generation, replay trading practice, and multi-pane layouts with secure local-only data processing.Last updated2
- Flicense-qualityCmaintenanceConnects AI assistants to your local TradingView Desktop app via Chrome DevTools Protocol for chart analysis, Pine Script development, and workflow automation while keeping all data local.Last updated
- Flicense-qualityCmaintenanceConnects AI assistants to your local TradingView Desktop app via Chrome DevTools Protocol for chart analysis, Pine Script development, and workflow automation.Last updated182
- Flicense-qualityBmaintenanceConnects AI assistants to your local TradingView Desktop via Chrome DevTools Protocol for chart analysis, Pine Script development, and workflow automation, with all data staying on your machine.Last updated182130
Related MCP Connectors
Open-source MCP server for Zerodha Kite Connect. Portfolio, market data, backtesting, alerts.
TradeOS MCP: ticker search, My Agent, chart TA, macro news. npm stdio or HTTP.
Hosted MCP for stocks, options, Greeks, brokers, order previews, alerts, and workflows.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Kabeeraa27/TradingViewMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server