pinescript-audit-mcp
Audits Pine Script v6 strategies via static analysis, detecting traps that compile but cause backtest-vs-live divergence such as fill-timing issues, ATR-smoothing mismatches, lookahead bias, VWAP-anchoring drift, exit-drift, and v6 syntax footguns.
Click on "Deploy 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-audit-mcpaudit this Pine Script v6 strategy for lookahead bias and fill-timing traps"
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-audit-mcp
An MCP server that statically audits Pine Script v6 strategies for the specific traps that compile clean, backtest beautifully, and then diverge from live behavior.
The problem this solves
Pine Script strategies can compile with zero errors and still behave differently live than in the backtester — fill-timing assumptions, ATR-smoothing mismatches, lookahead bias, VWAP-anchoring drift, and exit-drift are all silent, syntactically valid patterns that the compiler has no reason to flag. This catches them before they cost real money finding out live.
Related MCP server: PineForge-Codegen
What it catches
Fill-timing traps — orders that backtest as filling at a price/bar the live broker can't actually match
ATR-smoothing mismatches — RMA vs. SMA vs. EMA smoothing assumptions that quietly change signal timing
Lookahead bias —
request.security()and similar calls that leak future bar data into historical evaluationVWAP-anchoring drift — anchor-period assumptions that behave differently on session boundaries live vs. in backtest
Exit-drift — exit logic that behaves differently depending on
calc_on_every_tickand bar-close assumptionsPine v6 syntax traps — v6-specific footguns that compile but change behavior from v5 equivalents
Tools
audit_pine_strategy
Runs the full static-analysis pass against a submitted Pine Script v6 strategy and returns every trap found, with the specific line and a plain-English explanation of the backtest-vs-live divergence it causes.
Use it
Hosted (recommended): MCPize — free tier, paid Pro tier for higher limits.
Self-host:
npm install
node server.jsPart of the AlgoForge suite
Prop-firm and quant-validation tools for algo traders: prop-rules-mcp, trade-journal-mcp, payout-calc-mcp, econ-calendar-mcp, montecarlo-validator-mcp, overfitting-audit-mcp, walkforward-validator-mcp, backtest-cost-sensitivity-mcp, pinescript-mcp.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
AI-powered Pine Script v6 strategy generator built for prop-firm futures traders.
1Evidence-gated quant research for TradingView Pine Script strategies, run from your AI client.
Deterministic pre-execution audit for trading agents. PASS/WAIT/FAIL, reproducible verdict_hash.
Lints + auto-fixes how AI coding agents discover any new product. 24 rules, 6 tools, score 0-100.
Related MCP Servers
- AlicenseAqualityCmaintenanceProvides 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.109MIT
- AlicenseAqualityAmaintenanceBacktest PineScript v6 strategies locally from your AI agent: transpiles Pine to C++ and runs it on the deterministic, TradingView-validated PineForge engine via Docker. Tools for single backtests, parameter-grid sweeps, and Binance OHLCV fetch — no API key, data never leaves your machine.1156 npm7MIT
- AlicenseAqualityCmaintenanceStatic-analyzes Python code for lookahead bias and data leakage, preventing invalid backtests in time-series ML.535 PyPIMIT
- FlicenseNot gradedqualityAmaintenanceProvides Pine Script v6 validation and reference lookup for coding agents, enabling them to write correct TradingView indicators with real-time diagnostics and function signatures.2-