Locally transpiles Pine Script v6 to C++ and runs deterministic backtests against local or Binance OHLCV data.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Pineforge Codegen MCP.
transpile_pinePine v6 β C++ translation unit (transpile-only)
list_engine_paramsCatalog of every `overrides` + `runtime` knob accepted by the backtests
backtest_pineSingle backtest of a Pine source against an OHLCV CSV
backtest_pine_gridCartesian sweep of `inputs` Γ `overrides` reusing one compile
fetch_binance_ohlcvWrite a backtest-ready CSV from Binance spot or USDT-perp klines
binance_symbolsList / filter Binance symbols (5-min in-process cache)
The pineforge-4pass/pineforge-codegen-mcp MCP server gives an AI agent local tools for working with Pine Script v6 strategies. It can translate Pine source into a C++ translation unit, execute a strategy against OHLCV data, and return the engine's backtest results. The backtest workflow is intended for historical evaluation of a supplied strategy and data file; it is not a forecasting or investment-advice tool.
The bundled PineForge engine runs the translation and backtest in-process inside the container. The project describes the engine as deterministic and reports strict TradingView parity for 245 of 246 reference strategies, with the remaining discrepancy attributed to a TradingView-side margin-boundary behavior.
A typical request supplies Pine v6 source and a path to an OHLCV CSV under the mounted /work directory. backtest_pine performs one run. backtest_pine_grid varies Pine input values and engine overrides while reusing one compilation, which is useful for parameter exploration. The returned schema includes a summary and applied settings, along with the engine identifier.
The server can also obtain Binance spot or USDT-perpetual klines and write them as backtest-ready CSV data. binance_symbols lists or filters available Binance symbols and keeps results in an in-process cache for five minutes. Network access is needed for these Binance tools; local backtests can use supplied files instead.
Run the container through stdio with Docker:
The -i option is required for the MCP JSON-RPC stream, while a TTY should not be added. Mounting the working directory lets the server read input CSVs and write fetched data. Docker is the only stated runtime requirement, and the container includes the transpiler and engine, so a host Docker daemon is not needed by the engine itself. No API key is required. Binance fetching additionally requires outbound network access.
The README shows configuration examples for Claude Desktop and Cursor using the Docker command. It also documents a hosted Streamable HTTP endpoint, but that service is separate from the local repository and has metering and fixed-data limitations.
The pineforge-4pass/pineforge-codegen-mcp MCP server exposes these capabilities:
inputs and overrides combinations with one compile.Engine controls include strategy fields such as initial capital, pyramiding, slippage, commission settings, quantity defaults, order processing, and close-entry behavior. Runtime options include input and script timeframes, bar magnification, sample count, and magnifier distribution. A script timeframe finer than the input timeframe is rejected with a structured error.
The implementation targets Pine Script v6 and runs locally in the supplied container. Results depend on the strategy source and historical OHLCV data, including modeling choices such as commissions, slippage, order processing, and bar magnification. A backtest describes past behavior and does not establish future returns.
The local repository is described as unmetered and able to run with user-provided CSVs. Binance tools are the exception to fully offline operation because they call Binance's public API. Pine coverage is not universal, so agents should use the coverage lookup tools before relying on an identifier or namespace.
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/pineforge-4pass-pineforge-codegen-mcp)<a href="https://allmcps.com/mcp/pineforge-4pass-pineforge-codegen-mcp"><img src="https://allmcps.com/api/badge/pineforge-4pass-pineforge-codegen-mcp?style=directory" alt="Pineforge Codegen MCP on AllMCPs" /></a>