J-SQUAD TradingView MCP Combined
Allows injection and retrieval of Pine Script code on TradingView charts, providing access to custom indicator values, lines, labels, and tables for analysis.
Integrates with TradingView Desktop via CDP and the TradingView Screener API, enabling chart automation, symbol/timeframe switching, indicator management, alerts, screenshots, and technical analysis scanning.
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., "@J-SQUAD TradingView MCP CombinedBacktest AAPL using RSI strategy"
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.
J-SQUAD TradingView MCP Combined
58 tools · 8 modules — MCP server for Claude Desktop that integrates TradingView Desktop (CDP), TradingView Screener API, Yahoo Finance, IDX/BEI Indonesia tools, backtesting engine, news sentiment, trade math, and market sessions.
Built by CenblueOne as part of the J-SQUAD IDX trading bot system.
Sources (merged)
Repo | Contribution |
CDP core — TradingView Desktop automation | |
TA screener, IDX tools, backtesting, news | |
Trade math, sessions, Pine data, pane/tab, replay |
Related MCP server: tradingview-mcp
Tool List
MODULE 1 — CDP (TradingView Desktop) · 23 tools
Requires
TradingView.exe --remote-debugging-port=9222
Tool | Description |
| Test CDP connection to TV Desktop |
| Get current symbol, timeframe, exchange |
| Live price, change, volume from open chart |
| Switch symbol on active chart |
| Change timeframe (1m/5m/1h/1d…) |
| List active indicators on chart |
| Take screenshot of TV Desktop (base64) |
| Run Pine Script code on active chart |
| Create price alert |
| Read Pine Script output values from chart |
| All-in-one: state + quote + indicators |
| Extract lines/labels/tables/boxes from Pine |
| Switch chart type (Candles/HA/Line/Renko…) |
| List / add / remove indicators |
| Jump to date, scroll back N bars, reset |
| Draw horizontal line, rectangle, long/short position |
| List / delete alerts |
| Get OHLCV bars from Desktop chart |
| List panes / set layout / focus pane / set symbol |
| List / new / close / switch chart tabs |
| Control bar replay (start/step/autoplay/stop) |
| Get watchlist / add symbol |
| Search symbol by keyword |
MODULE 2 — Technical Analysis · 6 tools
VPS-compatible, uses TradingView Screener API (no Desktop needed)
Tool | Description |
| Full TA: RSI, MACD, BB, EMA, ADX, Stoch, CCI |
| Multi-timeframe TA (1h + 4h + 1d) |
| Scan multiple symbols, rank by signal strength |
| Quick BUY/SELL/HOLD recommendation |
| Scan up to 50 symbols in one call |
| Batch TA for a list of symbols |
MODULE 3 — Yahoo Finance · 3 tools
Tool | Description |
| Real-time price, change%, volume, market cap |
| Historical OHLCV data (any period/interval) |
| Multi-symbol price snapshot |
MODULE 4 — IDX / BEI Indonesia · 7 tools
Tool | Description |
| IDX stock price via Yahoo Finance (.JK) |
| TA for IDX stock (exchange=IDX, screener=indonesia) |
| Multi-timeframe TA for IDX stock |
| IDX market overview: IHSG, top gainers/losers |
| Scan LQ45/IDX_MAJOR by change%, volume |
| Batch TA signals for IDX watchlist |
| Quick backtest an IDX stock (9 strategies) |
MODULE 5 — Backtesting Engine · 3 tools
9 built-in strategies · Walk-forward validation · ROBUST/MODERATE/WEAK verdict
Strategies: rsi · ema_cross · bollinger · macd · supertrend · donchian · rsi_pullback · triple_ema · keltner_breakout
Tool | Description |
| Quick backtest for IDX stock |
| Full backtest: any symbol, any strategy, custom params |
| Compare all 9 strategies on one symbol |
MODULE 6 — Sentiment & News · 3 tools
Tool | Description |
| Live headlines: Yahoo Finance, CNBC, MarketWatch |
| Sentiment score from recent news (BULLISH/BEARISH/NEUTRAL) |
| Power tool: TA + Price + Sentiment → STRONG BUY/SELL/HOLD |
MODULE 7 — Trade & Risk Math · 4 tools
Tool | Description |
| Lot size from balance, risk%, SL pips (forex/gold/index/crypto) |
| Risk:Reward ratio, meets 1:2 minimum check |
| Add trade to local journal (JSONL) |
| View trade journal (filter by symbol) |
MODULE 8 — Market Sessions · 2 tools
Tool | Description |
| Active sessions in WIB + overlaps + IDX status + BEI holidays |
| IDX morning brief: top bullish/bearish from LQ45 scan |
Requirements
Python >= 3.9
mcp >= 1.0.0
tradingview-ta >= 3.3.0
yfinance >= 0.2.40
pandas >= 2.0.0
numpy >= 1.24.0
websocket-client >= 1.7.0 # CDP tools only
feedparser >= 6.0.0
requests >= 2.31.0Installation
1. Install dependencies
pip install -r requirements.txt2. Configure Claude Desktop
Edit claude_desktop_config.json (Windows: %APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"tradingview-combined": {
"command": "python",
"args": ["C:/path/to/server.py"],
"env": {
"TV_CDP_PORT": "9222"
}
}
}
}See claude_desktop_config.json in this repo for a ready-to-use example.
3. CDP Setup (for TradingView Desktop tools only)
Launch TradingView Desktop with remote debugging enabled:
Windows:
"C:\Users\<user>\AppData\Local\Programs\TradingView\TradingView.exe" --remote-debugging-port=9222Or create a shortcut with --remote-debugging-port=9222 as argument.
Verify CDP is active: open http://localhost:9222/json in browser. You should see a JSON list of pages.
Environment Variables
Variable | Default | Description |
|
| CDP port for TradingView Desktop |
Usage Examples
Market analysis:
Analyze BBRI on IDX — give me TA + sentiment + price→ Calls combined_analysis(symbol="BBRI", exchange="IDX", screener="indonesia")
Morning scan:
Run morning brief for IDX→ Calls morning_brief_idx() — scans LQ45, returns top 5 bullish + bearish
Backtest:
Backtest TLKM with supertrend strategy for 1 year→ Calls backtest_strategy(symbol="TLKM.JK", strategy="supertrend", period="1y")
Position sizing:
I have $10,000 balance, risk 1%, SL is 50 pips, instrument is gold→ Calls position_size(balance=10000, risk_pct=1, sl_pips=50, instrument="gold")
TradingView Desktop:
What's currently on my TradingView chart?→ Calls tv_snapshot() — returns symbol, timeframe, price, active indicators
Module Dependency Map
CDP tools (Module 1) → requires: TradingView Desktop + websocket-client
TA tools (Module 2) → requires: tradingview-ta
Yahoo Finance (Module 3) → requires: yfinance
IDX tools (Module 4) → requires: tradingview-ta + yfinance
Backtesting (Module 5) → requires: yfinance + pandas + numpy
News (Module 6) → requires: yfinance + feedparser
Trade Math (Module 7) → no external deps
Sessions (Module 8) → requires: tradingview-ta (for morning_brief_idx)All modules degrade gracefully — missing a library disables only that module's tools.
Part of J-SQUAD
This MCP server is designed to work alongside the J-SQUAD IDX trading bot system:
ARA Hunter — detects approaching ARA stocks
Bandar Hunter — detects institutional accumulation
Signal Aggregator — aggregates signals across brokers
KINARA ENGINE — TradingView webhook → Telegram alerts
License
MIT — feel free to use, fork, and extend.
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.
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/CenblueOne/jsquad_tradeview_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server