
TradingView MCP 服务器:搜索指标和策略,获取 Pine Script 源代码。支持 Claude Code、Claude Desktop 和光标。无需 API 密钥。
概览
一个MCP(模型上下文协议)服务器,将整个公开的TradingView脚本库转化为你的AI编码代理可以查询的工具。请求“趋势跟踪策略”或“LuxAlgo的全部内容”,获得带有Pine Script源的真实指标,随时可阅读、调整或回测。 无需TradingView账户、API密钥、Cookie或登录。所有终端都是公开的。 TradingView 托管了数十万个社区发布的 Pine Script 指标和策略。大多数都是开源的。这个 MCP 服务器为 AI 代理提供了结构化访问所有这些内容: - ——“趋势跟踪”、“黄牛”、“订单区块”、“均值回归”—— TradingView 精心策划的最佳脚本 - —— 你关注的创作者的所有公开脚本 - —— 任何开源脚本的完整代码 —— —— 批量收集脚本,形成一个 SQLite 语料库,你可以离线搜索,包括在 Pine 代码内部搜索 最后一点才是有用的。
概述(AI 翻译)
从 Claude、Cursor 或任何 MCP 客户端搜索 TradingView 的公开指标和策略库,并获取任何开源脚本的完整 Pine Script 源代码。
一个MCP(模型上下文协议)服务器,可以转动 将整个公开的TradingView脚本库整合成你的AI编码代理的工具 查询。询问“趋势跟踪策略”或“LuxAlgo的一切”,回应现实 指示器及其松树文字来源,准备阅读、调整或回测。
无需TradingView账户、API密钥、Cookie或登录。所有终端都是公开的。
目录
- 这个功能
- 快速入门
- 安装 Claude 代码
- 在 Claude Desktop 中安装
- 在光标中安装
- 工具
- 示例提示
- TradingView 搜索的实际工作原理
- 限速且不被封禁
- 配置
- 常见问题解答
- 发展
这有什么用
TradingView 托管了数十万个社区发布的指标, 策略用松树文字编写。大多数都是开源的。这个MCP服务器提供了一个AI。 代理结构化访问所有内容:
- 按主题搜索 — “趋势跟踪”、“剥头皮”、“订单块”、“均值回归”
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
TradingView Indicator Search MCP Server
Search TradingView’s public indicator and strategy library from Claude, Cursor, or any MCP client, and pull the full Pine Script source of any open-source script.
An MCP (Model Context Protocol) server that turns the entire public TradingView script library into a tool your AI coding agent can query. Ask for “trend following strategies” or “everything by LuxAlgo”, get back real indicators with their Pine Script source, ready to read, adapt or backtest.
No TradingView account, API key, cookie or login required. Every endpoint used is public.
Contents
- What this does
- Quick start
- Install in Claude Code
- Install in Claude Desktop
- Install in Cursor
- Tools
- Example prompts
- How TradingView search actually works
- Rate limiting and not getting banned
- Configuration
- FAQ
- Development
What this does
TradingView hosts hundreds of thousands of community-published indicators and strategies written in Pine Script. Most are open source. This MCP server gives an AI agent structured access to all of it:
- Search by topic — “trend following”, “scalping”, “order blocks”, “mean reversion”
- Browse editors’ picks — TradingView’s hand-curated best scripts
- Search by author — every public script from a creator you follow
- Fetch Pine Script source — the complete code for any open-source script
- Build a local library — bulk-collect scripts into a SQLite corpus you can search offline, including searching inside the Pine code itself
That last point is the useful one. Once scripts are collected locally, you can find
every strategy that uses ta.supertrend or strategy.entry with a single instant
query. The TradingView website cannot do that.
Quick start
git clone https://github.com/daviddme/tradingview-indicator-search-mcp-server.git
cd tradingview-indicator-search-mcp-server
npm install
Requires Node.js 22.5 or newer (it uses the built-in node:sqlite, so there is
no native module to compile and no database to install).
Then add it to your MCP client below.
Install in Claude Code
claude mcp add tradingview -s user -- node "$(pwd)/src/server.js"
-s user makes it available in every project. Verify with:
claude mcp list
Install in Claude Desktop
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"tradingview": {
"command": "/absolute/path/to/node",
"args": ["/absolute/path/to/tradingview-indicator-search-mcp-server/src/server.js"]
}
}
}