Tradingview Chart MCP
MCPサーバー - TradingViewチャート画像スクレーパー
この MCP サーバーは、ティッカーと間隔に基づいて TradingView チャート画像を取得するためのツールを提供します。
設定
仮想環境の作成:
# Navigate to the project directory cd tradingview-chart-mcp # Create the venv (use python3 if python is not linked) python3 -m venv .venv仮想環境をアクティブ化します:
macOS/Linux:
source .venv/bin/activateWindows (Git Bash/WSL):
source .venv/Scripts/activateWindows (コマンドプロンプト):
.venv\\Scripts\\activate.batWindows (PowerShell):
.venv\\Scripts\\Activate.ps1(注: PowerShell 実行ポリシーを調整する必要がある場合があります:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser)
ターミナルプロンプトに
(.venv)内にいることが示されるはずです。依存関係をインストールします(venv内):
pip install -r requirements.txt環境を構成する (ローカルテスト用):
.env.exampleを.envにコピーします。.envファイルにTRADINGVIEW_SESSION_IDとTRADINGVIEW_SESSION_ID_SIGNを入力してください。これらは、TradingViewにログイン後、ブラウザのCookieから取得できます。この
.envファイルは、ローカル テストのためにサーバーを直接実行するとき (例:python main.py) に使用されます。ローカル実行に必要な場合は、
.env内のオプションのスクレーパー設定 (MCP_SCRAPER_HEADLESSなど) を調整します。
ChromeDriver を確認する:
chromedriverがインストールされており、システムの PATH でアクセスできることを確認するか、パスの指定が許可されている場合はtview-scraper.pyを適切に構成します。
Related MCP server: tradingview-chart-mcp
サーバーの実行
仮想環境がアクティブ化されていることを確認します ( source .venv/bin/activateまたは同等のもの)。
python main.py仮想環境の無効化
完了したら、環境を非アクティブ化できます。
deactivate使用法
サーバーが実行される(アクティブ化された venv 内)と、 TradingView Chart Imageサーバー名をターゲットにして、MCP クライアントを使用してサーバーと対話できるようになります。
利用可能なツール:
get_tradingview_chart_image(ticker: str, interval: str): TradingView チャートの直接画像 URL を取得します。
プロンプトの例:
「NASDAQ:AAPLの15分チャートを取得する」
「BYBIT:BTCUSDT.Pの日足チャートを見せてください」
「60時間枠のCOINBASE:ETHUSDのTradingViewチャート画像を取得」
🔌 MCP クライアント (Claude Desktop / Cursor) での使用
このサーバーは、構成を提供する 2 つの方法をサポートしています。
.envファイル経由 (ローカル テスト用):python main.py直接実行すると、サーバーはプロジェクト ディレクトリ内の.envファイルから資格情報と設定を読み込みます。クライアント環境変数経由(統合に推奨): MCPクライアント(Claude/Cursorなど)で実行する場合は、必要な環境変数を直接挿入するようにクライアントを設定する必要があります。これらの環境変数は、
.envファイル内の値を上書きします。
クロードデスクトップ
Claude Desktop 構成ファイルを開きます。
Windows:
%APPDATA%\\Claude\\claude_desktop_config.jsonmacOS:
~/Library/Application\ Support/Claude/claude_desktop_config.json
mcpServersオブジェクト内に以下のコードを追加またはマージします。envenvに認証情報を入力してください。{ "mcpServers": { "tradingview-chart-mcp": { "command": "/absolute/path/to/your/tradingview-chart-mcp/.venv/bin/python3", "args": ["/absolute/path/to/your/tradingview-chart-mcp/main.py"], "env": { "TRADINGVIEW_SESSION_ID": "YOUR_SESSION_ID_HERE", "TRADINGVIEW_SESSION_ID_SIGN": "YOUR_SESSION_ID_SIGN_HERE" // Optional: Add MCP_SCRAPER_* variables here too if needed // "MCP_SCRAPER_HEADLESS": "False" } } // ... other servers if any ... } }プレースホルダー パス (
command、args) を実際の絶対パスに置き換えます。YOUR_SESSION_ID_HEREとYOUR_SESSION_ID_SIGN_HERE実際の TradingView の資格情報に置き換えます。Claude Desktop を再起動します。
カーソル
Settings -> Cursor Settings -> MCP -> Edit User MCP Config (~/.cursor/mcp.json)に移動します。mcpServersオブジェクト内に以下のコードを追加またはマージします。envenvに認証情報を入力してください。{ "mcpServers": { "tradingview-chart-mcp": { "command": "/absolute/path/to/your/tradingview-chart-mcp/.venv/bin/python3", "args": ["/absolute/path/to/your/tradingview-chart-mcp/main.py"], "env": { "TRADINGVIEW_SESSION_ID": "YOUR_SESSION_ID_HERE", "TRADINGVIEW_SESSION_ID_SIGN": "YOUR_SESSION_ID_SIGN_HERE" // Optional: Add MCP_SCRAPER_* variables here too if needed // "MCP_SCRAPER_HEADLESS": "False" } } // ... other servers if any ... } }プレースホルダー パス (
command、args) を実際の絶対パスに置き換えます。YOUR_SESSION_ID_HEREとYOUR_SESSION_ID_SIGN_HERE実際の TradingView の資格情報に置き換えます。カーソルを再起動します。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
A remote MCP server to convert HTML documents (URL or raw source) to PDF or screenshots
MCP server for Mint — AI-powered QA that runs your app in a real browser on every PR.
MCP server for OpenMM — exposes market data, account, trading, and strategy tools to AI agents
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables users to fetch TradingView chart images for specified tickers and intervals through MCP tools, returning snapshot URLs or base64 image data. It supports browser pooling for concurrent performance, configurable intervals, TradingView authentication, and performance statistics.-
- FlicenseNot gradedqualityAmaintenanceEnables fetching TradingView chart images for any ticker and interval using Selenium, with browser pooling for concurrent performance.-
- FlicenseNot gradedqualityAmaintenanceThis MCP server enables users to retrieve TradingView chart images for any ticker and interval via Selenium, with browser pooling for faster concurrent image fetching and optional session-based authentication.-
- FlicenseNot gradedqualityAmaintenanceEnables users to fetch chart snapshots for any ticker and timeframe through Selenium, with browser pooling to support efficient concurrent requests. It provides performance statistics and configurable authentication for use with MCP clients.-