tradingview-mcp 是什么?

tradesdontlie/tradingview-mcp 是连接本机 TradingView Desktop 与 MCP 客户端的开源桥接器。它通过用户主动开启的 Chrome DevTools Protocol 调试端口读取和操作图表,提供 Pine Script、图表、提醒、回放和截图工具;它不是交易机器人,也不会代替用户下单。

⭐ 266 Stars 🍴 67 Forks JavaScript — 作者: tradesdontlie
来源:github.com/tradesdontlie/tradingview-mcp 查看 GitHub 仓库 → 📘 使用教程 →

为什么值得关注

MCP 和 tv CLI 覆盖 symbol、timeframe、indicator、Pine 编译与报错、绘图、截图、提醒和回放等操作。服务只连接本机以 9222 端口启动的 TradingView Desktop,不直接连接 TradingView 服务器。

来源:github.com/tradesdontlie/tradingview-mcp;https://github.com/tradesdon…

核心功能

图表与 Pine Script 工具

MCP 和 tv CLI 覆盖 symbol、timeframe、indicator、Pine 编译与报错、绘图、截图、提醒和回放等操作。

来源:github.com/tradesdontlie/tradingview-mcp
本机 CDP 桥接

服务只连接本机以 9222 端口启动的 TradingView Desktop,不直接连接 TradingView 服务器。

来源:github.com/tradesdontlie/tradingview-mcp
MCP 与 JSON CLI

同一批能力既能由 MCP 客户端调用,也能通过 tv 命令输出 JSON,便于本地脚本串接。

来源:github.com/tradesdontlie/tradingview-mcp

技术架构

Node.js 进程使用 chrome-remote-interface 连接 TradingView Desktop 的 Electron 调试端口,再通过 @modelcontextprotocol/sdk 暴露领域工具;CLI 复用相同核心。该连接依赖未公开的 TradingView 内部结构,桌面端更新后可能失效。

来源:github.com/tradesdontlie/tradingview-mcp;https://github.com/tradesdon…

项目知识图谱

知识图谱:项目核心节点(中心)+ 核心功能(内环六边形)+ 关键技术依赖(外环 chip) @modelcontextprotocol/sdk ^1.12.1@modelcontextp… chrome-remote-interface ^0.33.2chrome-remote-… 图表与 Pine Script 工具图表与 Pine Script… 本机 CDP 桥接 MCP 与 JSON CLI tradingview-mcp 项目本体 核心功能 关键依赖

技术栈

语言JavaScript ESM框架Model Context Protocol + Chrome DevTools Protocol
@modelcontextprotocol/sdk ^1.12.1chrome-remote-interface ^0.33.2
Node.js 18+;TradingView Desktop;macOS、Windows 或 Linux;有效的 TradingView 权限
来源:github.com/tradesdontlie/tradingview-mcp;https://github.com/tradesdon…

快速上手

确认 Node.js 18+、TradingView Desktop 和有效账户权限;克隆 tradesdontlie/tradingview-mcp 后运行 npm install。用 --remote-debugging-port=9222 启动桌面端,把 node 与 src/server.js 的绝对路径写入 MCP 配置,最后调用 tv_health_check。调试端口只绑定本机并在用完后关闭。
来源:github.com/tradesdontlie/tradingview-mcp;https://github.com/tradesdon…

使用场景

适合个人在已有 TradingView 权限内辅助写 Pine Script、切换图表、读取指标和做历史回放练习。它不适合自动下单、绕过访问控制、抓取后对外分发数据或提供投资建议。

来源:github.com/tradesdontlie/tradingview-mcp

优势与局限

优势

  • 领域工具覆盖图表、Pine Script、截图和回放
  • 数据处理留在本机
  • MCP 与 CLI 共用能力

局限

  • 依赖 TradingView Desktop 和用户自己的有效权限
  • 使用未公开的 Electron 内部接口,更新可能导致失效
  • 开启调试端口扩大本机攻击面
  • 项目不执行真实交易,输出也不构成投资建议
  • 本轮没有安装或运行代码
来源:github.com/tradesdontlie/tradingview-mcp;https://github.com/tradesdon…

最新版本

截至 2026-09-23,官方 Releases 页面没有发布记录;main 分支 package.json 标记 1.0.0。这里把 1.0.0 视为仓库元数据版本,不把它误写成已发布的 GitHub Release。

来源:github.com/tradesdontlie/tradingview-mcp/releases;https://github.com/…

实测与证据

status: official_docs_checked_not_run  |  checked_at: 2026-09-23  |  environment: 核对 tradesdontlie/tradingview-mcp 官方 README、Wiki、package.json 与 Releases 页面  |  limitations: 未克隆仓库、未执行 npm install、未开启 TradingView 调试端口、未连接 MCP,也未读取任何行情  |  observed_output: package.json 标为 1.0.0,README 要求 Node.js 18+、TradingView Desktop 和 9222 CDP 端口;GitHub Releases 页面显示尚无 release

来源:github.com/tradesdontlie/tradingview-mcp;https://github.com/tradesdon…

同类项目对比

Microsoft Playwright MCP 面向通用网页,用 Playwright 和结构化可访问性快照驱动浏览器;tradesdontlie/tradingview-mcp 面向本机 TradingView Desktop,用 CDP 和一组图表/Pine 专用工具操作现有应用。前者适合通用网页自动化,后者的领域能力更集中,但更依赖 TradingView 未公开的桌面内部结构。

来源:github.com/microsoft/playwright-mcp;https://github.com/tradesdontlie/…

总结评价

若你已经使用 TradingView Desktop,并希望让 MCP 客户端辅助图表与 Pine Script 工作,可以在隔离的个人环境试用。先接受两个现实条件:它依赖自己的 TradingView 权限,且未公开接口会随桌面端更新而变化。不要把它用于自动交易、数据转售或规避平台规则。

来源:github.com/tradesdontlie/tradingview-mcp

常见问题

tradingview-mcp 会绕过 TradingView 订阅吗?

不会。官方 README 明确要求用户已有有效权限,并声明不绕过付费墙或访问控制。

tradingview-mcp 能自动执行真实交易吗?

不能。它操作图表、Pine Script、提醒和回放,官方明确将其定义为接口层而非交易机器人。

为什么 TradingView 更新后可能连接失败?

项目依赖未公开的 Electron 内部结构,桌面端更新可能使调用失效。先在测试环境复核,再决定是否升级。

tradingview-mcp 和被隔离的 atilaahmettaner-tradingview-mcp 是同一个项目吗?

不是。本文核对的是 tradesdontlie/tradingview-mcp,两个仓库的所有者、代码和商业模式均不同。

资料与核验范围
本文依据项目公开资料整理。版本、安装命令和功能边界可能随上游更新,请以所列来源和项目当前版本为准。 资料核对时间: 2026-09-23 13:55.

参考材料:README、GitHub API、依赖文件