About Pine Script Strategy Audit
Pine Script Strategy Audit is an MCP server that statically checks Pine Script v6 strategies for patterns that can make live behavior differ from backtests. It returns the affected line and an explanation, helping strategy authors review code before deployment.
Key features
- 01Detection of order fill-timing traps
- 02Checks for ATR smoothing mismatches
- 03Detection of lookahead bias
- 04Checks for VWAP anchor drift
- 05Detection of exit behavior drift
- 06Pine v6 syntax checks
Use cases
- 01Reviewing a strategy before live trading
- 02Tracing a backtest/live behavior discrepancy
MCP support
It exposes the `audit_pine_strategy` tool to MCP clients. The tool accepts a Pine Script v6 strategy and reports detected issues with line references and explanations.
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://pinescript-audit-mcp.mcpize.run/mcpclaude mcp add --transport http tylerscomic-lab-pinescript-audit https://pinescript-audit-mcp.mcpize.run/mcp{"mcpServers":{"tylerscomic-lab-pinescript-audit":{"type":"http","url":"https://pinescript-audit-mcp.mcpize.run/mcp"}}}Open in Cursor{"servers":{"tylerscomic-lab-pinescript-audit":{"type":"http","url":"https://pinescript-audit-mcp.mcpize.run/mcp"}}}Open in VS Code{"mcpServers":{"tylerscomic-lab-pinescript-audit":{"type":"http","url":"https://pinescript-audit-mcp.mcpize.run/mcp"}}}{"mcpServers":{"tylerscomic-lab-pinescript-audit":{"serverUrl":"https://pinescript-audit-mcp.mcpize.run/mcp"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
Tools
Details
From the project READMEpinescript-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.
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 evaluation - VWAP-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 assumptions - Pine 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.js
Part 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
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.