Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"quantcontext": {
"command": "quantcontext"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
QuantContext is an MCP server that turns plain-English strategy descriptions into executable quant research: screen stocks by any criteria, backtest over historical data, and run factor analysis to see where the returns come from. Every number is computed from real market data, not generated by an LLM. Results are fully reproducible.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
uvx 'quantcontext-mcp' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked quantcontext-mcp against OSV.dev.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in finance / data
Manage Supabase projects — databases, auth, storage, and edge functions
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
The Apify MCP server enables your AI agents to extract data from social media, search engines, maps, e-commerce sites, or any other website using thousands of ready-made scrapers, crawlers, and automation tools available on the Apify Store.
An official Qdrant Model Context Protocol (MCP) server implementation
MCP Security Weekly
Get CVE alerts and security updates for Quantcontext MCP Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
QuantContext is an MCP server that turns plain-English strategy descriptions into executable quant research: screen stocks by any criteria, backtest over historical data, and run factor analysis to see where the returns come from. Every number is computed from real market data, not generated by an LLM. Results are fully reproducible.
Works with Claude, Codex, OpenCode, or any other MCP-compatible coding agent.
pip install quantcontext-mcp
Claude Code:
claude mcp add quantcontext -- quantcontext
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"quantcontext": {
"command": "quantcontext"
}
}
}
No API keys. No configuration.
Three tools that compose into a full research workflow:
screen_stocks -> backtest_strategy -> factor_analysis
| Tool | What it does |
|---|---|
screen_stocks | Filter S&P 500, Nasdaq 100, or Russell 2000 by fundamentals, momentum, quality, technical signals, or a multi-factor blend. Returns ranked candidates. |
backtest_strategy | Test a strategy over history with a rebalance-loop engine. Returns CAGR, Sharpe, max drawdown, equity curve, and trade log. |
factor_analysis | Decompose strategy returns into Fama-French factors (market, size, value, momentum). Returns alpha with t-statistic, factor loadings, and R-squared. |
Stock screening:
Screen S&P 500 for value stocks: PE under 15, ROE above 12%
Find the top 20% momentum stocks in the Nasdaq 100 over the last 200 days
Rank S&P 500 stocks by a blend of value, momentum, and quality, equal weight each factor
Find S&P 500 stocks with RSI under 40 and price above the 200-day moving average
Backtesting:
Backtest a top-20% momentum strategy on Nasdaq 100, monthly rebalance, last 2 years
How would a value screen (PE under 15, ROE above 12%) have performed on S&P 500 over the last 3 years?
Test a momentum strategy with a 15% stop loss and 20% max portfolio drawdown circuit breaker
Full research workflow:
Screen S&P 500 for cheap, high-quality stocks. Backtest monthly over 3 years,
then run factor analysis. Is the return real alpha or just factor exposure?
| Screen | Description | Key parameters |
|---|---|---|
fundamental_screen | Filter by PE, ROE, leverage, revenue growth | pe_lt, roe_gt, debt_equity_lt, revenue_growth_gt |
quality_screen | Profitability and balance sheet health | roe_gt, debt_equity_lt, profit_margin_gt |
momentum_screen | Rank by N-day price momentum | lookback_days, top_pct |
value_screen | Cheapest stocks by valuation | pe_lt, top_n |
factor_model | Multi-factor composite score | weights (value/momentum/quality/volatility), top_n |
technical_signal | RSI and SMA crossover signals | rsi_period, sma_short, sma_long |
mean_reversion | Stocks below z-score threshold | lookback_days, z_threshold |
The tools are also importable directly — no agent required. Useful if you have an existing script and want to plug in backtesting or factor analysis.
from quantcontext.server import screen_stocks, backtest_strategy, factor_analysis
import asyncio, json
# Screen
result = json.loads(asyncio.run(screen_stocks(
universe="sp500",
screen_type="fundamental_screen",
config={"pe_lt": 15, "roe_gt": 12},
)))
# Backtest
bt = json.loads(asyncio.run(backtest_strategy(
stages=[{"order": 1, "type": "screen", "skill": "fundamental_screen", "config": {"pe_lt": 15, "roe_gt": 12}}],
universe="sp500",
rebalance="monthly",
start_date="2022-01-01",
)))
print(bt["metrics"])
# Factor analysis — pipe the equity curve straight in
fa = json.loads(asyncio.run(factor_analysis(
equity_curve=bt["full_equity_curve"]
)))
print(fa[
... [View full README on GitHub](https://github.com/zomma-dev/quantcontext-mcp-server#readme)