Tradingview Mcp Server

by atilaahmettaner

1k downloads
Not rated
GitHub

Description

# 📈 TradingView MCP Server A powerful Model Context Protocol (MCP) server that provides advanced cryptocurrency and stock market analysis using TradingView data. Perfect for traders, analysts, and AI assistants who need real-time market intelligence. ## 🎥 Demo Video > **Quick…

About

# 📈 TradingView MCP Server A powerful Model Context Protocol (MCP) server that provides advanced cryptocurrency and stock market analysis using TradingView data. Perfect for traders, analysts, and AI assistants who need real-time market intelligence. ## 🎥 Demo Video > **Quick 19-second demo showing the MCP server in…

Details

Author
atilaahmettaner
Downloads
1,026
Categories
Finance, Other, AI

- Real-time market screening for top gainers, losers, and trending assets
- Advanced technical analysis including Bollinger Bands, RSI, MACD
- Proprietary Bollinger Band rating system (-3 to +3) for squeeze detection
- Pattern recognition for consecutive bullish/bearish candle formations
- Multi-market support for crypto exchanges and traditional markets
- Multi-timeframe analysis from 5-minute to monthly charts

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Tradingview Mcp Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install the UV package manager, add the server configuration to Claude Desktop’s claude_desktop_config.json, then restart Claude Desktop. You can then ask Claude natural language queries such as “Show me the top 10 crypto gainers on KuCoin” or “Analyze Bitcoin with all technical indicators”. The server exposes tools like top_gainers, coin_analysis, and bollinger_scan.

top_gainers

Return top gainers for an exchange and timeframe using Bollinger Band analysis. Args: exchange: Exchange name — crypto: KUCOIN, BINANCE, BYBIT; stocks: EGX, BIST, NASDAQ, NYSE, BURSA, HKEX timeframe: One of 5m, 15m, 1h, 4h, 1D, 1W, 1M limit: Number of rows to return (max 50)

top_losers

Return top losers for an exchange and timeframe. Supports crypto (KUCOIN, BINANCE) and stocks (EGX, BIST, NASDAQ).

bollinger_scan

Scan for assets with low Bollinger Band Width (squeeze detection). Works with crypto and stocks. Args: exchange: Exchange — crypto: KUCOIN, BINANCE, BYBIT; stocks: EGX, BIST, NASDAQ, NYSE, BURSA, HKEX timeframe: One of 5m, 15m, 1h, 4h, 1D, 1W, 1M bbw_threshold: Maximum BBW value to filter (default 0.04) limit: Number of rows to return (max 100)

rating_filter

Filter coins by Bollinger Band rating. Args: exchange: Exchange name like KUCOIN, BINANCE, BYBIT, 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)

coin_analysis

Get detailed analysis for a specific asset (coin or stock) on specified exchange and timeframe. Args: symbol: Symbol — crypto: "BTCUSDT", "ETHUSDT"; stocks: "COMI" (EGX), "THYAO" (BIST) exchange: Exchange — crypto: KUCOIN, BINANCE; stocks: EGX, BIST, NASDAQ, NYSE, BURSA, HKEX timeframe: Time interval (5m, 15m, 1h, 4h, 1D, 1W, 1M) Returns: Detailed analysis with all indicators and metrics

consecutive_candles_scan

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

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

volume_breakout_scanner

Detect coins with volume breakout + price breakout. Args: exchange: Exchange name like KUCOIN, BINANCE, BYBIT, 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)

volume_confirmation_analysis

Detailed volume confirmation analysis for a specific coin. Args: symbol: Coin symbol (e.g., BTCUSDT) exchange: Exchange name timeframe: Time frame for analysis

smart_volume_scanner

Smart volume + technical analysis combination scanner. Args: exchange: Exchange name min_volume_ratio: Minimum volume multiplier (default 2.0) min_price_change: Minimum price change percentage (default 2.0) rsi_range: "oversold" (<30), "overbought" (>70), "neutral" (30-70), "any" limit: Number of results (max 30)

multi_agent_analysis

Run a multi-agent debate (Technical, Sentiment, Risk) for a specific symbol. Args: symbol: Symbol — crypto: "BTCUSDT"; stocks: "COMI" (EGX), "THYAO" (BIST) exchange: Exchange — crypto: KUCOIN, BINANCE; stocks: EGX, BIST, NASDAQ, NYSE timeframe: Time interval (5m, 15m, 1h, 4h, 1D, 1W) Returns: A structured debate between 3 AI agents culminating in a final trading decision.

egx_market_overview

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)

egx_sector_scan

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)

egx_sector_scanner

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)

egx_index_analysis

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)

egx_stock_screener

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)

egx_trade_plan

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)

egx_fibonacci_retracement

Fibonacci retracement analysis for EGX stocks. Args: symbol: EGX stock symbol (e.g., "COMI", "TMGH", "FWRY") lookback: Period for swing high/low — "1M", "3M", "6M", "52W", "ALL" (default 52W) timeframe: Analysis timeframe (5m, 15m, 1h, 4h, 1D, 1W, 1M — default 1D)

