Skip to content

Pine backtests from Claude or any MCP client

Hosted, no install

claude mcp add --transport http pineforge https://mcp.pineforge.dev/mcp

Hosted: 100 weekly calls/IP shared by backtest_pine and check_tradingview_parity. Local: unmetered.

Local Docker, on your own data

docker run --rm -i -v "$PWD:/work" ghcr.io/pineforge-4pass/pineforge-backtest-mcp:latest

How this is measured

No Docker, no install. Free: 100 shared backtest_pine and check_tradingview_parity calls a week per IP; the remaining tools consume no quota. The last 365 days of crypto OHLCV from Binance, Bybit, OKX and Coinbase. A monthly compute budget shared by all free users can pause backtests and parity checks until the next UTC month. The API-key tier (full history, higher limits) is waitlist-only.

Hosted: your Pine source is sent to mcp.pineforge.dev for backtesting; OHLCV is served from our dataset. No local files are needed. 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.

The hosted endpoint is mcp.pineforge.dev/mcp: MCP clients connect to it over Streamable HTTP, and a browser that opens it gets the server’s setup page. For agents there are the MCP server card, llms.txt and facts.json, which holds the site’s headline figures as data, each group with its date and source.

Client setup

Requires Docker. Mount a working directory at /work and refer to your CSVs by their /work/... path. No API key: the engine and the transpiler are bundled in the image.

Local: transpile and backtest run inside the container, so your Pine source and OHLCV stay on your machine, with no API key. The only network calls go to Binance’s public API: the downloads you ask for (fetch_binance_ohlcv, binance_symbols), a market’s tick size when you name its symbol, and the bars check_tradingview_parity fetches when you pass none.

Claude Code CLI

Hosted, no install

claude mcp add --transport http pineforge https://mcp.pineforge.dev/mcp

Local Docker, on your own data

claude mcp add pineforge-local \
  -- docker run --rm -i -v "$PWD:/work" \
  ghcr.io/pineforge-4pass/pineforge-backtest-mcp:latest

JSON configs: Cursor, Claude Desktop and others

For clients that read an mcpServers JSON. Cursor reads it from .cursor/mcp.json in your project, or from ~/.cursor/mcp.json for every project. Claude Desktop reads only local servers from claude_desktop_config.json (Settings, Developer, Edit Config); add the hosted server as a custom connector instead (Customize, Connectors, Add custom connector). In the local snippet, replace /absolute/path/to/your/data with the folder that holds your CSVs.

Hosted, no install

{
  "mcpServers": {
    "pineforge": {
      "url": "https://mcp.pineforge.dev/mcp"
    }
  }
}

Local Docker, on your own data

{
  "mcpServers": {
    "pineforge-local": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-v", "/absolute/path/to/your/data:/work",
        "ghcr.io/pineforge-4pass/pineforge-backtest-mcp:latest"
      ]
    }
  }
}

Environment variables

PINEFORGE_ALLOW_ANYWHEREdefault 1
Allow OHLCV paths outside the working dir. The container image sets this to 1.
PINEFORGE_DOCKER_TIMEOUT_MSdefault 120000
Hard kill (ms) for an engine run. Defaults to 2 minutes.

12 tools hosted, 11 local

On both servers

backtest_pine
Transpile, compile and run on the hosted data or your CSV. Returns the report; for large reports the local server returns the summary inline.
check_tradingview_parity
Grade TradingView’s exported trades against PineForge’s run of the same script.
binance_symbols
List the symbols you can backtest: the hosted data’s venues, or Binance for the local server.
list_engine_params
List every strategy override and runtime setting a backtest accepts. No I/O.
engine_info
Report the engine: mode, baked-in flag, version.
list_coverage_topics
List every Pine v6 coverage topic with a one-line status.
get_coverage_topic
Show the supported and unsupported features of one coverage topic.
check_pine_feature
Check whether a specific Pine identifier is supported.

Hosted only

fetch_ohlcv
Return backtest-ready OHLCV from the hosted data: 7 crypto venues, the last 365 days.
check_quota
See the remaining shared weekly quota for backtests and parity checks.
join_waitlist
Join the waitlist to hear when the API-key tier launches: full OHLCV history and higher limits.
latest_news
Recent PineForge product news, newest first.

Local only

backtest_pine_grid
Transpile once, then compile and run every combination of the inputs and strategy() overrides you list, and rank the results.
transpile_pine
Transpile Pine v6 to a C++ translation unit without running it.
fetch_binance_ohlcv
Download Binance spot or USDT-perp candles into a backtest-ready CSV in your working directory, up to 100,000 bars per fetch.

WebMCP: tools for the agent in your browser

In a browser with WebMCP, your agent can use these tools from pineforge.dev. They answer in English and link to this site.

get_evidence
Parity, scoreboard, bake-off or speed figures, with their dates, releases and sources.
search_gallery
Find open-corpus strategies by name, category or parity tier.
get_gallery_strategy
One strategy’s tier, how its trades match, and its corpus files.
search_site
Search the FAQ, the blog and the methodology, compare and AI pages.
get_setup
The hosted and local MCP setup for your AI client.
open_page
Take your tab to a page of this site.
read_chart
The chart on this page as numbers: its tables and source.
join_waitlist
Subscribe your email address to email from PineForge.

The hosted server’s tools come along under their own names; the server runs them.