get_tradingview_chart_imageLABSCO SUMMARY
Charts a model can actually look at.
Price data as numbers and price data as a chart are different inputs, and this hands over the second one. Ask for a ticker at an interval and the snapshot comes back as an image, with patterns still visible in it.
What it is
A server that captures TradingView chart snapshots from a ticker and an interval and returns the image. It drives a real browser session against TradingView and keeps a pool of pre-initialized browser instances so several requests can be served at once.
What you get
- A chart snapshot for any TradingView ticker, such as BYBIT:BTCUSDT.P or NASDAQ:AAPL
- Intervals passed as '1', '5', '15', '60', '240', 'D' or 'W'
- The image as a direct snapshot URL or a base64 data URL, ready to show a vision model
- Up to 4 simultaneous requests served from a pre-initialized browser pool
- Timing figures for the running server
Requirements
A TradingView session for authenticated charts, configured through environment variables, and a browser for the scraper to drive. main_optimized.py is the production entry point; main.py is kept as a single-browser fallback for debugging.
Setup effort
Build from source
USE CASES
Getting a second opinion on a setup
Ask for the ticker at the interval you are watching and let the model read the chart image rather than a table of closes.
Comparing one symbol across timeframes
Request the same ticker at 60, 240 and D in one exchange to see whether the trend survives zooming out.
Putting a chart into a written note
The snapshot comes back as a direct URL, so it drops straight into the summary being drafted.
Checking the server keeps up under load
Read the running server's timing figures when several chart requests are in flight at once.
2 tools
Listed in project docs. Your client may show a different list.
get_performance_statsBEFORE YOU INSTALL
What to know first
Tools you get
2 tools named in the project's documentation. The shipped Claude Desktop and Cursor configs run main.py, the legacy single-browser version; main_optimized.py is the one with browser pooling.
Requires
- TRADINGVIEW_SESSION_ID in your environment
- TRADINGVIEW_SESSION_ID_SIGN in your environment
Where it runs
Both documented clients run the server on your machine.
INSTALLATION
Connect your client
You clone and build this one yourself.
Server setup
git clone https://github.com/ertugrul59/tradingview-chart-mcp
cd tradingview-chart-mcp
python3 -m venv .venvActivate it: source .venv/bin/activate (macOS/Linux), source .venv/Scripts/activate (Git Bash/WSL), .venv\Scripts\activate.bat (cmd) or .venv\Scripts\Activate.ps1 (PowerShell)
pip install -r requirements.txtCopy .env.example to .env and set TRADINGVIEW_SESSION_ID and TRADINGVIEW_SESSION_ID_SIGN (read them from your browser cookies after logging into TradingView)
Ensure chromedriver is installed and on your system PATH
Add the mcpServers block to claude_desktop_config.json (or ~/.cursor/mcp.json) with the venv python and entry-point absolute paths, then restart the client
MCP Clients
Claude Desktop
{
"mcpServers": {
"tradingview-chart-mcp": {
"command": "<YOUR_PATH_TO_TRADINGVIEW_CHART_MCP>/.venv/bin/python3",
"args": [
"<YOUR_PATH_TO_TRADINGVIEW_CHART_MCP>/main.py"
],
"env": {
"TRADINGVIEW_SESSION_ID": "<YOUR_TRADINGVIEW_SESSION_ID>",
"TRADINGVIEW_SESSION_ID_SIGN": "<YOUR_TRADINGVIEW_SESSION_ID_SIGN>"
}
}
}
}Windows %APPDATA%\Claude\claude_desktop_config.json · macOS ~/Library/Application Support/Claude/claude_desktop_config.json
Cursor
{
"mcpServers": {
"tradingview-chart-mcp": {
"command": "<YOUR_PATH_TO_TRADINGVIEW_CHART_MCP>/.venv/bin/python3",
"args": [
"<YOUR_PATH_TO_TRADINGVIEW_CHART_MCP>/main.py"
],
"env": {
"TRADINGVIEW_SESSION_ID": "<YOUR_TRADINGVIEW_SESSION_ID>",
"TRADINGVIEW_SESSION_ID_SIGN": "<YOUR_TRADINGVIEW_SESSION_ID_SIGN>"
}
}
}
}Settings -> Cursor Settings -> MCP -> Edit User MCP Config (~/.cursor/mcp.json)