Skip to main content
MCP server CX Codex

PineForge PineScript v6 — Claude Code MCP server: setup guide

Transpiles PineScript v6 into C++ to execute local strategy backtests against OHLCV market data. Keeps your trading code private and works offline without third-party API tokens.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add pineforge-offline-pinescript-v6-backtest-mcp -- docker run -i --rm ghcr.io/pineforge-4pass/pineforge-backtest-mcp:v0.9.40
Open on GitHub

What PineForge — offline PineScript v6 backtest MCP does

The server operates over stdio inside a self-contained container. It bundles the pineforge-codegen utility to translate PineScript v6 source code into C++ binaries on the fly. Calculations execute locally. Proprietary strategy code and market records never leave your drive.

Tooling covers single runs via backtest_pine, multi-parameter sweeps using backtest_pine_grid, and Binance market data collection. The check_tradingview_parity tool evaluates trade records against TradingView exports to confirm identical execution behavior.

File paths in tool arguments require absolute /work/... paths. The container working directory is /app, meaning relative paths write to temporary container storage that vanishes upon exit. Always keep the -i flag and omit -t because allocating a TTY breaks the JSON-RPC stream.

What it helps with

  • Run deterministic PineScript v6 backtests locally without TradingView
  • Compare local algorithmic trades against TradingView Strategy Tester exports
  • Execute Cartesian sweeps across strategy inputs with backtest_pine_grid
  • Download spot or perpetual OHLCV candlestick data from Binance

Example prompts for the agent

  • Backtest the PineScript logic in strategy.pine using the bar data in /work/btc_1h.csv.
  • Fetch 1h klines for BTCUSDT from Binance and save them directly to /work/binance_btc.csv.
  • Compare our strategy execution against /work/tv_report.csv with check_tradingview_parity.

How to install PineForge — offline PineScript v6 backtest MCP

Platform CLI

claude mcp add pineforge-offline-pinescript-v6-backtest-mcp -- docker run -i --rm ghcr.io/pineforge-4pass/pineforge-backtest-mcp:v0.9.40

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about PineForge — offline PineScript v6 backtest MCP

How to install PineForge — offline PineScript v6 backtest MCP in Claude Code?

Run claude mcp add pineforge-offline-pinescript-v6-backtest-mcp -- docker run -i --rm ghcr.io/pineforge-4pass/pineforge-backtest-mcp:v0.9.40. Docker must be running on your system.

What does PineForge do?

It compiles PineScript v6 trading algorithms into C++ units and calculates backtest results against OHLCV CSV files locally. No external accounts or API keys are needed.

Why must input CSV paths use /work/... prefixes?

The container executes from /app, while user files mount to /work. Using relative paths places output inside container storage that gets erased when the container exits.

Similar MCP servers

All MCP servers for Finance and business →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor