tradingview-mcp
Fetches OHLCV candle data for NSE/BSE symbols from TradingView's chart WebSocket, supporting various resolutions (intraday, daily, weekly, monthly) and returning bars as [timestamp, open, high, low, close, volume].
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-mcpGive me the last 5 daily candles for NSE:RELIANCE"
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
A minimal MCP server that fetches OHLCV candles for NSE/BSE symbols from TradingView's chart WebSocket. For testing live/intraday data before moving to the paid Kite feed. Protocol reverse-engineered in PROTOCOL.md.
What it does
One tool:
get_ohlcv(symbol, resolution, bars)→ bars as[unix_time, open, high, low, close, volume], oldest first.symbol:NSE:RELIANCE,NSE:NIFTY,BSE:SENSEX, …resolution:15/60/D/W/1Mor aliases15m/hourly/daily/weekly.Indicators are NOT fetched — compute EMA/ATR/RSI yourself (the swing engine already does).
Data quality depends on login (see below). Logged in with a free account, many NSE symbols stream real-time; anonymous guest is delayed/EOD.
Related MCP server: tradinview-mcp
First-time login (recommended)
A logged-in session gives better/real-time data. Run this once — the password
is used only to obtain a token and is never stored; only the token +
sessionid land in .tv_session.json (gitignored, chmod 600). The client and MCP
pick it up automatically.
TV_USERNAME='you@example.com' TV_PASSWORD='...' python3 tv_auth.pyIf TradingView ever throws a CAPTCHA/2FA (it didn't in testing), grab the
auth_token from a logged-in browser (devtools → WS → set_auth_token) and drop
it into .tv_session.json as {"auth_token":"..."}. Without any session file the
client falls back to the guest token automatically.
Files
tv_client.py— the WebSocket client (also runnable:python3 tv_client.py NSE:RELIANCE D 10)tv_auth.py— one-time login → saves the session token (.tv_session.json)server.py— the stdio MCP server (no external SDK; retries on TV rate-limits)requirements.txt—websocket-client,requests(login only)
Install / run
pip install -r requirements.txt
python3 tv_client.py NSE:RELIANCE 15 5 # quick sanity checkConnect to Claude Code
claude mcp add tradingview -- python3 /home/neh/StockWealth/tradingview-mcp/server.pyRestart the session so the tool loads, then ask for e.g. NSE:HFCL daily candles.
Honest caveats
Unofficial + against TradingView's ToS; the protocol/tokens change without notice, so this WILL break eventually. Testing tool only.
A logged-in free account streams real-time on many NSE symbols (verified); anonymous guest is delayed. Some symbols/exchanges still require a paid data plan regardless.
TradingView rate-limits rapid reconnects; the server retries with backoff. Don't hammer it.
The intended production path is the Kite Connect API (~₹500/mo) — official, stable, real-time. This MCP exists only to test the intraday-data workflow first.
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
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that lets AI assistants interact with TradingView for real-time quotes, historical OHLCV data, screener, alerts, watchlists, news, chart layouts, Pine scripts, and more. Connect it to Claude Desktop, Cursor, or any MCP-compatible client to control TradingView via natural language.2815
- FlicenseBqualityCmaintenanceA TradingView-style market research and charting MCP server that provides tools for market data, indicators, watchlists, and local HTML chart rendering without scraping TradingView.9
- FlicenseAqualityBmaintenanceMCP server for historical asset analysis using tvDatafeed and cached CSV files. Enables fetching OHLCV bars, candlestick charts, and trade execution data for TradingView-style assets.3
- AlicenseBqualityCmaintenanceTradingView 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.441MIT
Related MCP Connectors
Open-source MCP server for Zerodha Kite Connect. Portfolio, market data, backtesting, alerts.
Real-time market data, screeners, technical analysis & backtesting for stocks, crypto and forex.
Twelve Data MCP: real-time & historical market data (stocks, crypto, forex, etc).
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/thecyberneh/tradingview-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server