
这个项目让像Claude这样的AI工具能够实时查找任何Pine Script函数、搜索TradingView文档、查找代码示例和浏览指南——所有这些都能在你聊天的同时实时完成。
概览
这个项目让像Claude这样的AI工具能够实时查找任何Pine Script函数、搜索TradingView文档、查找代码示例和浏览指南——所有这些都能实时进行。不再有幻觉函数或过时的v5语法。 当你请求Claude帮你编写TradingView指标或策略时,它并不总是知道正确的Pine Script v6语法。该服务器直接接入Claude,提供访问——457个函数、427个变量和完整用户指南——以便它能查阅内容,而不是猜测。 它使用一种叫MCP(模型上下文协议)的机制,这是让AI助手访问外部工具和数据的标准方式。你不需要理解MCP也能使用——只需按照下面的安装步骤操作即可。 从 nodejs.org 下载——下载LTS(长期支持)版本。安装程序会带你一步步操作。 要确认是否已有,打开终端并输入: 如果你看到v18.0.0或更高版本,那就没问题。
概述(AI 翻译)
给你的AI助手提供专家级松树文字知识。
这个项目让像Claude这样的AI工具能够实时查找任何Pine Script函数、搜索TradingView文档、查找代码示例和浏览指南——所有这些都能实时进行。不再有幻觉函数或过时的v5语法。
这到底是什么意思?
当你请求Claude帮你编写TradingView指标或策略时,它并不总是知道正确的Pine Script v6语法。该服务器直接连接到Claude,提供其访问完整的Pine Script v6参考——457个函数、427个变量和完整用户指南——以便它能查阅信息,而不是猜测。
它使用一种叫MCP(模型上下文协议)的机制,这是让AI助手访问外部工具和数据的标准方式。你不需要理解MCP也能使用——只需按照下面的安装步骤操作即可。
先修条件
你需要在电脑上安装Node.js版本18或更高。
没有Node.js? 从 nodejs.org 下载——下载LTS(长期支持)版本。安装程序会带你一步步操作。
要确认是否已有,打开终端并输入:
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Pine Script MCP Server
Give your AI assistant expert-level Pine Script knowledge.
This project lets AI tools like Claude look up any Pine Script function, search TradingView documentation, find code examples, and browse guides — all in real time while you chat. No more hallucinated functions or outdated v5 syntax.
What does that actually mean?
When you ask Claude to help you write a TradingView indicator or strategy, it doesn’t always know the correct Pine Script v6 syntax. This server plugs directly into Claude and gives it access to the complete Pine Script v6 reference — 457 functions, 427 variables, and the full user guide — so it can look things up instead of guessing.
It uses something called MCP (Model Context Protocol), which is a standard way to give AI assistants access to external tools and data. You don’t need to understand MCP to use this — just follow the install steps below.
Prerequisites
You need Node.js version 18 or higher installed on your computer.
Don’t have Node.js? Download it from nodejs.org — grab the LTS (Long Term Support) version. The installer will walk you through it.
To check if you already have it, open a terminal and type:
node --version
If you see v18.0.0 or higher, you’re good to go.
Installation
Pick the method that matches how you use Claude:
Option A: Claude Code (one command)
If you use Claude Code in your terminal, just run:
claude mcp add pinescript -- npx -y pinescript-mcp-server
That’s it. Next time you start a Claude Code session, it will have Pine Script tools available.
Option B: Claude Desktop App
- Open the Claude desktop app
- Go to Settings (click Claude in the menu bar > Settings)
- Click the Developer tab
- Click Edit Config
- This opens a JSON file. Add the following (if the file is empty, paste the whole thing; if it already has content, add the
pinescriptentry inside the existingmcpServersobject):
{
"mcpServers": {
"pinescript": {
"command": "npx",
"args": ["-y", "pinescript-mcp-server"]
}
}
}
- Save the file
- Completely quit and restart Claude Desktop (not just close the window — fully quit from the menu bar)
When it restarts, you should see a small tool icon in the chat input area. Click it to confirm the Pine Script tools are listed.
Option C: Any Other MCP-Compatible Tool
If you’re using another tool that supports MCP servers (like Cursor, Windsurf, etc.), point it at:
npx -y pinescript-mcp-server
using the stdio transport. Check your tool’s documentation for how to add MCP servers.
安装
npx -y pinescript-mcp-server配置
{
"mcpServers": {
"pinescript": {
"command": "npx",
"args": ["-y", "pinescript-mcp-server"]
}
}
}