Tradingview Chart MCP

MIT License
1
  • Apple
  • Linux

Integrations

  • Supports fetching chart images for Coinbase-listed cryptocurrency pairs using the TradingView interface.

  • Fetches TradingView chart images based on ticker symbols and time intervals, allowing users to retrieve visual market data for various financial instruments.

MCPサーバー - TradingViewチャート画像スクレーパー

この MCP サーバーは、ティッカーと間隔に基づいて TradingView チャート画像を取得するためのツールを提供します。

設定

  1. 仮想環境の作成:
    # Navigate to the project directory cd tradingview-chart-mcp # Create the venv (use python3 if python is not linked) python3 -m venv .venv
  2. 仮想環境をアクティブ化します:
    • macOS/Linux:
      source .venv/bin/activate
    • Windows (Git Bash/WSL):
      source .venv/Scripts/activate
    • Windows (コマンドプロンプト):
      .venv\\Scripts\\activate.bat
    • Windows (PowerShell):
      .venv\\Scripts\\Activate.ps1
      (注: PowerShell 実行ポリシーを調整する必要がある場合があります: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser )

    ターミナルプロンプトに(.venv)内にいることが示されるはずです。

  3. 依存関係をインストールします(venv内):
    pip install -r requirements.txt
  4. 環境を構成する (ローカルテスト用):
    • .env.example.envにコピーします。
    • .envファイルにTRADINGVIEW_SESSION_IDTRADINGVIEW_SESSION_ID_SIGNを入力してください。これらは、TradingViewにログイン後、ブラウザのCookieから取得できます。
    • この.envファイルは、ローカル テストのためにサーバーを直接実行するとき (例: python main.py ) に使用されます。
    • ローカル実行に必要な場合は、 .env内のオプションのスクレーパー設定 ( MCP_SCRAPER_HEADLESSなど) を調整します。
  5. ChromeDriver を確認する: chromedriverがインストールされており、システムの PATH でアクセスできることを確認するか、パスの指定が許可されている場合はtview-scraper.pyを適切に構成します。

サーバーの実行

仮想環境がアクティブ化されていることを確認します ( 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 つの方法をサポートしています。

  1. .envファイル経由 (ローカル テスト用): python main.py直接実行すると、サーバーはプロジェクト ディレクトリ内の.envファイルから資格情報と設定を読み込みます。
  2. クライアント環境変数経由(統合に推奨): MCPクライアント(Claude/Cursorなど)で実行する場合は、必要な環境変数を直接挿入するようにクライアントを設定する必要があります。これらの環境変数は、 .envファイル内の値を上書きします。

クロードデスクトップ

  1. Claude Desktop 構成ファイルを開きます。
    • Windows: %APPDATA%\\Claude\\claude_desktop_config.json
    • macOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
  2. mcpServersオブジェクト内に以下のコードを追加またはマージします。env envに認証情報を入力してください。
    { "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 ... } }
  3. プレースホルダー パス ( commandargs ) を実際の絶対パスに置き換えます。
  4. YOUR_SESSION_ID_HEREYOUR_SESSION_ID_SIGN_HERE実際の TradingView の資格情報に置き換えます。
  5. Claude Desktop を再起動します。

カーソル

  1. Settings -> Cursor Settings -> MCP -> Edit User MCP Config (~/.cursor/mcp.json)に移動します。
  2. mcpServersオブジェクト内に以下のコードを追加またはマージします。env envに認証情報を入力してください。
    { "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 ... } }
  3. プレースホルダー パス ( commandargs ) を実際の絶対パスに置き換えます。
  4. YOUR_SESSION_ID_HEREYOUR_SESSION_ID_SIGN_HERE実際の TradingView の資格情報に置き換えます。
  5. カーソルを再起動します。
-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

TradingviewチャートMCP

  1. Setup
    1. Running the Server
      1. Deactivating the Virtual Environment
        1. Usage
          1. 🔌 Using with MCP Clients (Claude Desktop / Cursor)
            1. Claude Desktop
            2. Cursor

          Related MCP Servers

          • -
            security
            F
            license
            -
            quality
            The MCP Trader Server conducts comprehensive technical analysis on stocks, offering insights into trends, momentum indicators, volatility metrics, and volume analysis to support stock trading decisions.
            Last updated -
            29
            Python
            • Apple
          • A
            security
            A
            license
            A
            quality
            An MCP server that integrates the XTQuant quantitative trading platform with AI assistants, allowing AI to directly access and operate on trading data and functionality.
            Last updated -
            8
            30
            Python
            MIT License
            • Apple
          • -
            security
            A
            license
            -
            quality
            An MCP server that provides current and historical gold/precious metal prices (gold, silver, platinum, and palladium) via the GoldAPI.io service with support for multiple currencies.
            Last updated -
            Python
            MIT License
            • Linux
            • Apple
          • A
            security
            F
            license
            A
            quality
            An MCP server that analyzes stock trading volume to identify significant price levels (volume walls), supporting features like order book data fetching, trade analysis, and volume distribution tracking.
            Last updated -
            3
            51
            2
            Python
            • Apple

          View all related MCP servers

          ID: uwvwimzth3