Skip to main content
QuantContext is an MCP server that gives AI agents deterministic quant computation: stock screening, strategy backtesting, and factor analysis. Works with Claude, Codex, Opencode, and any MCP-compatible agent. Every number is computed from real market data, not generated by an LLM. Same input, same output.

Why this exists

LLMs hallucinate numbers. QuantContext enforces a strict boundary:
  • LLM layer:decides what to compute, selects parameters, explains results
  • QuantContext layer:executes deterministic Python computation, returns structured JSON
  • Data layer:yfinance (prices + fundamentals), Kenneth French (Fama-French factors)
The LLM never touches a number. Python computes everything.

The three tools

Tools compose naturally

screen_stocks → backtest_strategy → factor_analysis
Screen candidates, backtest over time, decompose returns to understand where alpha comes from.

No API keys required

Public data only: Yahoo Finance (via yfinance) and the Kenneth French Data Library. No account, no keys, no quotas.