tradesdontlie/tradingview-mcp

AI-assisted TradingView chart analysis — connect Claude Code to your TradingView Desktop for personal workflow automation

What it solves

TradingView Desktop is a professional trading interface, but it lacks a direct way for AI assistants to interact with it. This project provides a bridge that allows LLM-based agents (like Claude Code) to read chart data, manage indicators, and develop Pine Script code directly within the locally running TradingView application.

How it works

The tool uses the Chrome DevTools Protocol (CDP), a standard debugging interface built into Chromium/Electron applications. By launching TradingView Desktop with a specific debug port enabled (--remote-debugging-port=9222), the MCP server communicates with the app's internal state. It does not connect to TradingView's servers or bypass paywalls; it simply interacts with the app already running on the user's machine.

Who it’s for

  • AI Researchers: Those studying human-AI collaboration in financial workflows.
  • Pine Script Developers: Users who want AI assistance to write, compile, and debug scripts.
  • Traders: Those who want to use natural language to navigate charts, set alerts, and perform visual analysis.

Highlights

  • Comprehensive Toolset: Includes 78 MCP tools for chart reading, Pine Script development, drawing, and UI automation.
  • Pine Script Integration: Ability to inject, compile, and debug scripts with AI assistance.
  • Chart Control: Change symbols, timeframes, and layouts via natural language.
  • Capped Context: Optimized output to minimize token usage for LLMs.
  • Replay Mode Support: Allows agents to step through historical bars and practice entries/exits.
  • CLI Access: Every MCP tool is available as a tv command-line interface for piping and automation.

Related

  • Project
  • Project
  • Project
  • Project
  • Project