Claude, Cursor, या किसी भी MCP client से Pine strategies backtest करें।
@pineforge/codegen-mcp एक local stdio MCP server है जो आपके AI agent को Pine to C++ transpile करने और आपके data पर Docker backtests चलाने देता है। एक npm package, zero glue code।
npx -y @pineforge/codegen-mcp
Node ≥ 20 · Docker daemon · एक PineForge API key (pf_…) चाहिए
OHLCV files कभी आपकी machine से बाहर नहीं जातीं। केवल Pine source codegen API तक travel करता है। Backtests आपके local daemon पर Docker में चलते हैं।
किसी भी MCP-aware client के साथ काम करता है।
अपनी claude_desktop_config.json (Settings → Developer → Edit Config) में add करें। pf_... को अपनी key से replace करें।
{
"mcpServers": {
"pineforge-codegen": {
"command": "npx",
"args": ["-y", "@pineforge/codegen-mcp"],
"env": {
"PINEFORGE_API_KEY": "pf_..."
}
}
}
}Server को claude CLI के साथ one-shot register कीजिए:
claude mcp add pineforge-codegen \ --transport stdio \ --env PINEFORGE_API_KEY=pf_... \ -- npx -y @pineforge/codegen-mcp
Settings → MCP → New MCP Server → ऊपर वाला Claude Desktop JSON config paste करें।
सात tools, तीन surfaces।
| name | runs on | quota | क्या करता है |
|---|---|---|---|
| transpile_pine | remote API | counts | Pine v6 source → C++ translation unit, runtime के लिए ready |
| backtest_pine | local Docker | counts 1 | End-to-end: transpile + compile + आपके CSV पर run। पूरी report return करता है। |
| backtest_pine_grid | local Docker | counts 1 | Inputs/overrides पर Cartesian sweep — एक transpile, कई docker runs। Ranked summaries return करता है। |
| get_quota | remote API | free | अपनी API key tier और बचा हुआ transpile budget check करें |
| fetch_binance_ohlcv | Binance public API | free | Binance public API से spot या USDT-perp OHLCV को backtest-ready CSV में pull करें। Free। |
| binance_symbols | Binance public API | free | Binance symbols discover/validate करें (cached)। Quote, status, contract type से filter। |
| pull_engine_image | local Docker | free | GHCR से latest pineforge-engine Docker image fetch करें |
| variable | default | purpose |
|---|---|---|
| PINEFORGE_API_KEY | (required) | Codegen API के लिए Bearer token। नीचे waitlist से लीजिए। |
| PINEFORGE_GATEWAY | production URL | API host override करें। Default production codegen-gateway पर। |
| PINEFORGE_ALLOW_ANYWHERE | 0 | MCP cwd से बाहर के OHLCV paths allow करने के लिए 1 set करें। |
| PINEFORGE_DOCKER_TIMEOUT_MS | 120000 | docker pull / docker run के लिए hard kill (ms)। Default 2 minutes। |
Free key लीजिए + prompt शुरू करें।
Home page की waitlist पर email डालिए। हम seconds में codegen API key email कर देते हैं। उसे ऊपर वाले MCP config में plug कीजिए और AI assistant से backtesting शुरू कर दीजिए।
Strategy हाथ से बनाना है? Open runtime से शुरुआत करें →