Market analysis for AI assistants: screeners, multi-timeframe analysis, backtests, in-chat charts.
TradingView MCP Market Data & Technical Analysis Server
The io.github.atilaahmettaner/tradingview-mcp MCP server provides real-time market data plus technical analysis capabilities. It supports screeners and backtesting for stocks, crypto, forex, and futures across global exchanges, intended for use by MCP clients such as Claude, ChatGPT, Cursor, Copilot, and others.
🛠️ Key Features
Real-time market data
Technical indicators and technical analysis
Screeners
Backtesting
Live sentiment
🚀 Use Cases
Analyze stocks, crypto, forex, and futures markets
Run technical indicator–based screening
Backtest trading strategies for different asset classes
Combine live sentiment with market data for analysis
⚡ Developer Benefits
Built for Model Context Protocol (MCP) clients
Use with AI assistants (e.g., Claude, ChatGPT, Cursor, Copilot)
Targets TradingView workflows for market research
⚠️ Limitations
Source data does not specify tool names/count or supported exchange list details beyond “global exchanges”
Render an interactive candlestick chart for a symbol inside the
conversation. Accepts crypto pairs (BTCUSDT, BTC-USD), stocks (AAPL,
NVDA) or any Yahoo Finance symbol. period: 1mo|3mo|6mo|1y|2y,
interval: 1d|1h|15m. 15m charts show recent action only: period is
limited to 1d|5d|1mo (longer values auto-adjust to 5d) and the most
recent 350 bars are drawn. Set bollinger=true to overlay Bollinger
Bands (SMA20 ± 2σ); the latest band values are returned in the
result. Clients without interactive app support can read the
`summary` field of the result.
Run a strategy backtest and render its equity curve as an
interactive chart in the conversation (capital growth + drawdown,
with return / win-rate / Sharpe stats). Strategies: rsi, bollinger,
macd, ema_cross, supertrend, donchian, rsi_pullback,
keltner_breakout, triple_ema. period: 1mo|3mo|6mo|1y|2y,
interval: 1d|1h. Clients without interactive app support can read
the `summary` field.
The user's live market board. Start here when they ask how the
markets are doing in general: "how are the markets today?", "what's
moving?", "market update", a morning check before the open, or
"open the market dashboard".
One call covers the overview: the user's own symbols on top (their
watchlist, then what they asked about most in the last 30 days), then
major indices (US, India, Türkiye, Indonesia, VIX), crypto,
commodities and FX, each with today's change. Don't also call
market_snapshot for the same overview; add other tools only for what
the board doesn't show (futures, news, sectors). For a single
symbol's price or analysis, use that symbol's own tool instead.
Opens as an interactive dashboard; clicking a row asks for that
market's chart or analysis. Clients without app support can read the
`summary` field.
Return top gainers for an exchange and timeframe using Bollinger Band analysis.
Args:
exchange: Exchange name — crypto: KUCOIN, BINANCE, BYBIT, MEXC; stocks: EGX, BIST, NASDAQ, NYSE, BURSA, HKEX, SSE, SZSE, TWSE, TPEX, EPA (Euronext Paris), AMS, BRU, LIS, MIL, LSE, SIX, BME, XETRA, FWB, TSX, TSXV, NSE, BSE (India), IDX (Indonesia)
timeframe: One of 5m, 15m, 1h, 4h, 1D, 1W, 1M
limit: Number of rows to return (max 50)
Returns:
list[dict] on success. On ANY failure returns a structured error
envelope ``{"error": {"code": ..., "retryable": ...}}`` — never a
raw exception string.
Return top losers for an exchange and timeframe. Supports crypto (KUCOIN, BINANCE, MEXC) and stocks (EGX, BIST, NASDAQ).
Returns ``list[dict]`` on success. On ANY failure returns a structured
error envelope ``{"error": {"code": ..., "retryable": ...}}``.
Scan for assets with low Bollinger Band Width (squeeze detection). Works with crypto and stocks.
This scans a whole EXCHANGE for squeezes (canonical name is exactly
`bollinger_scan`; there is no "get_bollinger_band_analysis" tool). For
the Bollinger read of ONE symbol, call `coin_analysis` instead.
Example: bollinger_scan(exchange="BINANCE", timeframe="15m", bbw_threshold=0.008)
Args:
exchange: Exchange — crypto: KUCOIN, BINANCE, BYBIT, MEXC; stocks: EGX, BIST, NASDAQ, NYSE, BURSA, HKEX, SSE, SZSE, TWSE, TPEX, EPA (Euronext Paris), AMS, BRU, LIS, MIL, LSE, SIX, BME, XETRA, FWB, TSX, TSXV, NSE, BSE (India), IDX (Indonesia)
timeframe: One of 5m, 15m, 1h, 4h, 1D, 1W, 1M. Typical squeeze thresholds: 15m→0.008, 1h→0.02, 4h→0.04, 1D→0.12
bbw_threshold: Maximum BBW value to filter (default 0.04)
limit: Number of rows to return (max 100)
Returns ``list[dict]`` on success. On ANY failure returns a structured
error envelope ``{"error": {"code": ..., "retryable": ...}}``.
Filter coins by Bollinger Band rating.
Args:
exchange: Exchange name like KUCOIN, BINANCE, BYBIT, MEXC, etc.
timeframe: One of 5m, 15m, 1h, 4h, 1D, 1W, 1M
rating: BB rating (-3 to +3): -3=Strong Sell, -2=Sell, -1=Weak Sell, 1=Weak Buy, 2=Buy, 3=Strong Buy
limit: Number of rows to return (max 50)
Returns ``list[dict]`` on success. On ANY failure returns a structured
error envelope ``{"error": {"code": ..., "retryable": ...}}``.
Get detailed analysis for a specific asset (coin or stock) on specified exchange and timeframe.
This is the canonical single-symbol technical readout (there is no
"get_technical_analysis" or "get_technical_summary" tool — use THIS one).
Use `multi_timeframe_analysis` instead when you need trend alignment
across several timeframes, and `combined_analysis` when you also want
news sentiment + headlines in the same call.
Example: coin_analysis(symbol="BTCUSDT", exchange="BINANCE", timeframe="1h")
Args:
symbol: Bare ticker, no exchange prefix — crypto: "BTCUSDT", "ETHUSDT"; stocks: "COMI" (EGX), "THYAO" (BIST), "600519" (SSE), "300251" (SZSE), "2330" (TWSE), "3105" (TPEX)
exchange: Exchange — crypto: KUCOIN, BINANCE, MEXC; stocks: EGX, BIST, NASDAQ, NYSE, BURSA, HKEX, SSE, SZSE, TWSE, TPEX, EPA (Euronext Paris), AMS, BRU, LIS, MIL, LSE, SIX, BME, XETRA, FWB, TSX, TSXV, NSE, BSE (India), IDX (Indonesia). If the symbol isn't listed there, the error's `listed_on` field names exchanges that do list it.
timeframe: Time interval (5m, 15m, 1h, 4h, 1D, 1W, 1M)
Returns:
Detailed analysis with all indicators and metrics
Scan for coins with consecutive growing/shrinking candles pattern.
Args:
exchange: Exchange name (BINANCE, KUCOIN, etc.)
timeframe: Time interval (5m, 15m, 1h, 4h)
pattern_type: "bullish" (growing candles) or "bearish" (shrinking candles)
candle_count: Number of consecutive candles to check (2-5)
min_growth: Minimum growth percentage for each candle
limit: Maximum number of results to return
Advanced candle pattern analysis using multi-timeframe data.
Args:
exchange: Exchange name (BINANCE, KUCOIN, etc.)
base_timeframe: Base timeframe for analysis (5m, 15m, 1h, 4h)
pattern_length: Number of consecutive periods to analyse (2-4)
min_size_increase: Minimum percentage increase in candle size
limit: Maximum number of results to return
Detect coins with volume breakout + price breakout.
Args:
exchange: Exchange name like KUCOIN, BINANCE, BYBIT, MEXC, etc.
timeframe: One of 5m, 15m, 1h, 4h, 1D, 1W, 1M
volume_multiplier: How many times the volume should be above normal level (default 2.0)
price_change_min: Minimum price change percentage (default 3.0)
limit: Number of rows to return (max 50)
Returns ``list[dict]`` on success, or an error envelope on total upstream
failure (``{"error": {"code": "ALL_BATCHES_FAILED", ...}}``). The empty
list now strictly means "no matches today"; rate-limit cliffs surface
explicitly.
Detailed volume confirmation analysis for a specific coin.
Args:
symbol: Coin symbol (e.g., BTCUSDT)
exchange: Exchange name
timeframe: Time frame for analysis
Get a comprehensive overview of the Egyptian Exchange (EGX) market.
Args:
timeframe: One of 5m, 15m, 1h, 4h, 1D, 1W, 1M (default 1D for stocks)
limit: Number of stocks per category (max 20)
Scan EGX stocks by sector. Shows available sectors if none specified.
Args:
sector: Sector name (banks, healthcare_and_pharma, real_estate, etc.)
Leave empty to list all sectors.
timeframe: One of 5m, 15m, 1h, 4h, 1D, 1W, 1M
limit: Max results per sector (max 50)
Sector rotation scanner for EGX — identifies hot/cold sectors and top picks.
Args:
timeframe: One of 5m, 15m, 1h, 4h, 1D, 1W, 1M (default 1D)
top_n_sectors: Number of top sectors to show stock picks for (1-18, default 5)
top_n_stocks: Number of top stocks per highlighted sector (1-10, default 3)
min_stock_score: Minimum stock score for picks (0-100, default 60)
Analyse an EGX index showing constituent performance with full indicators.
Args:
index: EGX30, EGX70, EGX100, SHARIAH33, EGX35LV, TAMAYUZ
timeframe: One of 5m, 15m, 1h, 4h, 1D, 1W, 1M (default 1D)
limit: Number of stocks to show in detail (max 100)
Production stock ranking engine for EGX — finds strong stocks with actionable setups.
Args:
timeframe: One of 5m, 15m, 1h, 4h, 1D, 1W, 1M (default 1D)
min_score: Minimum stock score to include (0-100, default 55)
index_filter: Filter by index — EGX30, EGX70, EGX100, SHARIAH33, EGX35LV, TAMAYUZ
limit: Number of results (max 50)
Generate a full trade plan for a specific EGX stock.
Args:
symbol: EGX stock symbol (e.g., "COMI", "TMGH", "FWRY")
timeframe: One of 5m, 15m, 1h, 4h, 1D, 1W, 1M (default 1D)
Banker/hot-money proxy read for one symbol from price+volume history.
Three independent families, computed from Yahoo Finance OHLCV:
- mcdx_style: RSI-horizon decomposition (banker RSI50 / hot-money RSI40
/ retail RSI14, each scaled 0-20) — sustained slow-horizon strength
that fast horizons can't fake reads as institutional accumulation.
- banker_fund_oscillator: EMA(13)-smoothed 34-bar stochastic of the
weighted typical price, 0-100, with BANKER_ENTRY/EXIT states.
- volume_flow_composite: CMF(20) + MFI(14) + OBV trend + up/down volume
balance → 0-100 accumulation score.
Plus a consensus vote across the three.
These are documented, reproducible formula variants inspired by the
public "banker fund" indicator family — NOT actual institutional-flow
data, and not copies of any closed-source script.
Args:
symbol: Bare ticker — EGX: "COMI", "TMGH"; US: "AAPL"; crypto pairs
work via Yahoo notation ("BTC-USD").
exchange: EGX (maps to Yahoo .CA), BIST (.IS), TADAWUL (.SR); anything
else passes the symbol to Yahoo unchanged.
period: 1mo | 3mo | 6mo | 1y | 2y (default 6mo)
interval: 1d (default) or 1h
Rank EGX index constituents by smart-money accumulation evidence.
Runs the full smart_money_analysis per constituent (Yahoo .CA history,
bounded thread pool) and ranks by the volume-flow composite score, with
the banker decomposition and oscillator state attached per row. Rows the
data source can't serve are listed under `skipped`, never silently
dropped.
Args:
index: EGX30 | EGX70 | EGX100 | SHARIAH33 | EGX35LV | TAMAYUZ
limit: Max ranked rows to return (default 10, max 50)
period: History window — 1mo | 3mo | 6mo | 1y | 2y (default 6mo)
min_score: Only include rows with composite score >= this (0-100)
News sentiment for stocks and crypto (licensed Marketaux entity sentiment).
Args:
symbol: Asset symbol ("AAPL", "BTC", "ETH", "TSLA")
category: News group to search ("crypto", "stocks", "all")
limit: Max articles to analyse
Real-time financial news via Marketaux (licensed).
Args:
symbol: Optional symbol filter ("AAPL", "BTC"). None = all news.
category: News category ("crypto", "stocks", "all")
limit: Max number of news items
POWER TOOL: TradingView technical analysis + news sentiment + financial news.
Use this when you want TA AND sentiment AND news for one symbol in a
single call. For indicators only, `coin_analysis` is faster; for
cross-timeframe trend alignment use `multi_timeframe_analysis`.
Example: combined_analysis(symbol="NVDA", exchange="NASDAQ", timeframe="1D")
Args:
symbol: Bare ticker, no exchange prefix ("AAPL", "BTCUSDT", "THYAO", "GDX")
exchange: Exchange (NASDAQ, NYSE, AMEX, NYSEARCA, PCX, BINANCE, KUCOIN, MEXC, BIST, EGX, TWSE, TPEX)
timeframe: Analysis timeframe (5m, 15m, 1h, 4h, 1D, 1W)
Run all 9 strategies (RSI, Bollinger, MACD, EMA Cross, Supertrend, Donchian, RSI Pullback, Keltner Breakout, Triple EMA) and return a ranked leaderboard.
Args:
symbol: Yahoo Finance symbol (AAPL, BTC-USD, SPY…)
period: '1mo', '3mo', '6mo', '1y', '2y'
(period >= '1y' recommended so rsi_pullback and triple_ema can
complete SMA200 warmup; otherwise they contribute zero trades)
initial_capital: Starting capital in USD (default $10,000)
interval: '1d' (daily) or '1h' (hourly)
Real-time price quote from Yahoo Finance for any stock, crypto, ETF or index.
Args:
symbol: Yahoo Finance symbol — e.g. AAPL, BTC-USD, SPY, ^GSPC, EURUSD=X, THYAO.IS
Single-call BTC macro context: price, dominance, total market cap + risk assessment.
Use this WHENEVER analyzing any cryptocurrency (altcoin or BTC itself) to
get the broader market frame in one shot. A SOL/ETH/whatever setup looks
very different when BTC is dumping with rising dominance vs. when alts
are leading. Calling this once gives Claude the macro context to provide
Bitcoin-aware commentary alongside the per-coin analysis - without
chaining 2-3 separate yahoo_price + manual reasoning calls.
Returns:
- bitcoin: price, 24h change %, volume, market cap
- dominance: BTC and ETH market-cap share of total crypto
- total_market: total crypto mcap + 24h change + active coin count
- assessment: label (HIGH_RISK / ALT_RISK / ALT_FAVORABLE / OPPORTUNITY_WITH_CAUTION / NEUTRAL) + 1-paragraph reasoning
Real-time pre-market and after-hours prices for a US stock symbol.
Use this when the user asks about a stock outside the regular 9:30am-4pm
ET session — earnings reactions, overnight news, "what is X doing in
after-hours?", "how did Y open in pre-market?". Returns the most recent
valid print from each session window (pre-market, regular, post-market)
along with computed % changes vs. the previous close and the regular
close, respectively.
During the regular session, post_market will be null (no data yet).
On weekends/holidays, returns whatever's most recent in each window.
Args:
symbol: US stock symbol — AAPL, NVDA, TSLA, SPY, ^GSPC, etc.
Returns:
- pre_market: {price, as_of_utc, change_vs_previous_close_pct, reference_close} or null;
the change is measured from reference_close, the last regular close
(before the open that is newer than previous_close)
- regular: {price, as_of_utc, change_pct} (consolidated tape close)
- post_market: {price, as_of_utc, change_vs_regular_close_pct} or null
- previous_close, currency, exchange, market_state for context
Full options chain (calls + puts) for a US stock symbol and one expiry.
Use this when the user asks "what's the options chain for X?", "show me
AAPL puts expiring next Friday", or wants to inspect bid/ask/IV/volume on
a specific strike. If no expiry is provided, returns the nearest expiry
so Claude can quote it back and ask "want a different one?".
Args:
symbol: US stock symbol — AAPL, NVDA, TSLA, SPY, etc.
expiry: Optional ISO date (YYYY-MM-DD). Must match one of the
`available_expiries` Yahoo returns; otherwise returns an error
with the list of valid dates.
Returns:
- underlying_price, underlying_change_pct
- requested_expiry, available_expiries (list of YYYY-MM-DD)
- call_count, put_count
- calls: list of {strike, last_price, bid, ask, volume,
open_interest, implied_volatility, in_the_money, expiration}
- puts: same shape as calls
Top strikes by volume / open-interest ratio — institutional positioning signal.
Use this when the user asks "any unusual options activity on X?", "where
is the smart money positioned on NVDA before earnings?", or wants a
V/OI screener for a ticker. A V/OI ratio > 1 means today's volume already
exceeds standing open interest, which classically flags fresh institutional
positioning on a specific strike in a specific direction (call vs put).
Scans the soonest few expirations, filters out illiquid strikes (under
`min_volume`), and returns the top-N sorted by V/OI descending. Also
returns aggregate call vs put volume so Claude can comment on the
overall directional bias.
Args:
symbol: US stock symbol — AAPL, NVDA, TSLA, SPY, META, etc.
top_n: How many strikes to return. Default 10.
min_volume: Filter floor for today's volume — prevents noise from
illiquid strikes with high V/OI ratios. Default 100.
expiries: Number of soonest expirations to scan. Default 4
(typically covers ~1 month of weeklies + monthlies).
Returns:
- underlying_price
- expiries_scanned (list of YYYY-MM-DD)
- total_call_volume, total_put_volume, put_call_volume_ratio
- unusual: list of top-N contracts sorted by V/OI desc, each with
{strike, side (call|put), expiration, volume, open_interest,
v_oi_ratio, last_price, implied_volatility, in_the_money,
strike_vs_spot_pct (moneyness)}
Top futures contracts sorted by trading volume.
Args:
category: all | equity_index | energy | metals | agriculture | rates | forex | crypto_futures
exchanges: us (CME, COMEX, NYMEX, CBOT) | global (adds ICE, EUREX)
limit: max contracts to return (default 30)
volume_min: minimum volume filter (0 = no filter)
Returns:
Dict with total_available count and list of contracts with OHLCV + % change.
Futures contracts with the biggest percentage moves today.
Args:
direction: gainers | losers
exchanges: us | global
limit: max results
volume_min: minimum volume filter (default 10, filters illiquid contracts)
Returns:
List of futures ranked by % change with OHLCV data.
Quote all major front-month contracts in a specific futures category.
Args:
category: equity_index | energy | metals | agriculture | rates | forex | crypto_futures
Returns:
OHLCV quotes for the standard watchlist of contracts in that category.
Example symbols: ES1! NQ1! (equity_index), CL1! NG1! (energy), GC1! SI1! (metals).
Return the full categorized list of well-known front-month futures symbols.
Categories: equity_index, energy, metals, agriculture, rates, forex, crypto_futures.
Use these symbols with futures_category_snapshot or coin_analysis for deeper analysis.
Screen stocks by share type — the API twin of TradingView's
"Common stock" / "Preferred stock" symbol-search filter.
Args:
country: TradingView market name — e.g. america, korea, germany,
brazil, japan, uk, india, turkey, canada, australia, france, hongkong
stock_type: common | preferred
limit: rows to return (max 2000, single upstream request), ranked by market cap descending
exclude_otc: default True — drop OTC listings (foreign companies traded
over-the-counter); "america" otherwise means "US venue", not "US company"
compact: default False — True returns only ticker/symbol/price/currency/
change_percent per row (light payload for bulk price feeds)
sort_by: market_cap (default) | dividend_yield | change | price —
server-side descending sort over the WHOLE market, so e.g.
sort_by=dividend_yield with limit=20 is the market's true top-20
dividend payers, not just the biggest companies re-sorted
Returns:
Envelope dict: total_matches (market-wide count), returned, and rows
of {ticker, symbol, description, exchange, price, open, high, low,
currency, change_percent, dividend_yield, market_cap} — price is the
current/last close; open/high/low are the current session's daily bar. Prices are in the
market's local currency (e.g. KRW for korea).
Current price + daily % change for specific stock symbols.
Args:
tickers: comma-separated EXCHANGE:SYMBOL list (max 2000 — one
upstream request even at full size), e.g.
"NASDAQ:NVDA, NASDAQ:TSLA, KRX:005930". The exchange prefix is
required — the scanner's direct-ticker lookup is exchange-scoped.
Returns:
Envelope dict: rows of {ticker, symbol, description, exchange, price,
open, high, low, currency, change_percent} plus a not_found list naming any requested
ticker the scanner didn't recognize.
Add symbols to the user's personal watchlist (stored server-side, follows their API key across Claude/ChatGPT/any MCP client; max 50 symbols). Tickers must be EXCHANGE:SYMBOL, comma-separated — e.g. 'KUCOIN:BTCUSDT, NASDAQ:NVDA, BIST:THYAO, COMEX:GC1!'. Mixing asset classes is fine — crypto, stocks, futures, FX in one list.
Remove symbols from the user's personal watchlist. Tickers must be EXCHANGE:SYMBOL, comma-separated — e.g. 'KUCOIN:BTCUSDT, NASDAQ:NVDA, BIST:THYAO, COMEX:GC1!'. Removing is reversible (just add again).
Show the user's personal watchlist. By default also fetches live prices + daily % change for every symbol on it (one batched request). Start here whenever the user says 'my watchlist', 'my list', or 'my coins/stocks'.
Parameters1
include_quotes
boolean
optional
Fetch live prices for the list (default true).
Raw schema
{
"type": "object",
"properties": {
"include_quotes": {
"type": "boolean",
"description": "Fetch live prices for the list (default true).",
"default": true
}
}
}
TradingView MCP server — real-time market data, technical indicators, screeners, and backtesting for Claude, ChatGPT, Cursor, Copilot, and any MCP client. Stocks, crypto, forex & futures across global exchanges.
Backtesting + live sentiment + Yahoo Finance + 39 technical-analysis tools — the most complete TradingView MCP toolkit, all in one server.
Don't want to install anything?TradingMCP, the hosted version of this server, gives you all 39 tools in your AI app. In Claude, Cursor or Grok, add https://mcp.tradingmcp.ai/mcp as a connector and sign in: no key to paste. ChatGPT, Copilot and other MCP clients connect with a private link. From $9/mo with a 14-day money-back guarantee; self-hosting stays free.
One click opens Claude's connector dialog with TradingMCP filled in; sign in with the email you subscribe with. Other apps: tradingmcp.ai/connect
Sponsor:Whop: sell your courses, software and communities online.
Morning market brief in one prompt: ask "give me this morning's market brief" and get global indices, futures, the Bitcoin pulse and the hosted Markets panel in one answer. Charts are drawn right in the chat (demo below). In Grok Bot, add the Market Brief bot to get one on weekday mornings.
🆕 The hosted version (TradingMCP) now draws. Ask for a chart and an interactive candlestick view (1d / 1h / 15m, optional Bollinger overlay) renders live inside the conversation via MCP Apps — and the AI reads the band values back to you:
Add one URL and sign in (or pip install), then just ask. Real output, straight from the live server:
Try these first — they work in Claude, ChatGPT, Cursor, or any MCP client:
text
Show today's top crypto gainers on Binance
Run a full technical analysis of NVDA
What's the multi-timeframe read on gold?
Backtest an RSI strategy on BTC on the daily timeframe
NOTE
Independent open-source project — not affiliated with, endorsed by, or associated with TradingView Inc. "TradingView" is a trademark of its respective owner; this project consumes third-party market data and is not a TradingView product.
NOTE
Does it need — or risk — your TradingView account? No. This server does not log into, scrape, or automate a TradingView session, and it requires no TradingView account or API key. Market data is fetched server-side from public endpoints, so there is no account of yours in the loop and no browser/UI automation. (This is different from MCP servers that drive the TradingView Desktop app via Chrome DevTools.) You are responsible for ensuring your own use complies with the terms of any data source you point it at.
How this compares to desktop-automation TradingView MCPs (the ones that remote-control TradingView Desktop)
"TradingView MCP" now means two very different kinds of project. Both are useful — for different jobs:
This project — data & analysis API
Desktop-automation MCPs
What you need
Nothing — public market data
TradingView Desktop, usually with a paid TradingView plan
Where it works
Claude.ai, Claude Code, ChatGPT, Cursor, Copilot — any MCP client
If you want an AI clicking around your TradingView Desktop — editing Pine Script, drawing on charts, using replay — check out tradesdontlie/tradingview-mcp. If you want headless market data, screeners and backtesting available to any AI client, with nothing installed and no TradingView account in the loop — that's this project.
IMPORTANT
Not financial advice. Nothing produced by this software is investment, financial, legal, tax, or accounting advice. tradingview-mcp is an informational and educational analysis tool. Its outputs, including indicators, scores, signals, "trade setups", entries, stop losses, and targets, are computed from third party market data and are not recommendations to buy, sell, or hold any asset. It does not execute trades, manage money, or guarantee any result. Trading and investing carry a substantial risk of loss, and you can lose some or all of your capital. Always do your own research and consult a licensed professional before making any financial decision. You are solely responsible for your own decisions and for complying with the laws and regulations that apply to you. Market data may be delayed, inaccurate, or incomplete, and is provided without warranty.
TIP
Prefer zero setup? Use the hosted version.TradingMCP serves all 39 tools in Claude, ChatGPT, Cursor, Grok and Copilot — no uv, pandas, or Python to wrangle, and in Claude, Cursor and Grok you just sign in instead of pasting a key. From $9/mo (Pro) or $29/mo (Pro+ — higher limits), with a 14-day money-back guarantee. Self-hosting stays free forever; hosted is just for folks who'd rather skip the ops. (Full self-host vs hosted comparison in Quick Start below.)
Async hot-path tools — 7 high-traffic tools (yahoo_price, stock_extended_hours, top_gainers, volume_breakout_scanner, multi_timeframe_analysis, financial_news, combined_analysis) converted to async def. FastMCP runs sync tools serialized on the event loop — async unlocks real intra-server parallelism so concurrent tool calls actually overlap. combined_analysis additionally fans its 3 sub-calls out via asyncio.gather for ~3× wall-clock improvement on the power tool. yahoo_price / stock_extended_hours use httpx.AsyncClient for true non-blocking I/O; sync-library tools (tradingview_ta, tradingview-screener, feedparser) are off-loaded via asyncio.to_thread. (PR — open)
9 backtest strategies (up from 6) — added rsi_pullback, keltner_breakout, and triple_ema, covering trend-pullback, ATR-normalized breakout, and SMA200-filtered EMA cross edges. compare_strategies now ranks the full 9.
Resilience layer — automatic retry + 60-second TTL cache on the TradingView screener provider, eliminating transient "Expecting value" errors on combined_analysis and multi_timeframe_analysis. (PR #32 — merged)
Financial news service rebuild — replaces deprecated Reuters RSS endpoints with Yahoo Finance, MarketWatch, and CNBC. Fixes the long-standing count: 0 bug on financial_news. (PR #33 — merged)
TA throttle — caps concurrent tradingview_ta calls (default 4) + min 0.8s spacing between starts. Prevents parallel bursts of combined_analysis / multi_timeframe_analysis from hitting TradingView's empty-body rate-limit cliff. Tunable via env vars. (PR #34 — merged)
Security notice: impersonating copies of this repository. This project is Python-only and has no official npm / Node.js package. The only official sources are this repository (atilaahmettaner/tradingview-mcp), the PyPI package tradingview-mcp-server, and the hosted version, TradingMCP, at tradingmcp.ai (formerly pro.cryptosieve.com).
Copies of this repository published under other accounts add a package.json whose dependencies install malware through npm (for example oracle-redis, MAL-2026-16390). If you cloned a "tradingview-mcp" repository from another account and ran npm install, treat that machine as compromised. Thanks to @roberttidball for the report (#101).
🚀 Quick Start (5 Minutes)
Two ways to run it — the same 39 tools either way:
☁️ Zero setup: add https://mcp.tradingmcp.ai/mcp as a connector in Claude, Cursor or Grok and sign in; ChatGPT, Copilot and other clients use your private link → get started with TradingMCP from $9/mo (14-day money-back guarantee) · setup guide. Everything below is for self-hosting.
Install via pip
bash
pip install tradingview-mcp-server
Optional: news & sentiment (free Marketaux key)
financial_news and market_sentiment (plus the news/sentiment parts of
combined_analysis) are powered by Marketaux —
licensed market news with per-entity sentiment. Grab a free API key
(100 requests/day; the server caches for 4h and shares one fetch between news
and sentiment, so the free tier goes a long way) and set:
After installing or enabling the Codex plugin, restart Codex so the MCP server is loaded in the next session. Depending on your Codex version, codex mcp list may show registered MCP servers, but tool availability should be verified in a fresh Codex session.
Or run from source
bash
git clone https://github.com/atilaahmettaner/tradingview-mcp
cd tradingview-mcp
uv run tradingview-mcp
How is the hosted version different from TradingView's official MCP?
TradingView launched its own MCP server in public beta on 16 Sep 2026. It is a good product, and for some jobs it is the better pick. Here is the honest difference (competitor facts checked Oct 2026 against TradingView's own MCP docs, launch post and pricing page):
Analysis, not just data. TradingMCP runs multi-timeframe analysis, walk-forward backtests, smart-money and volume scans, and draws interactive charts in the chat. TradingView's MCP returns data, screens and a single-timeframe technical rating; its tool list has no backtesting or chart rendering (docs, checked Oct 2026).
Morning market brief in one prompt. Global market snapshot, futures overview, Bitcoin pulse and the Markets panel in a single answer.
$9 all-in, nothing else to subscribe to. TradingView's MCP is included only in paid TradingView plans, Essential and higher; trial plans don't include it (docs, pricing, checked Oct 2026). TradingMCP is $9/mo Pro or $29/mo Pro+ with a 14-day money-back guarantee, and self-hosting this repo stays free.
Where TradingView's MCP wins: fundamentals and analyst forecasts, SEC filings and earnings-call transcripts, editing your TradingView watchlists and alerts, and data that comes officially from TradingView itself (docs, checked Oct 2026). If that is what you need, use theirs, or run both side by side.
Try TradingMCP · works in Claude, ChatGPT, Cursor, Grok, Copilot or any MCP client.
🛠️ Troubleshooting
🪟 Windows: MCP error -32001: Request timed out on first launch
Symptom — you see this in the Claude Desktop logs shortly after adding the config:
code
[tradingview] Server started and connected successfully
[tradingview] Message from client: initialize ...
[60 seconds later]
[tradingview] notifications/cancelled — reason: "MCP error -32001: Request timed out"
Why it happens: Python 3.14 is not supported yet. uvx downloads tradingview-mcp-server, creates a fresh virtualenv, and installs dependencies the first time it runs. Some native dependencies in the MCP stack do not currently publish compatible Python 3.14 wheels, so installation can fall back to source builds or fail before Claude Desktop finishes initializing the server.
Fix — pin to Python 3.13 (has prebuilt pandas wheels):
Tools that have adopted the structured error format return either their normal payload or an error envelope:
json
{"error":{"code":"ALL_BATCHES_FAILED","message":"All 5 batches failed; first error: JSONDecodeError(...)","batches_attempted":5,"batches_failed":5,"first_error":"...","retryable":true}}
Why: the previous [] / {"error": "Analysis failed: ..."} strings made it impossible to distinguish "no matches today" from "upstream rate-limit cliff." The new envelope is programmatically branchable by code, and retryable tells the caller whether waiting and retrying can help (upstream storms pass; a missing dependency won't fix itself).
Full coverage (every failure mode — upstream outage, empty symbol list, missing dependency, unexpected exception — returns an envelope, never a raw string/traceback): top_gainers, top_losers, bollinger_scan, rating_filter, volume_breakout_scanner, smart_volume_scanner.
Partial adoption (main error paths return envelopes): coin_analysis, volume_confirmation_analysis, consecutive_candles_scan, futures_market_overview, futures_top_movers, stock_prices, and the backtest input guards. Remaining tools migrate in batches — tracked in #76.
Detecting an error:
python
result = volume_breakout_scanner(exchange="KUCOIN")
ifisinstance(result, dict) and"error"in result:
code = result["error"]["code"]
if result["error"].get("retryable"):
# Wait + retry, raise alert, fall back to single-batch call, etc.
...
else:
for row in result:
...
Connect this server to Telegram, WhatsApp, Discord and 20+ messaging platforms using OpenClaw — a self-hosted AI gateway. Tested & verified on Hetzner VPS (Ubuntu 24.04).
How It Works
OpenClaw routes Telegram messages to an AI agent. The agent uses trading.py — a thin Python wrapper — to call tradingview-mcp functions and return formatted results. No MCP protocol needed between OpenClaw and the server; it's a direct Python import.
# Examples — set your chosen model:
openclaw config set agents.defaults.model "openrouter/google/gemini-3-flash-preview"# via OpenRouter
openclaw config set agents.defaults.model "anthropic/claude-sonnet-4-5"# Anthropic direct
openclaw config set agents.defaults.model "google/gemini-2.5-flash"# Google direct
⚠️ Important: Prefix must match your provider. google/... needs a Google API key. openrouter/... needs an OpenRouter key.
⚠️ Common Mistakes
Symptom
Cause
Fix
Unrecognized keys: mcpServers
mcpServers not supported in this version
Remove from config, use bash wrapper
No API key for provider "google"
Used google/model but only have OpenRouter key
Use openrouter/google/model instead
which agent? loop
acp.defaultAgent not set
openclaw config set acp.defaultAgent main
Gateway won't start
gateway.mode missing
openclaw config set gateway.mode local
Test Your Bot
Once running, send your Telegram bot:
code
market snapshot
backtest RSI strategy for AAPL, 1 year
compare all strategies for BTC-USD
🌍 Global Stock Screener — Common & Preferred Shares
Tool
Description
stock_screener
List common or preferred stocks for any TradingView country market (america, korea, germany, brazil, …) with price, currency, % change, dividend yield — ranked by market cap. The API twin of TradingView's "Common stock" / "Preferred stock" symbol-search filter.
stock_prices
Direct price lookup for specific symbols (comma-separated EXCHANGE:SYMBOL, e.g. NASDAQ:NVDA, KRX:005930) — price, currency, daily % change, with unrecognized tickers named in not_found.
🧠 AI Sentiment & Intelligence
Tool
Description
market_sentiment
Reddit sentiment across finance communities (bullish/bearish score, top posts)
financial_news
Live RSS headlines from Yahoo Finance, MarketWatch, CNBC, CoinDesk, CoinTelegraph
combined_analysis
Power Tool: TradingView technicals + Reddit sentiment + live news → confluence decision. Now backed by retry + 60s cache for resilience against transient screener errors.
📈 Technical Analysis Core
Tool
Description
get_technical_analysis
Full TA: RSI, MACD, Bollinger, 23 indicators with BUY/SELL/HOLD
You: "Give me a full market snapshot right now"
AI: [market_snapshot] → S&P500 -3.4%, BTC +0.1%, VIX 31 (+13%), EUR/USD 1.15
You: "What is Reddit saying about NVDA?"
AI: [market_sentiment] → Strongly Bullish (0.41) | 23 posts | 18 bullish
You: "Backtest RSI strategy on BTC-USD for 2 years"
AI: [backtest_strategy] → +31.5% return | 100% win rate | 2 trades | B&H: -5%
You: "Which of the 9 strategies worked best on MSFT in the last 2 years?"
AI: [compare_strategies] → triple_ema #1 (+15.1%, WR 100%), keltner_breakout #2 (+14.3%), macd last (-23.4%)
You: "Run walk-forward backtest on supertrend for SPY"
AI: [walk_forward_backtest_strategy] → Verdict: ROBUST (avg robustness 0.92) | OOS return +8.5%
You: "Analyze TSLA with all signals: technical + sentiment + news"
AI: [combined_analysis] → BUY (Technical STRONG BUY + Bullish Reddit + Positive news)
💖 Support the Project
This framework is free and open source, built in spare time. If it saves you hours of research or helps you make better decisions, please consider sponsoring:
Tier
Monthly
What You Get
☕ Coffee
$5
Heartfelt gratitude + name in README
🚀 Supporter
$15
Above + priority bug fixes
💎 Pro
$30
Above + priority feature requests
Every sponsor directly funds new features like Walk-Forward Backtesting, Twitter/X sentiment, and managed cloud hosting.
📋 Roadmap
TradingView technical analysis (30+ indicators)
Multi-exchange screener (Binance, KuCoin, MEXC, EGX, US, European, Canadian, Indian and Indonesian stocks)
Disclaimer: This tool is for educational and research purposes only. It does not constitute financial advice. Always do your own research before making investment decisions.