Open Source MCP ServerNo signup. No API keys. No config.

Give your trading agent
a quant brain.

QuantContext is an MCP server that gives AI agents real quant computation: stock screening, strategy backtesting, and Fama-French factor analysis. Every number is computed from real market data, using proven models.Works with Claude, Codex, OpenCode, and any MCP-compatible agent.

$
claude mcp add quantcontext -- quantcontext

or: pip install quantcontext-mcp

claude

> Screen S&P 500 for value stocks with positive momentum

screen_stocks

Found 23 matches. Top 5:

TICKERPEMOM_6MSCORE
GILD12.3+18.4%0.84
VZ8.7+12.1%0.71
MO9.1+9.8%0.68
~550
stocks covered
99
years of factor data
7
screening methods

Why this exists

Built for systems that trade real money.

Data providers give agents eyes. Brokers give them hands. QuantContext gives them a brain.

Agents hallucinate numbers

Ask an LLM for a Sharpe ratio. Confident guess. Ask again, different number. QuantContext computes from real data. Same input, same output.

Agents can't verify themselves

AI agents skip steps, fabricate results, and report numbers they never computed. Trading agents need external, deterministic verification.

No API keys required

Public data only: Yahoo Finance and the Kenneth French Data Library. No account, no quotas, no billing.

The tools

Three tools today. More shipping soon.

Every number computed from real market data. Click a tool to see example I/O.

See it in action

Describe a strategy. Get real analysis.

One prompt. The agent confirms the exact parameters it will use, runs the backtest, and breaks down the returns.

claude — quantcontext

> Backtest a top-20% momentum strategy on Nasdaq 100, monthly rebalance, last 2 years

backtest_strategy

Strategy: Buy the top 20% of Nasdaq 100 stocks by 200-day price momentum, rebalanced monthly. Starting with $100,000.

universe: nasdaq100

screen: momentum_screen

lookback: 200 days, top 20%

rebalance: monthly

period: 2023-03-07 to 2025-03-07

sizing: equal_weight

capital: $100,000

Backtest Results — 2 years, 24 rebalances

CAGR

+34.2%

Sharpe

1.42

Max Drawdown

-8.7%

Win Rate

61%

Factor Analysis — Fama-French 4-Factor

Annualized Alpha

+4.7%t=1.87 (not significant)

R-squared

0.78

FactorLoadingt-statNote
Mkt-RF1.2114.3Market beta
SMB0.080.71No size tilt
HML-0.31-3.12Growth-leaning
Mom0.899.45Strong momentum

Bottom line: The 34% return is real, but mostly systematic exposure to market and momentum factors. Alpha of 4.7% is not statistically significant (|t| < 2). The strategy earns the momentum premium, not idiosyncratic edge.

Every number above was computed from historical market data.

See full example in docs

Try these prompts

From question to conviction.

Screen, backtest, decompose. Copy any prompt below into your agent.

01screen_stocks

Find S&P 500 stocks with PE < 15, positive momentum

23 matches · Top: GILD (PE 12.3, Mom +18.4%)

02backtest_strategy

Equal-weight top 5, monthly rebalance, 2 years

Return +34.2% · Sharpe 1.42 · Max DD −8.7%

03factor_analysis

Where is the alpha coming from?

Alpha 4.7% (t=1.87) · HML 0.49 · R² 0.78

Every number above was computed from historical market data.

Start in 30 seconds.

Install the package and connect it to your AI agent. No API keys, no configuration, no account required. Works with any MCP-compatible client.

Claude Code
claude mcp add quantcontext -- quantcontext
pip
pip install quantcontext-mcp
Launching soon

Skip the build. Start trading.

Your quant agent team, running 24/7. Strategies out of the box, portfolio monitoring, market screening. QuantContext computation built in. We're building a hosted version so you don't have to.

Follow updates