AR

ali-rajabpour/tradingview-mcp

Browser automation

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

18 stars 10 forks 품질 67 트렌드 22MIT

Fast, Secure 및 customizable 브라우저 자동화를 위해 Playwright를 사용하여 TradingView 차트 스냅 샷을 태칭하는 경량 파이썬 MCP 서버.

개요

TradingView 차트 스냅 샷을 fetching Model Context Protocol (MCP) 서버. Playwright는 지속적인 세션과 쿠키 기반 인증으로 효율적인 브라우저 자동화를 위해 사용합니다. : TradingView가 JavaScript/Canvas와 함께 차트 클라이언트를 렌더링하기 때문에 Playwright를 사용합니다. 차트 이미지에 대한 순수 HTTP API가 없습니다. 이것은 가장 가벼운 가능한 일 해결책 (Selenium를 가진 ~500MB 대 ~150MB)입니다. - head : headless mode (~150MB vs ~500MB with Selenium)에서 Playwright - ♨ : Persistent browser reuse, 3-5 seconds per chart - ̇ : cookie를 통한 Session-based authentication - ✪ : 차트 크기, 간격 및 테마 구성 - ✪ : MCP-enabled client (Claude Desktop 등)와 함께 작동 - USER️ : 여러 요청에 따라 브라우저 인스턴스를 재사용 - Python 3.10 이상 - TradingView 계정 (무료 또는 유료) - TradingView 세션 쿠키 2. - 브라우저에서 TradingView로 로그인 - 개발자 도구 열기 - 탭으로 이동 (Chrome) 또는 탭 (Firefox) - Navigate로 > https://www.]

개요(AI 번역)

A ** 경량 ** Model Context Protocol (MCP) 서버는 TradingView 차트 스냅 샷을 태칭합니다. Playwright는 지속적인 세션과 쿠키 기반 인증으로 효율적인 브라우저 자동화를 위해 사용합니다.

** 참고**: 이 사용 Playwright 때문에 TradingView는 JavaScript/Canvas 클라이언트 측을 렌더링합니다. 차트 이미지에 대한 순수 HTTP API가 없습니다. 이것은 가장 가벼운 가능한 일 해결책 (Selenium를 가진 ~500MB 대 ~150MB)입니다.

✨ 특징

  • ** 경량 **: 헤드리스 모드에서 재생 (~150MB 대 ~500MB Selenium)
  • ♨ **빠른 **: 영구 브라우저 재사용, 차트 당 3-5 초
  • ☸ Secure: 쿠키를 통해 세션 기반 인증
  • 사용자 정의**: 차트 치수, 간격 및 테마 구성
  • ☸ ** MCP 호환 ** : 어떤 MCP 지원 클라이언트 (Claude Desktop 등)
  • 기타 **: 여러 요청에 걸쳐 브라우저 인스턴스를 재사용

Pre Pre

  • Python 3.10 이상
  • TradingView 계정 (무료 또는 유료)
  • TradingView 세션 쿠키

내용 표

  • 설치
  • 빠른 시작
  • 사용
  • 구성
  • 사용 가능한 도구
  • 심볼 형식
  • 문제 해결
  • 공연
  • 기여

♨ 설치

# # # 1 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #.

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

TradingView MCP Server 📈

A lightweight Model Context Protocol (MCP) server for fetching TradingView chart snapshots. Uses Playwright for efficient browser automation with persistent sessions and cookie-based authentication.

Note: This uses Playwright because TradingView renders charts client-side with JavaScript/Canvas. There is no pure HTTP API for chart images. This is the lightest possible working solution (~150MB RAM vs ~500MB with Selenium).

✨ Features

  • 🪶 Lightweight: Playwright in headless mode (~150MB vs ~500MB with Selenium)
  • 🚀 Fast: Persistent browser reuse, 3-5 seconds per chart
  • 🔐 Secure: Session-based authentication via cookies
  • 🎨 Customizable: Configure chart dimensions, intervals, and themes
  • 🔧 MCP Compatible: Works with any MCP-enabled client (Claude Desktop, etc.)
  • ♻️ Efficient: Reuses browser instances across multiple requests

📋 Prerequisites

  • Python 3.10 or higher
  • A TradingView account (free or paid)
  • TradingView session cookies

Table of Contents

🚀 Installation

1. Clone the repository

git clone https://github.com/yourusername/tradingview-mcp.git
cd tradingview-mcp

2. Create a virtual environment

# Windows
python -m venv venv
.\venv\Scripts\activate

# Linux/Mac
python3 -m venv venv
source venv/bin/activate

3. Install dependencies

pip install -r requirements.txt

# Install Playwright browsers (one-time setup, ~150MB download)
python -m playwright install chromium

4. Configure credentials

  1. Copy .env.example to .env:

    # Windows
    copy .env.example .env
    
    # Linux/Mac
    cp .env.example .env
    
  2. Get your TradingView session cookies:

    • Log into TradingView in your browser
    • Press F12 to open Developer Tools
    • Go to Application tab (Chrome) or Storage tab (Firefox)
    • Navigate to Cookies > https://www.tradingview.com
    • Find and copy these two cookie values:
      • sessionid → Copy the entire value
      • sessionid_sign → Copy the entire value

    ⚠️ Important: Copy the full values including any special characters (slashes, equals signs, etc.). Don’t add quotes or extra spaces.

  3. Edit .env and paste your values:

    TRADINGVIEW_SESSION_ID=your_actual_session_id_here
    TRADINGVIEW_SESSION_ID_SIGN=your_actual_session_id_sign_here
    

    Example (with fake values):

    TRADINGVIEW_SESSION_ID=47zlhkbl2weohrhmjgufeg1o24droaod
    TRADINGVIEW_SESSION_ID_SIGN=v3:6S2OD9ta349/yqN0RdCeK3UKxTl/tJr4AOoPRUa0Crk=
    
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "tradingview": { "command": "python", "args": ["C:\\path\\to\\tradingview-mcp\\src\\tradingview_mcp\\server.py"], "cwd": "C:\\path\\to\\tradingview-mcp" } } }