multi_timeframe_analysis

Multi-timeframe alignment analysis (Weekly → Daily → 4H → 1H → 15m). Args: symbol: Symbol — crypto: "BTCUSDT"; stocks: "COMI" (EGX), "THYAO" (BIST) exchange: Exchange — crypto: KUCOIN, BINANCE; stocks: EGX, BIST, NASDAQ, NYSE

market_sentiment

Real-time Reddit sentiment analysis for stocks and crypto. Args: symbol: Asset symbol ("AAPL", "BTC", "ETH", "TSLA") category: Subreddit group to search ("crypto", "stocks", "all") limit: Number of posts to analyse

financial_news

Real-time financial news from RSS feeds (Reuters, CoinDesk, etc.) Args: symbol: Optional symbol filter ("AAPL", "BTC"). None = all news. category: Feed category ("crypto", "stocks", "all") limit: Max number of news items

combined_analysis

POWER TOOL: TradingView technical analysis + Reddit sentiment + Financial news. Args: symbol: Asset symbol ("AAPL", "BTCUSDT", "THYAO") exchange: Exchange (NASDAQ, NYSE, BINANCE, KUCOIN, BIST, EGX) timeframe: Analysis timeframe (5m, 15m, 1h, 4h, 1D, 1W)

backtest_strategy

Backtest a trading strategy on historical data with institutional-grade metrics. Args: symbol: Yahoo Finance symbol (AAPL, BTC-USD, THYAO.IS, ^GSPC) strategy: rsi | bollinger | macd | ema_cross | supertrend | donchian period: '1mo', '3mo', '6mo', '1y', '2y' initial_capital: Starting capital in USD (default $10,000) commission_pct: Per-trade commission % (default 0.1%) slippage_pct: Per-trade slippage % (default 0.05%) interval: '1d' (daily) or '1h' (hourly) include_trade_log: Include full per-trade log (default False) include_equity_curve: Include equity curve data points (default False)

compare_strategies

Run all 6 strategies (RSI, Bollinger, MACD, EMA Cross, Supertrend, Donchian) and return a ranked leaderboard. Args: symbol: Yahoo Finance symbol (AAPL, BTC-USD, SPY…) period: '1mo', '3mo', '6mo', '1y', '2y' initial_capital: Starting capital in USD (default $10,000) interval: '1d' (daily) or '1h' (hourly)

walk_forward_backtest_strategy

Walk-forward backtest to detect overfitting — validates strategy on unseen data. Args: symbol: Yahoo Finance symbol (AAPL, BTC-USD, SPY…) strategy: rsi | bollinger | macd | ema_cross | supertrend | donchian period: '1mo', '3mo', '6mo', '1y', '2y' (recommend '2y') initial_capital: Starting capital per fold in USD (default $10,000) commission_pct: Per-trade commission % (default 0.1%) slippage_pct: Per-trade slippage % (default 0.05%) n_splits: Number of walk-forward folds (default 3, max 10) train_ratio: Fraction of each fold used for training (default 0.7) interval: '1d' (daily) or '1h' (hourly)

yahoo_price

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

market_snapshot

Global market overview: major indices, top crypto, FX rates, and key ETFs. Powered by Yahoo Finance.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "tradingview mcp server": {
            "tradingview-mcp": {
                "command": "uv",
                "args": [
                    "tool",
                    "run",
                    "--from",
                    "git+https://github.com/atilaahmettaner/tradingview-mcp.git",
                    "tradingview-mcp"
                ]
            }
        }
    }
}

McpServers

{
    "tradingview-mcp": {
        "command": "uv",
        "args": [
            "tool",
            "run",
            "--from",
            "git+https://github.com/atilaahmettaner/tradingview-mcp.git",
            "tradingview-mcp"
        ]
    }
}

TradingView MCP Market Data & Technical Analysis for AI Assistants

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 + 37 technical-analysis tools — the most complete TradingView MCP toolkit, all in one server.

🆕 The hosted server now draws.Ask for a chart and an interactive candlestick view (1d / 1h / 15m, optional Bollinger overlay) renders liveinside the conversationvia MCP Apps — and the AI reads the band values back to you:

Paste one URL (orpip install), then just ask.Real output, straight from the live server:

Try these first— they work in Claude, ChatGPT, Cursor, or any MCP client:

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 doesnotlog 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.

"TradingView MCP" now means two very different kinds of project. Both are useful — for different jobs:

If you want an AI clicking aroundyourTradingView Desktop — editing Pine Script, drawing on charts, using replay — check outtradesdontlie/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 arenotrecommendations 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.pro.cryptosieve.comserves all 37 tools as one connector URL for Claude.ai, ChatGPT, Copilot, and Cursor — nouv,pandas, or Python to wrangle.From $9/mo (Pro) or $29/mo (Pro+ — higher limits), with a 3-day free trial.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.)

⭐ If this tool improves your workflow, please star the repo and considersponsoring— it keeps the project alive and growing!

https://github-production-user-asset-6210df.s3.amazonaws.com/67838093/478689497-4a605d98-43e8-49a6-8d3a-559315f6c01d.mp4

Stability & Strategy Expansion (May 2026)

- 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 toasync def. FastMCP runs sync tools serialized on the event loop — async unlocks real intra-server parallelism so concurrent tool calls actually overlap.combined_analysisadditionally fans its 3 sub-calls out viaasyncio.gatherfor ~3× wall-clock improvement on the power tool.yahoo_price/stock_extended_hoursusehttpx.AsyncClientfor true non-blocking I/O; sync-library tools (tradingview_ta,tradingview-screener,feedparser) are off-loaded viaasyncio.to_thread.(PR — open)
- 9 backtest strategies(up from 6) — addedrsi_pullback,keltner_breakout, andtriple_ema, covering trend-pullback, ATR-normalized breakout, and SMA200-filtered EMA cross edges.compare_strategiesnow ranks the full 9.
- Resilience layer— automatic retry + 60-second TTL cache on the TradingView screener provider, eliminating transient"Expecting value"errors oncombined_analysisandmulti_timeframe_analysis.(PR
#32— merged)
- Financial news service rebuild— replaces deprecated Reuters RSS endpoints with Yahoo Finance, MarketWatch, and CNBC. Fixes the long-standingcount: 0bug onfinancial_news.(PR
#33— merged)
- TA throttle— caps concurrenttradingview_tacalls (default 4) + min 0.8s spacing between starts. Prevents parallel bursts ofcombined_analysis/multi_timeframe_analysisfrom hitting TradingView's empty-body rate-limit cliff. Tunable via env vars.(PR
#34— merged)
- Walk-forward backtesting(walk_forward_backtest_strategy) — train/test split with overfitting verdict (ROBUST / MODERATE / WEAK / OVERFITTED).
- Hourly (1h) timeframesupport acrossbacktest_strategy,compare_strategies, andwalk_forward_backtest_strategy.
- Full trade log + equity curveoutputs (include_trade_log=True,include_equity_curve=True).

Two ways to run it — the same 37 tools either way:

☁️Zero setup:paste one connector URL into Claude.ai, ChatGPT, Copilot, or Cursor →start a 3-day free trial. Everything below is for self-hosting.

Optional: news & sentiment (free Marketaux key)

financial_newsandmarket_sentiment(plus the news/sentiment parts ofcombined_analysis) are powered byMarketaux— licensed market news with per-entity sentiment. Grab afree 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:

export MARKETAUX_API_TOKEN=your_token_here # optional

Without a token those two tools return a friendly "not configured" note — all other tools work normally.

Claude Desktop Config (claude_desktop_config.json)

Note:On macOS, GUI apps like Claude Desktop may not have~/.local/binin their PATH. Use the full path touvxto avoid "command not found" errors.

{ "mcpServers": { "tradingview": { "command": "/Users/YOUR_USERNAME/.local/bin/uvx", "args": ["--from", "tradingview-mcp-server", "tradingview-mcp"] } } }

On Linux, replace/Users/YOUR_USERNAMEwith/home/YOUR_USERNAME. On Windows, use%USERPROFILE%\.local\bin\uvx.exe.

This repository also includes mcp-only Codex plugin metadata:

- .codex-plugin/plugin.json
- .codex-mcp.json

The plugin uses the same PyPI package entrypoint:

{ "mcpServers": { "tradingview": { "command": "uvx", "args": ["--from", "tradingview-mcp-server", "tradingview-mcp"] } } }

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 listmay show registered MCP servers, but tool availability should be verified in a fresh Codex session.

git clone https://github.com/atilaahmettaner/tradingview-mcp cd tradingview-mcp uv run tradingview-mcp

🪟 Windows:MCP error -32001: Request timed outon first launch

Symptom — you see this in the Claude Desktop logs shortly after adding the config:

[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.uvxdownloadstradingview-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):

{ "mcpServers": { "tradingview": { "command": "uvx", "args": ["--python", "3.13", "--from", "tradingview-mcp-server", "tradingview-mcp"] } } }

On macOS use the full path touvx(see the note in Quick Start). On Windowsuvxis typically%USERPROFILE%\.local\bin\uvx.exe.

Alternative — pre-install once, then let Claude Desktop reuse the cache:

# Run in a terminal before launching Claude Desktop uv tool install --python 3.13 tradingview-mcp-server

After the install finishes, start Claude Desktop with the normal config and the server will come up instantly (cache is already warm).

Credit:@wyh4444for the original report in#24.

Tools that have adopted the structured error format return either their normal payloadoran error envelope:

{"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 bycode, andretryabletells 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.

result = volume_breakout_scanner(exchange="KUCOIN") if isinstance(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: ...

Stable codes are defined in[core/errors.py.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.