MCP server (stdio) exposing the AlphaForge `forge` CLI to Claude Code / Cursor / Codex
Project description
alpha-forge-mcp
A Model Context Protocol (MCP) server that exposes the
AlphaForge forge CLI to AI coding agents — Claude Code, Cursor, Codex, and any
MCP-capable client — over stdio.
⚠️ Pre-release / Alpha (
0.1.0aN). Tool signatures and return formats may change without notice. Not recommended for production automation yet. Feedback welcome via Issues.
It is a thin open-source wrapper: it shells out to the (commercial, closed-source) forge
binary with --json and returns the parsed result. The MCP server itself contains no core
logic — forge plus a valid license are required for anything to actually run.
Tools (MVP)
| Tool | What it does | Underlying command |
|---|---|---|
list_strategies |
List registered strategies | forge strategy list --json |
get_strategy |
Full JSON of one strategy | forge strategy show <id> --json |
list_results |
List saved backtest results | forge backtest list [--strategy <id>] --json |
get_result |
Metrics & trades of one result | forge backtest report <result_id> --json |
run_backtest |
Run a backtest | forge backtest run <symbol> --strategy <id> --json |
run_optimize / generate_pinescript are planned for the next release.
Prerequisites
- The
forgebinary must be installed and on yourPATH(or setALPHA_FORGE_BIN). - You must be authenticated: run
forge system auth loginonce. - Python 3.11+ (only needed if not using
uvx).
Install & run
The recommended way is via uvx — no manual install needed;
your IDE launches it on demand.
uvx alpha-forge-mcp # starts the stdio MCP server
Or install explicitly:
pip install alpha-forge-mcp
alpha-forge-mcp
Claude Code — ~/.claude/mcp.json
{
"mcpServers": {
"alpha-forge": { "command": "uvx", "args": ["alpha-forge-mcp"] }
}
}
Cursor / Codex
Use the same command / args in the client's MCP server configuration:
{
"mcpServers": {
"alpha-forge": { "command": "uvx", "args": ["alpha-forge-mcp"] }
}
}
If forge is installed at a non-standard location, pass it via env:
{
"mcpServers": {
"alpha-forge": {
"command": "uvx",
"args": ["alpha-forge-mcp"],
"env": { "ALPHA_FORGE_BIN": "/path/to/forge" }
}
}
}
Troubleshooting
forge binary not found— ensureforge/alpha-forgeis onPATH, or setALPHA_FORGE_BIN=/path/to/forge.authentication_required— runforge system auth login. The MCP server does not store credentials; it relies onforge's own auth.
Development
uv sync --extra dev
uv run pytest
uv run ruff check .
Forge binary discovery order: ALPHA_FORGE_BIN → PATH (forge, alpha-forge) → OS
default install paths.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alpha_forge_mcp-0.1.0a1.tar.gz.
File metadata
- Download URL: alpha_forge_mcp-0.1.0a1.tar.gz
- Upload date:
- Size: 57.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0becbd66c74dc93030aa8cffb4539f4fcbe8a18693250d5f8ae0dcbf24c8364b
|
|
| MD5 |
a8a33f584e08a757b81d87f9f3fc2963
|
|
| BLAKE2b-256 |
2485d295e02b974cf554dacd46ab6a1c9f9046e96ee0639bcc592589638ac743
|
Provenance
The following attestation bundles were made for alpha_forge_mcp-0.1.0a1.tar.gz:
Publisher:
publish.yml on alforge-labs/alpha-forge-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alpha_forge_mcp-0.1.0a1.tar.gz -
Subject digest:
0becbd66c74dc93030aa8cffb4539f4fcbe8a18693250d5f8ae0dcbf24c8364b - Sigstore transparency entry: 1693066819
- Sigstore integration time:
-
Permalink:
alforge-labs/alpha-forge-mcp@41bcc3b47989cd2257dfb48c9fd6ba541b354500 -
Branch / Tag:
refs/tags/v0.1.0a1 - Owner: https://github.com/alforge-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@41bcc3b47989cd2257dfb48c9fd6ba541b354500 -
Trigger Event:
push
-
Statement type:
File details
Details for the file alpha_forge_mcp-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: alpha_forge_mcp-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc06dec1a9083d0e05fd35ad89798909d4ec997a92d73f1e951e39eceeb2bc01
|
|
| MD5 |
3c08367670466e2f6dd9287e7f82d3f3
|
|
| BLAKE2b-256 |
a96eb87b4412dbf17e0f904eda80845d2a5ca7400c0d833a6b68108158e802ea
|
Provenance
The following attestation bundles were made for alpha_forge_mcp-0.1.0a1-py3-none-any.whl:
Publisher:
publish.yml on alforge-labs/alpha-forge-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alpha_forge_mcp-0.1.0a1-py3-none-any.whl -
Subject digest:
fc06dec1a9083d0e05fd35ad89798909d4ec997a92d73f1e951e39eceeb2bc01 - Sigstore transparency entry: 1693066954
- Sigstore integration time:
-
Permalink:
alforge-labs/alpha-forge-mcp@41bcc3b47989cd2257dfb48c9fd6ba541b354500 -
Branch / Tag:
refs/tags/v0.1.0a1 - Owner: https://github.com/alforge-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@41bcc3b47989cd2257dfb48c9fd6ba541b354500 -
Trigger Event:
push
-
Statement type: