pinescript-plugin
Provides Pine Script validation and reference lookup tools for creating TradingView indicators.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pinescript-pluginValidate this Pine Script and show the correct signature for label.new"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
pinescript-plugin
Pine Script v6 for coding agents — backed by a real validator, not prose.
The problem
Ask any coding agent for a TradingView indicator and you get code that looks right, reads fluently, and does not compile.
// Confident. Fluent. Four compile errors.
l = line.new(x1=1, y1=2, x2=3, y2=4, colour=color.red) // it's `color`, not `colour`
plotshape(cond, shape=shape.triangleup) // it's `style=`, not `shape=`
v = math.clamp(x, 0, 1) // math.clamp doesn't exist in Pine
b = box.new(left=1, top=2, right=3, bottom=4, textalign=text.align_left) // box uses text_halignThree things make Pine unusually hostile to a language model:
Parameter names are not guessable.
label.newtakestextalign.box.newtakestext_halign. Nothing about either name implies the other.Several functions have two valid call forms.
line.new,label.newandbox.neweach accept achart.pointor independent coordinates. A model that has only seen one form will insist the other is wrong.The language keeps moving. TradingView shipped
request.footprint(), multiline strings andcalc_on_every_history_tickin the last eighteen months — and removed the wrapped-line indentation rules in December 2025. Training data goes stale in both directions.
The result is a loop you have probably lived: the agent writes Pine, you paste it into TradingView, it fails, you paste the error back, it guesses again.
Related MCP server: TradingView MCP Server
What this does about it
Gives the agent a checker and a reference, so it stops guessing.
Tool | What it does |
| Runs the real validator and returns structured diagnostics with line numbers |
| Returns the actual signature of any v6 built-in — required and optional parameters, and every overload |
Plus skills covering the execution model, drawing objects, anti-repainting and the platform limits that quietly break scripts at scale.
The agent checks its own work before handing it to you. The loop closes inside the conversation instead of across TradingView's compiler.
Why this one
It shares an engine with a published VS Code extension. The validator here is the same one running in pinescript-vscode-extension — 1,400+ installs, 4.45★. So the agent and your editor cannot disagree about a file.
That engine carries:
457 function signatures scraped from the official v6 reference, plus a hand-maintained layer for everything TradingView shipped since
Explicit overload modelling — a call is valid if it satisfies any form
A golden corpus of scripts verified to compile on TradingView, asserted to produce zero errors on every commit
Every Pine example in every skill is extracted and run through that validator in CI. A skill shipping code that fails its own checker would make the whole thing worthless, so the build blocks it.
Install
Requires the validation engine. Clone it next to this repo:
git clone https://github.com/jpantsjoha/pinescript-vscode-extension
cd pinescript-vscode-extension && npm ci && npm run buildThen add the plugin to your agent. For Claude Code:
/plugin marketplace add jpantsjoha/pinescript-plugin
/plugin install pinescript-pluginIf the engine lives elsewhere, point at it:
export PINESCRIPT_VALIDATOR=/path/to/pinescript-vscode-extensionStatus: early. One skill so far, and the engine is not yet published to a package registry — so the plugin needs that local checkout. Both are being fixed; see CHANGELOG.
What's in it
skills/pinescript-v6/ execution model, overloads, anti-repainting, platform limits
mcp/server.js validate_pine_script + lookup_pine_reference
scripts/ spec conformance, skill contracts, link and example validation
tests/ MCP behaviour testsmake gate runs everything: Agent Plugins 1.0.0 conformance, skill frontmatter
contracts, reference-URL resolution, embedded Pine validation, and the MCP tests.
Related projects
Project | What it is |
The VS Code extension — IntelliSense, hover docs, real-time validation. Source of the engine this plugin uses. | |
Same plugin architecture applied to Google Cloud delivery — solution design, security, SRE, agentic patterns. |
Prior art
TradersPost Pine Script plugin covers similar territory and is worth a look. The distinction claimed here is narrow and checkable: a shared validation engine with a published extension, and a CI gate that runs every documented example through it.
Contributing
Found Pine that this validator gets wrong? That is the most valuable bug report available — a false positive is worse than a missed error, because it puts red marks on correct code. Open an issue with the smallest script that reproduces it.
Author
Jaroslav Pantsjoha
Website: jpantsjoha.com
GitHub: @jpantsjoha
LinkedIn: in/johas
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityFmaintenanceProvides accurate Pine Script v6 coding assistance through search, completion, and reference lookup tools using a comprehensive Japanese manual database. Enables developers to quickly find functions, constants, annotations, and API specifications for TradingView Pine Script development.Last updated1
- Alicense-qualityBmaintenanceEnables trading analysis across Forex, Stocks, and Crypto with 25+ technical indicators, real-time market data, and Pine Script v6 development tools including syntax validation, autocomplete, and version conversion.Last updated50MIT
- AlicenseAqualityAmaintenanceProvides comprehensive Pine Script v6 documentation and tools to help AI assistants look up functions, validate syntax, and generate accurate code. It enables linting, version conversion from v5 to v6, and deep conceptual analysis to prevent code hallucinations.Last updated107MIT
- Alicense-qualityDmaintenanceEnables AI assistants to look up any Pine Script function, search TradingView documentation, and find code examples in real time.Last updated12718MIT
Related MCP Connectors
Real-time market data, screeners, technical analysis & backtesting for stocks, crypto and forex.
Lints + auto-fixes how AI coding agents discover any new product. 24 rules, 6 tools, score 0-100.
Build, validate, and deploy multi-agent AI solutions from any AI environment.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jpantsjoha/pinescript-plugin'
If you have feedback or need assistance with the MCP directory API, please join our Discord server