- Explore MCP Servers
- tradingview-chart-mcp
Tradingview Chart Mcp
What is Tradingview Chart Mcp
tradingview-chart-mcp is an MCP server designed to scrape TradingView chart images based on specified tickers and intervals.
Use cases
Use cases include generating automated reports with TradingView charts, integrating chart images into trading platforms, and creating visual content for financial blogs or social media.
How to use
To use tradingview-chart-mcp, set up a virtual environment, install dependencies, configure your environment variables with your TradingView session details, and run the server using ‘python main.py’.
Key features
Key features include the ability to fetch TradingView chart images, support for multiple tickers and intervals, and customizable scraper settings for local testing.
Where to use
tradingview-chart-mcp can be used in financial analysis, trading applications, and any scenario where visual representation of stock or cryptocurrency charts is needed.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Tradingview Chart Mcp
tradingview-chart-mcp is an MCP server designed to scrape TradingView chart images based on specified tickers and intervals.
Use cases
Use cases include generating automated reports with TradingView charts, integrating chart images into trading platforms, and creating visual content for financial blogs or social media.
How to use
To use tradingview-chart-mcp, set up a virtual environment, install dependencies, configure your environment variables with your TradingView session details, and run the server using ‘python main.py’.
Key features
Key features include the ability to fetch TradingView chart images, support for multiple tickers and intervals, and customizable scraper settings for local testing.
Where to use
tradingview-chart-mcp can be used in financial analysis, trading applications, and any scenario where visual representation of stock or cryptocurrency charts is needed.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
MCP Server - TradingView Chart Image Scraper
This MCP server provides tools to fetch TradingView chart images based on ticker and interval.
Setup
-
Create Virtual Environment:
# Navigate to the project directory cd tradingview-chart-mcp # Create the venv (use python3 if python is not linked) python3 -m venv .venv -
Activate Virtual Environment:
- macOS/Linux:
source .venv/bin/activate - Windows (Git Bash/WSL):
source .venv/Scripts/activate - Windows (Command Prompt):
.venv\\Scripts\\activate.bat - Windows (PowerShell):
(Note: You might need to adjust PowerShell execution policy:.venv\\Scripts\\Activate.ps1Set-ExecutionPolicy RemoteSigned -Scope CurrentUser)
Your terminal prompt should now indicate you are in the
(.venv). - macOS/Linux:
-
Install Dependencies (inside venv):
pip install -r requirements.txt -
Configure Environment (for Local Testing):
- Copy
.env.exampleto.env. - Fill in your
TRADINGVIEW_SESSION_IDandTRADINGVIEW_SESSION_ID_SIGNin the.envfile. You can obtain these from your browser’s cookies after logging into TradingView. - This
.envfile is used when running the server directly (e.g.,python main.py) for local testing. - Adjust optional scraper settings (
MCP_SCRAPER_HEADLESS, etc.) in.envif needed for local runs.
- Copy
-
Ensure ChromeDriver: Make sure
chromedriveris installed and accessible in your system’s PATH, or configure thetview-scraper.pyaccordingly if it allows specifying a path.
Running the Server
Ensure your virtual environment is activated (source .venv/bin/activate or equivalent).
python main.py
Deactivating the Virtual Environment
When you are finished, you can deactivate the environment:
deactivate
Usage
Once the server is running (within the activated venv), you can interact with it using an MCP client, targeting the TradingView Chart Image server name.
Available Tools:
get_tradingview_chart_image(ticker: str, interval: str): Fetches the direct image URL for a TradingView chart.
Example Prompts:
- “Get the 15 minute chart for NASDAQ:AAPL”
- “Show me the daily chart for BYBIT:BTCUSDT.P”
- “Fetch TradingView chart image for COINBASE:ETHUSD on the 60 timeframe”
🔌 Using with MCP Clients (Claude Desktop / Cursor)
This server supports two ways of providing configuration:
- Via
.envfile (for local testing): When runningpython main.pydirectly, the server will load credentials and settings from a.envfile in the project directory. - Via Client Environment Variables (Recommended for Integration): When run by an MCP client (like Claude/Cursor), you should configure the client to inject the required environment variables directly. These will override any values found in a
.envfile.
Claude Desktop
-
Open your Claude Desktop configuration file:
- Windows:
%APPDATA%\\Claude\\claude_desktop_config.json - macOS:
~/Library/Application\ Support/Claude/claude_desktop_config.json
- Windows:
-
Add or merge the following within the
mcpServersobject. Provide your credentials in theenvblock: -
Replace the placeholder paths (
command,args) with your actual absolute paths. -
Replace
YOUR_SESSION_ID_HEREandYOUR_SESSION_ID_SIGN_HEREwith your actual TradingView credentials. -
Restart Claude Desktop.
Cursor
-
Go to:
Settings -> Cursor Settings -> MCP -> Edit User MCP Config (~/.cursor/mcp.json). -
Add or merge the following within the
mcpServersobject. Provide your credentials in theenvblock: -
Replace the placeholder paths (
command,args) with your actual absolute paths. -
Replace
YOUR_SESSION_ID_HEREandYOUR_SESSION_ID_SIGN_HEREwith your actual TradingView credentials. -
Restart Cursor.
Installing via Smithery
To install TradingView Chart Image Scraper for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @ertugrul59/tradingview-chart-mcp --client claude
Configuration
Environment Variables
The following environment variables can be set to configure the scraper:
TRADINGVIEW_SESSION_ID: Your TradingView session ID (required)TRADINGVIEW_SESSION_ID_SIGN: Your TradingView session ID signature (required)MCP_SCRAPER_HEADLESS: Run browser in headless mode (default:True)MCP_SCRAPER_WINDOW_WIDTH: Browser window width (default:1920)MCP_SCRAPER_WINDOW_HEIGHT: Browser window height (default:1080)MCP_SCRAPER_USE_SAVE_SHORTCUT: Use clipboard image capture instead of screenshot links (default:True)MCP_SCRAPER_CHART_PAGE_ID: Custom chart page ID (optional)
Save Shortcut Feature
The MCP_SCRAPER_USE_SAVE_SHORTCUT feature allows you to capture chart images directly to the clipboard as base64 data URLs instead of getting screenshot links. This eliminates the need to download images from URLs.
Benefits:
- Faster chart capture (no HTTP requests needed)
- More reliable (no dependency on TradingView’s CDN)
- Works offline once the chart is loaded
- Direct base64 data URLs for immediate use
How it works:
- When enabled (
True): UsesShift+Ctrl+S(orShift+Cmd+Son Mac) to capture chart image directly to clipboard - When disabled (
False): Uses traditionalAlt+Sto get screenshot links, then converts to image URLs
Configuration:
# Enable clipboard image capture (DEFAULT)
MCP_SCRAPER_USE_SAVE_SHORTCUT=True
# Disable and use traditional screenshot links
MCP_SCRAPER_USE_SAVE_SHORTCUT=False
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










