Walk-through of the PineForge MCP servers: connect the free hosted endpoint with one command or run the local Docker server on your own data, ask your assistant to backtest a Pine strategy, and read the report it gets back.
Current releases: engine v1.4.0, released 2026-10-08, and the local server,
@pineforge/backtest-mcpv0.9.39.
Updated on 2026-09-30 for the current servers: the hosted endpoint at mcp.pineforge.dev and the local Docker server
ghcr.io/pineforge-4pass/pineforge-backtest-mcp(v0.9.32).
PineForge exposes its backtest engine as a Model Context Protocol server, so you can drive a backtest from any MCP-aware client: Claude Code, Claude Desktop, Cursor and others. There are two servers. The hosted one needs nothing installed. The local one runs in Docker on your machine, on your own data.
What the servers do
The hosted server at https://mcp.pineforge.dev/mcp exposes the tools listed on
the AI page. The ones you will use most:
| Tool | What it does | Cost |
|---|---|---|
backtest_pine | Transpile, compile and backtest a Pine v6 strategy on hosted OHLCV | Shared weekly quota with parity checks, free |
check_tradingview_parity | Grade exported TradingView trades against PineForge's run of the same script | Shared weekly quota with backtests, free |
fetch_ohlcv | Backtest-ready OHLCV from 7 crypto venues, the last 365 days | not metered |
check_pine_feature | Whether a Pine identifier is supported | not metered |
check_quota | How many shared backtest and parity calls you have left this week | not metered |
The local server has 11 tools, including backtest_pine on your own CSV,
backtest_pine_grid for parameter sweeps, check_tradingview_parity to grade a
TradingView export, transpile_pine and fetch_binance_ohlcv. It is unmetered.
The privacy surface is worth a pause. With the hosted server, your Pine source goes to
mcp.pineforge.dev and the OHLCV comes from PineForge's dataset. To count how many
different callers use the hosted server, it records the IP address of every tool call
(for IPv6, the /64 block) with the week and the number of calls. These records are
deleted after 8 weeks; only weekly totals without addresses are kept. Until this
change, only the calls that count toward the weekly quota were recorded by address.
With the local server, transpiling and backtesting run inside the container: your Pine
source and your CSV stay on your machine. The only network calls go to Binance's public
API: the downloads you ask for, a market's tick size when you name its symbol, and the
bars check_tradingview_parity fetches when you pass none.
Connect the hosted server (one command)
claude mcp add --transport http pineforge https://mcp.pineforge.dev/mcp
No install, no key. Other clients take the URL https://mcp.pineforge.dev/mcp as a
Streamable HTTP server. In Claude Desktop, add it as a custom connector (Customize,
Connectors, Add custom connector).
Or run the local server
You need Docker. Register the server with Claude Code:
claude mcp add pineforge-backtest \
-- docker run --rm -i -v "$PWD:/work" ghcr.io/pineforge-4pass/pineforge-backtest-mcp:latest
If you pulled the image before, docker pull ghcr.io/pineforge-4pass/pineforge-backtest-mcp:latest
updates it: Docker does not fetch a newer latest on its own.
The directory you start from is mounted at /work. Refer to your files by their
/work/... path (for example /work/eth_15m.csv): a relative path resolves inside the
container, not in your directory.
Claude Desktop and Cursor
For clients that read an mcpServers JSON, add the local server. In Cursor that is
.cursor/mcp.json in your project (or ~/.cursor/mcp.json for every project); in
Claude Desktop it is claude_desktop_config.json (Settings, Developer, Edit Config).
Replace /absolute/path/to/your/data with the folder that holds your CSVs:
{
"mcpServers": {
"pineforge-backtest": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-v", "/absolute/path/to/your/data:/work",
"ghcr.io/pineforge-4pass/pineforge-backtest-mcp:latest"
]
}
}
}
Keep -i and never add -t: a TTY corrupts the stdio JSON-RPC stream.
Drive it with prose
Once a server is connected, the interaction model is plain English. With the local server, a realistic exchange (compressed; the numbers are from a run on 2026-09-30):
You: Fetch the last 7 days of 15-minute ETHUSDT into
/work/eth_15m.csv, then backteststrategy.pineon it and give me the win rate and the drawdown.
Claude: Running
fetch_binance_ohlcv, thenbacktest_pine…[
fetch_binance_ohlcvwrites 672 bars;backtest_pinereturns in about two seconds]49 trades over the window. Net P&L −144.63, win rate 38.8 %, max drawdown 199.66. Profit factor 0.61. Want me to sweep the moving-average lengths with
backtest_pine_grid?
The model has the tool descriptions, knows what backtest_pine returns, and can chain
the next call. The loop of "edit Pine, switch to TradingView, reload the chart, read
the numbers, switch back" collapses into one conversation.
What the report looks like
backtest_pine returns the same JSON report the pineforge-release Docker image
writes. The summary block from the run above:
{
"engine": "pineforge",
"summary": {
"total_trades": 49,
"wins": 19,
"losses": 30,
"win_rate_pct": 38.7755,
"net_pnl": -144.63,
"avg_trade": -2.9516,
"best_trade": 45.39,
"worst_trade": -47.13,
"max_drawdown": -199.66,
"bars_processed": 672
},
"trades": [
/* 49 entries: side, entry and exit time and price, qty, pnl, bar indices */
],
"metrics": { /* profit factor, Sharpe, Sortino, CAGR and more */ },
"equity_curve": [ /* one point per bar */ ],
"fingerprint": { /* engine, transpiler, inputs and data behind the run */ }
}
The model gets the full structure, so it can answer "what was the worst trade?" from
trades without a second call. For very large reports, the local server returns the
summary inline instead of the whole report.
Quota awareness
The hosted backtest_pine and check_tradingview_parity share one weekly quota per
IP, listed on the AI page. The week resets on Monday at 00:00 UTC; the
remaining tools consume no quota. A monthly compute budget shared by all free
users can pause backtests and parity checks until the next UTC month. check_quota lets
the model check before a long loop. The local server has no quota, which makes it the better fit for
sweeps.
A useful pattern: in your project's CLAUDE.md (or equivalent), add a hint like
Before running more than 5 hosted backtests, call check_quota and report the remaining budget.
What's deliberately not in the servers
- No order placement. The servers backtest; they never connect to a broker.
- No data you didn't ask for. The hosted server backtests on its own crypto data; the local server uses your CSV or a Binance download you request.
- No state between calls. Every
backtest_pinecall stands on its own.
These are deliberate scope limits. They keep the surface auditable and the failure modes simple.
Where this becomes interesting
A few patterns that are awkward to do by hand:
- "Tighten the stop and re-run." The model edits one number in the Pine source,
calls
backtest_pineagain and compares the results. - "Try this on the last 30 days instead of the last 7." The model fetches a different window and re-runs.
- "What's the parameter sensitivity here?" With the local server,
backtest_pine_gridtranspiles the source once, runs every combination of the inputs you list and ranks the results. - "Compare against this other strategy I have." Two
backtest_pinecalls, side-by-side report.
None of these needs new infrastructure. They come from the model, the tools and your prose.
Try it
- Full setup page (hosted and local, Claude Code, Claude Desktop, Cursor)
- The local server on GitHub (MIT)
- How we measure parity