Alpha Forge MCP logo

Alpha Forge MCP

by alforge-labs

Runs AlphaForge strategy backtests, optimization, walk-forward tests, Monte Carlo analysis, and Pine Script generation over MCP.

Install Alpha Forge MCP

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "alforge-labs-alpha-forge-mcp": {
      "command": "uvx",
      "args": [
        "alpha-forge-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

alforge-labs/alpha-forge-mcp MCP server exposes the AlphaForge quant CLI to AI agents over stdio. It shells out to the commercial alpha-forge binary, parses JSON results, and provides tools for strategy management, historical data, backtesting, Optuna optimization, walk-forward testing, and Pine Script generation. Use it when an agent needs to operate an AlphaForge workflow locally, provided the CLI and a valid license are available.

Use cases

  • Backtest a registered strategy against cached market data
  • Optimize strategy parameters with Optuna TPE
  • Validate parameters with walk-forward testing
  • Run Monte Carlo analysis on a saved result
  • Generate Pine Script v6 from an optimized strategy

Key features

  • AlphaForge CLI access over MCP stdio
  • Strategy and result management
  • Backtesting and historical OHLCV caching
  • Optuna optimization and walk-forward testing
  • Monte Carlo simulation
  • Pine Script v6 generation

Tools17

What Alpha Forge MCP lets your agent do. Expand a tool for its parameters.

Self-reported~244 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

23/23 checks healthy over the last 95d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 10d ago via OSV.dev · alpha-forge-mcp (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
Last commit3mo agoMost recent push to the default branch.
Tools exposed17Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Alpha Forge MCP works

What alforge-labs/alpha-forge-mcp MCP server does

The alforge-labs/alpha-forge-mcp MCP server connects MCP-capable AI clients to the AlphaForge alpha-forge command-line application. It is an open-source wrapper rather than an independent trading or research engine: the underlying binary performs the quant operations, while the MCP layer launches commands, parses JSON output, and returns structured results.

The server supports a strategy workflow from data preparation through validation and export. Agents can register and inspect JSON strategies, fetch cached historical OHLCV data, run backtests, optimize parameters with Optuna, perform out-of-sample walk-forward optimization, apply saved optimization results, run Monte Carlo simulations, and generate Pine Script v6 source for TradingView.

How it works

Communication uses MCP over stdio. Most operations map directly to an alpha-forge command with JSON output. Read operations retrieve strategies, results, journals, exploration status, system information, or indicator metadata. Write and execution operations invoke the corresponding CLI action and return an object containing success status, data, and an error field.

A typical sequence starts with forge_status to check prerequisites, followed by fetch_data for the requested symbol. The agent can then call run_backtest, run_optimize, and run_walk_forward, apply a saved optimization result, and pass the resulting strategy to generate_pinescript. Backtest and result responses summarize large arrays by default; callers can request full result data where supported.

Long-running operations execute outside the event loop and advertise progress notifications to clients that support them. Backtests have a timeout of up to 300 seconds, while optimization and walk-forward jobs can run for up to 600 seconds. Timeout responses use a retryable error category.

Setup and configuration

Install and launch the MCP package with uvx alpha-forge-mcp, then configure it as a stdio MCP server in the chosen client. The alpha-forge executable must also be installed and accessible, and its valid license is required for actual operations. The wrapper itself does not contain AlphaForge's core functionality.

Run forge_status before other actions to determine whether the binary is present and inspect reported prerequisites. If authentication is required, the returned error information directs the operator toward the AlphaForge authentication command.

Tools and capabilities

The alforge-labs/alpha-forge-mcp MCP server exposes tools for:

  • Listing and retrieving strategies, saved results, journals, and technical-indicator metadata.
  • Saving a strategy from an inline JSON body rather than a file path.
  • Fetching and caching historical OHLCV data.
  • Running backtests, Optuna TPE parameter optimization, walk-forward optimization, and Monte Carlo simulations.
  • Applying a saved optimization file to create an optimized strategy.
  • Generating Pine Script v6, optionally with webhook output.
  • Checking AlphaForge capabilities and tracking explored versus untried strategy coverage.

Optimization metrics are constrained to supported objectives such as Sharpe ratio, Sortino ratio, Calmar ratio, total return, CAGR, profit factor, win rate, expectancy, and Omega ratio. Optimization saves its result by default, allowing the returned path to be supplied to apply_optimization.

Limitations and notes

The alforge-labs/alpha-forge-mcp MCP server does not calculate indicators over price data; get_indicator returns metadata only.

fetch_data accepts a period but does not expose start and end dates because the underlying CLI lacks those options. save_strategy expects a JSON definition body, while apply_optimization expects a result-file path. The commercial, closed-source AlphaForge binary and a valid license remain mandatory. Errors are returned inside the normal tool result, including categories such as missing binary, authentication required, premium feature restriction, missing strategy, timeout, malformed output, and execution failure.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Alpha Forge MCP

alforge-labs/alpha-forge-mcp is an MCP server that connects AI clients to the AlphaForge alpha-forge CLI over stdio. Its main tools manage strategies and results, fetch OHLCV data, run backtests, optimize with Optuna, perform walk-forward and Monte Carlo analysis, and generate Pine Script v6. The CLI and valid license are required.

Install it with `uvx alpha-forge-mcp` and configure it as a stdio MCP server in your client. You must also install the commercial `alpha-forge` binary, make it accessible, and provide a valid AlphaForge license before execution tools can run.

Yes, it works with Cursor through MCP over stdio. The README also names Claude Code and Codex, and describes the server as usable from any MCP-capable client. Client configuration must launch the package and provide access to the AlphaForge CLI.

Fetch historical data first with `fetch_data`, then call `run_backtest` with the symbol and registered strategy ID. The tool can accept start and end dates, and it summarizes heavy arrays by default; use the supported full-result option when detailed arrays are needed.

Yes, it generates Pine Script v6 with `generate_pinescript`. The strategy must already be registered, and an optimized strategy created by `apply_optimization` can be passed using its returned optimized strategy ID. Webhook output can also be requested.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAlpha Forge MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/alforge-labs-alpha-forge-mcp?style=directory)](https://allmcps.com/mcp/alforge-labs-alpha-forge-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/alforge-labs-alpha-forge-mcp"><img src="https://allmcps.com/api/badge/alforge-labs-alpha-forge-mcp?style=directory" alt="Alpha Forge MCP on AllMCPs" /></a>