pineforge-4pass avatar

PineForge — offline PineScript v6 backtest MCP

pineforge-4pass/pineforge-codegen-mcp

Bridges PineScript v6 strategies to deterministic C++ backtests running locally in a single container. Exposes tools to transpile Pine source, run single backtests or parameter grid sweeps, and fetch Binance OHLCV data for validation. The engine runs in-process with no external API keys and claims strict TradingView parity across 245 of 246 reference strategies. Useful when you need reproducible backtest results that match TradingView's execution model instead of approximating it in Python. All compute happens offline once the container starts. Also provides coverage lookups to check which Pine v6 features the transpiler supports before you write a strategy that won't compile.

GitHub stars
8
tools
11
transport
STDIO
last updated
Jul 10, 2026

Tools

11 tools

Public tool metadata for what this MCP can expose to an agent.

transpile_pinePine v6 → C++ translation unit (transpile-only)

Pine v6 → C++ translation unit (transpile-only)

No parameter schema in public metadata yet.

list_engine_paramsCatalog of every `overrides` + `runtime` knob accepted by the backtests

Catalog of every `overrides` + `runtime` knob accepted by the backtests

No parameter schema in public metadata yet.

backtest_pineSingle backtest of a Pine source against an OHLCV CSV

Single backtest of a Pine source against an OHLCV CSV

No parameter schema in public metadata yet.

backtest_pine_gridCartesian sweep of `inputs` × `overrides`: one transpile, then a compile and a backtest per combination

Cartesian sweep of `inputs` × `overrides`: one transpile, then a compile and a backtest per combination

No parameter schema in public metadata yet.

check_tradingview_parityGrade your TradingView Strategy Tester export against PineForge's run of the same script, trade by trade

Grade your TradingView Strategy Tester export against PineForge's run of the same script, trade by trade

No parameter schema in public metadata yet.

fetch_binance_ohlcvWrite a backtest-ready CSV from Binance spot or USDT-perp klines

Write a backtest-ready CSV from Binance spot or USDT-perp klines

No parameter schema in public metadata yet.

binance_symbolsList / filter Binance symbols (5-min in-process cache)

List / filter Binance symbols (5-min in-process cache)

No parameter schema in public metadata yet.

list_coverage_topicsEvery Pine v6 coverage topic with a one-line status + summary

Every Pine v6 coverage topic with a one-line status + summary

No parameter schema in public metadata yet.

check_pine_featureLook up whether a Pine identifier/namespace is supported in PineForge

Look up whether a Pine identifier/namespace is supported in PineForge

No parameter schema in public metadata yet.

get_coverage_topicFull detail + supported/partial/via_transpiler/unsupported lists for one topic

Full detail + supported/partial/via_transpiler/unsupported lists for one topic

No parameter schema in public metadata yet.

engine_infoDocker image only: mode, baked-in flag and the bundled `pineforge-release` version (for example `1.0.0`)

Docker image only: mode, baked-in flag and the bundled `pineforge-release` version (for example `1.0.0`)

No parameter schema in public metadata yet.

Sponsors

Readme

@pineforge/backtest-mcp

Self-contained stdio MCP server: an AI agent writes PineScript v6, and the bundled pineforge-release image transpiles it to C++ and backtests it against an OHLCV CSV (your own, or one fetched from Binance's public API) — all in one container, in-process. Fully local — the image bundles the pineforge-codegen transpiler, so Pine → C++ → backtest run with no host Docker daemon. No API key. Your strategy source and CSVs never leave the machine; only the Binance tools, and check_tradingview_parity when you pass no bars, make outbound requests (public endpoints).

pineforge-backtest-mcp MCP server

demo

Tools


View the full README on GitHub

Details

Repository
github.com/pineforge-4pass/pineforge-codegen-mcp
Package
ghcr.io/pineforge-4pass/pineforge-codegen-mcp:v0.9.18
Transport
STDIO
Registry
MCP registry, active