tradingview-mcp
This MCP server provides a TradingView-focused toolkit for market screening, historical data, and optional advanced analysis/trading tools.
Run TradingView screener queries (filters, sorting, custom columns) across forex, crypto, US equities, and more.
Get technical-analysis summaries with RSI and MA/oscillator ratings for symbols.
Search TradingView's symbol directory for exchange-qualified tickers.
Fetch historical OHLCV bars from Dukascopy/OANDA with Parquet caching and multiple timeframes.
Diagnose setup prerequisites and provider status (
tv_setup_doctor,tv_data_providers_status).Opt-in toolsets add SMC/ICT scanning, chart PNG rendering, backtesting, journal sync, Pine compile, declarative strategies, economic calendar, TradingView account (
session) access, and Desktop CDP automation (navigation, drawings, indicators, Strategy Tester, Pine build/backtest).
Provides a TradingView-centric trading toolkit, including screener queries via TradingView's public endpoint, historical FX data, and optional toolsets for pattern scanning, chart rendering, backtesting, TradingView account data (session), desktop CDP control, and Pine Script compilation.
Click on "Deploy 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-mcp scan for bullish engulfing on EURUSD daily"
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
MCP server giving AI agents a TradingView-centric trading toolkit: screener queries, historical FX data, and — as milestones land — SMC/ICT pattern scanning, chart rendering with markup, backtesting, Pine tooling, and a bundle of companion Agent Skills.
AI agents: to install and verify this MCP for a human, follow
AGENT_SETUP.mdtop to bottom (prerequisites →uv sync→scripts/healthcheck.py→ register both servers → smoke tests → report).
Not affiliated with TradingView, Inc. "TradingView", "Pine Script" and "Lightweight Charts" are trademarks of TradingView, Inc.
Status
M0-M7 complete, M8 landed (part B awaits one live run): server boots with public/data defaults; opt-in toolsets for SMC scanning, chart rendering, backtesting, FX Replay journal sync, TradingView-account data (session), Pine compile, Desktop CDP (35 tools: app launcher, screenshots, API-driven symbol/timeframe/viewport navigation, drawing on the live chart, reading and configuring the user's own indicators — plot values, Pine-drawn FVG/OB zones incl. compact levels/zones, input changes with read-back —, Strategy Tester report, bar replay, and the Pine Editor: get/set source, compile-on-chart with error markers, save, open saved scripts; M8: scored chart-tab binding, generic UI find/click, level-tag checks on the chart's own bars, workspace preparation, surgical byte-verified Pine edits, own-copy protection, and tv_desktop_pine_build_and_backtest - one call from source to Strategy Tester report), declarative strategies, and a hybrid mode beside the official TradingView MCP. M7 ports the six mechanisms worth having from the community bridge tradesdontlie/tradingview-mcp (MIT) into this server's driver — landmines in docs/PLAN.md. Ships a tv CLI (every tool = a subcommand emitting JSON), 11 companion skills, and a validated Claude Code plugin manifest. Open items: M1's trust gate still awaits the owner's real hand-labeled SMC setups; webhook receiver, MCP Apps, and the sandboxed Python strategy escape hatch are deferred. Roadmap: docs/PLAN.md.
Related MCP server: TradingView MCP Jackson
Install as a Claude Code plugin
/plugin marketplace add Miha21222/tradingview-mcp
/plugin install tradingview-mcp@tradingview-mcp-marketplaceThe install registers two servers: this one (tradingview, stdio) and the official TradingView MCP (mcp-tradingview, https://mcp.tradingview.com/mcp). It prompts for optional credentials (OANDA practice key, TradingView sessionid) and operator settings (TV_TOOLSETS, TV_READ_ONLY, ...). Plugin default is TV_TOOLSETS=hybrid; set it to default (= public,data) for a zero-account setup that does not need the official server. Requires uv on PATH.
Hybrid with the official TradingView MCP
TradingView ships an official MCP (public beta, needs an Essential+ plan, OAuth via /mcp). It covers quotes, screener, symbol search, news, economic/earnings/dividend calendars, fundamentals, filings, price alerts and watchlists — and nothing else: no charts, indicators, Pine, drawings, replay, backtests or desktop access; bars delayed 15+ minutes; no history paging beyond the last 5000 bars; no broker-CFD symbols in its screener.
This project is built to run next to it, not instead of it:
Job | Server |
quotes, screener, search, news, calendars, fundamentals, alerts, watchlists | official |
deep/free OHLCV history, realtime session feed, SMC/ICT scans, chart rendering, backtests, strategies, Pine compile, journal, TradingView Desktop (CDP) | this server, |
hybrid = data,scan,chart,backtest,pine,journal,strategy,calendar: it drops the public toolset (the official screener replaces it) and keeps tv_setup_doctor, which now registers regardless of toolsets. The tradingview-hybrid skill holds the per-job routing table and the official beta's verified limits. Users without a qualifying TradingView plan keep TV_TOOLSETS=default,... and ignore the official entry — the two servers are independent.
Quick start
uv sync
uv run python -m tvmcp --check # list registered tools
uv run python -m tvmcp # run on stdio
uv run tv --check # CLI: list tools
uv run tv tv_data_get_bars '{"symbol":"EURUSD","count":10}' # CLI: call any tool -> JSONThe opt-in chart toolset renders via headless Chromium; run uv run playwright install chromium once if you enable it. Enable opt-in toolsets via TV_TOOLSETS=default,scan,chart,backtest,journal.
Claude Code: the repo's .mcp.json registers both servers automatically when you trust the project (tradingview with TV_TOOLSETS=hybrid, plus the official mcp-tradingview).
Configuration (env vars)
Var | Default | Meaning |
|
| Comma list; |
| off |
|
|
| Parquet OHLCV cache |
|
| Rendered PNG output (managed, collision-safe filenames) |
|
| journal watch-folder for |
|
| YAML strategy specs for |
| — | Your TradingView |
|
| CDP address of TradingView Desktop for the opt-in |
| auto | Explicit |
|
| Hard cap on bars per response |
| — | Free practice-account key enables the OANDA provider |
|
|
|
Run uv run tv tv_setup_doctor to check every prerequisite - each broken check returns the exact fix command. For a full install check in one command (Python/uv/Node/Chromium/server/doctor/MCP registration): uv run python scripts/healthcheck.py (--json for machines).
TradingView Terms of Service
The default toolsets use no TradingView account: the public toolset talks to TradingView's public scanner endpoint, and market data comes from Dukascopy/OANDA. TradingView's ToS prohibits automated data collection and non-display use of its data; the optional session and desktop toolsets (off by default) interact with your own TradingView account/desktop app at your own risk — enabling them is your explicit choice and may violate TradingView's ToS and risk account restrictions. Both print a ToS/ban warning to stderr on first use. This project is for personal research/education.
License
MIT — see LICENSE. Not affiliated with TradingView, Inc.; protected/invite-only Pine scripts remain their authors' property — the study tools read only the rendered output of indicators on your own chart, never their source.
Available Tools
6 toolstv_data_get_barsARead-only
Fetch historical OHLCV bars. Cached in Parquet; repeat queries are instant.
Providers: dukascopy (free, deep history to ~2000s, first fetch of a range is
slow) and oanda (real broker mid prices, needs OANDA_API_KEY). Bars are UTC,
returned as arrays [time_iso, open, high, low, close, volume]. The provider
field in the result names the feed - feeds disagree; levels are feed-specific.
Inputs: symbol (required), end, count, start, +2 more. Returns: object
tv_data_providers_statusARead-only
Which OHLCV data providers are usable right now, and why not if not.
Inputs: no named parameters. Returns: object
tv_screener_runARead-only
Run a TradingView screener query (unauthenticated scanner, ~3000 fields).
Use for: ranking/filtering instruments by indicator or fundamental values, finding oversold pairs, volume leaders, etc. US-equity quotes are 15-min delayed; forex/crypto are near-realtime. Timeframe-scoped fields take a suffix, e.g. 'RSI|15' for M15 RSI.
Inputs: limit, market, columns, filters, +1 more. Returns: object
tv_setup_doctorARead-only
Diagnose this install: check every prerequisite, return exact fixes.
Each check reports {name, ok, detail, optional} and - when broken - a fix
holding the exact shell command to run. Run the fixes for anything with
ok=false and optional=false, rerun the doctor, and the server is fully
operational. Credential checks (OANDA key, TV session cookie) are optional
and always require the human - never attempt to obtain credentials.
Inputs: no named parameters. Returns: object
tv_symbol_searchARead-only
Search TradingView's symbol directory. Returns exchange-qualified tickers with descriptions and types.
Inputs: text (required), limit. Returns: object
tv_ta_summaryARead-only
Technical-analysis summary per symbol: overall/MA/oscillator ratings plus RSI and close.
Ratings are TradingView's precomputed Recommend.* fields mapped to STRONG_BUY..STRONG_SELL. Use for a quick bias read, not as a trade signal.
Inputs: symbols (required), market, timeframe. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct surface—screening, TA ratings, symbol lookup, install diagnostics, provider health, and OHLCV data—so most are unambiguous. The two diagnostic tools have some overlap around environment/credential health but are separated by install prerequisites versus current data-feed availability.
All names share a tv_ prefix and snake_case, but the internal pattern is mixed: action-style names like tv_screener_run and tv_data_get_bars sit beside noun-style names like tv_ta_summary, tv_symbol_search, tv_setup_doctor, and tv_data_providers_status. A consistent verb_noun or noun_verb pattern would make the set more predictable.
Six tools is well-scoped for a TradingView-oriented data server: screening, symbol discovery, technical summaries, historical bars, and health diagnostics each have a home. No tool feels redundant, and the count is neither thin nor bloated.
Core workflows are covered: find symbols, screen/filter, get TA reads, and pull OHLCV bars, plus status and diagnostic tools. Minor gaps exist—such as no direct single-symbol quote tool separate from bars/screener and no explicit indicator-value fetch beyond the TA summary—but agents can work around these.
Maintenance
Related MCP Connectors
Evidence-gated quant research for TradingView Pine Script strategies, run from your AI client.
Live stock quotes, a stock screener, crypto prices and FX rates as agent tools.
> TradingMCP puts a market analyst inside your AI assistant. Paste one URL into Claude, ChatGPT, Cursor, VS Code or any MCP client and ask in plain language: screen for breakouts, run a multi-timeframe analysis, backtest a strategy with walk-forward validation, scan for smart-money and volume signals, or get a one-prompt morning market brief. In clients that support MCP Apps, price charts and the Markets panel are drawn right in the chat. > 40+ tools covering crypto (real-time), stocks, ETFs, FX, futures and commodities across major global exchanges. > Hosted, nothing to install: Pro $9/month (2,500 tool calls) or Pro+ $29/month (10,000). Paid upfront with a 14-day money-back guarantee; your API key arrives right after checkout. > Built on the open-source tradingview-mcp core (MIT, ~5k GitHub stars): self-host it free, or use the hosted version with zero ops. > For research and education, not financial advice. Not affiliated with TradingView
Live crypto + IDX stock market intelligence for AI agents — 19 tools, no API key.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceConnects AI assistants to TradingView Desktop for chart analysis, Pine Script development, and workflow automation via Chrome DevTools Protocol.-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to control and read data from TradingView Desktop, including morning briefs, chart analysis, Pine Script development, and replay mode.88 npm-
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with TradingView Desktop via Chrome DevTools Protocol for automated morning briefs, chart analysis, Pine script development, and trading workflows.88 npm-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to read and control TradingView Desktop charts in real time, supporting chart analysis, Pine Script development, alerts, replay practice, and multi-pane automation.1MIT