QuantForge MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@QuantForge MCP Serverbacktest momentum on tech stocks 2015-2020, 10bps costs"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
QuantForge — an AI-driven, polyglot quant research environment
A self-directed summer project: an open-source quant research pipeline (data → strategies → backtest → portfolio optimization → risk/perf analytics), driven by an AI research agent over MCP tools, with a snazzy interactive UI and a cloud-hosted, budget-capped demo.
This is an independent, open-source project. It uses only public data and open-source / personal tooling. It is not affiliated with or built on any employer's internal systems.
Why this exists
Build something real and portfolio-worthy — recognizable quant workflows, implemented with rigor (no look-ahead/survivorship bias, transaction costs, out-of-sample evaluation), in code the author can defend line-by-line.
Show the architecture, not just a toy — one
Engine/Strategyinterface, multiple compute backends, an AI agent that drives the whole thing through tools.
Related MCP server: OpenFinClaw CLI
Architecture at a glance
data ingestion → strategies → backtest engine → portfolio optimization → risk/perf analytics → UI → cloud
▲ │
└── AI research agent (propose→backtest→read→refine) ◀── MCP toolsPolyglot by design. Every stage exchanges data via an Arrow/Parquet interchange contract, so each piece can use the best tool for the job:
Stage | Tool | Status |
Backtest engine | Python (custom vectorized) | core |
Analytics / risk | R (tidyquant, PerformanceAnalytics, PortfolioAnalytics) | core |
Visual workflow engine | KNIME | stretch |
(future) comparison engine | — | future |
The compute engine sits behind a single interface (src/quantforge/engine/base.py), so a new engine
can drop in later without touching the rest of the app. See docs/architecture.md.
The AI layer
MCP server exposes the pipeline as tools:
load_data,run_backtest,optimize_portfolio,get_metrics.Research agent proposes a strategy, backtests it, reads its own metrics, and iterates — with mandatory overfitting guardrails (train / validation / untouched holdout, iteration cap, budget cap). See
src/quantforge/ai/.Natural-language interface turns "backtest momentum on tech, 2015–2020, 10bps costs" into tool calls and explains the result in plain English.
Two distinct AI uses: the Claude API is a metered, budget-capped runtime feature of this app. Claude Code (a coding assistant) is a separate development tool used to build the repo.
Safety & cost control (read before deploying publicly)
A public URL that can trigger paid API calls will get hit by bots. This repo treats that as a hard
requirement — see src/quantforge/ai/guardrails.py and docs/architecture.md:
Global server-side budget ledger (daily + total caps); graceful fallback to cached runs.
Independent AWS Budgets alarm at the infra layer.
Expensive AI paths gated (passcode); open traffic gets cached scenarios only.
No LLM-generated code is executed on the public server — public mode is parameter-only.
Methodology and known limitations
Honest accounting of what the backtests do and do not claim. Each convention below is enforced by a
dedicated test where one exists; the custom engine is additionally validated against backtesting.py
(tests/test_engine_vs_backtestingpy.py).
Survivorship bias (known limitation). The universe is a fixed, hand-picked list of 30 of today's names — not a point-in-time constituent history. Companies that were delisted, went bankrupt, or shrank out of relevance along the way are absent, so historical results are optimistic: every name in the panel is, by construction, a survivor. The proper fix — a point-in-time universe — is an acknowledged non-goal for v1.0 (
docs/product.md§1). The authoritative caveat lives in the module docstring ofsrc/quantforge/data/loader.py, next to the frozenUNIVERSElist itself.No look-ahead. Positions decided using data through the close of day t earn day t+1's return. The engine enforces this mechanically via
positions.shift(1)— a signal can never be paid for same-day information it could not have known at decision time. Proven bytests/test_no_lookahead.py, which shows a deliberately prescient signal earns nothing once run through the engine.Transaction costs. Modeled as basis points charged on turnover (
Σ|Δweight|per day). The project's default assumption is 10 bps per unit turnover (docs/product.md§5.3), user-overridable via the engine'scost_bpsparameter. The accounting — hand-computed cost series, linearity in the rate, buy/sell/short symmetry, day-of-charge — is proven bytests/test_cost_accounting.py.Short borrow fees are not modeled (known limitation). Short positions are charged turnover costs like any trade, but the ongoing cost of borrowing shares is ignored, so long–short results are slightly optimistic (
docs/components/04-python-engine.md).Cross-language (Python ↔ R) conventions. The R analytics layer transcribes Python's exact metric definitions (population std, ANN=252, risk-free 0) rather than trusting library defaults, and the optimizer cross-check deliberately uses the min-variance objective (unique convex optimum). The full notes — including why the RG-6 tolerance is ~1% while the observed agreement is ~1e-9, and why the PerformanceAnalytics display tables legitimately differ — live in "Cross-language conventions and caveats" in
docs/components/08-r-tearsheet.md, proven bytests/test_r_cross_check.py.
Quickstart
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # add ANTHROPIC_API_KEY, set AI_BUDGET_USD
pytest # correctness + rigor + safety tests
streamlit run app/streamlit_app.pyR analytics layer:
Rscript analytics_r/tearsheet.R # reads the Parquet hand-off, emits a tearsheetRepo layout
See docs/architecture.md for the full map. Start here:
docs/PROJECT_BRIEF.md (what to build) and
docs/TEN_WEEK_PLAN.md (the week-by-week checklist).
Status
Scaffold. Modules are stubs with docstrings + TODOs — the implementation is the project.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Research-only MCP server: turn your AI into a quant research desk — backtests, no trades.
Quant intelligence over MCP: backtest, signals, screens, scores & portfolios for US & TSX stocks.
Build, backtest, and deploy crypto trading strategies via MCP with 7-stage validation.
- CPZAIOAuthcom.cpz-lab.mcp
Build, backtest, and deploy quantitative trading strategies from your AI agent.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn extensible framework that exposes quantitative research functions and financial data connectors, such as FRED, via an MCP server. It enables users to perform complex financial modelling, data retrieval, and autonomous research loops with built-in guardrails and pluggable components.64MIT
- FlicenseNot gradedqualityDmaintenanceEnables quant research, strategy generation, backtesting, and paper trading from natural language prompts, integrating with AI agents via an MCP server.63-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to directly access quant research knowledge, including factor libraries, strategy backtesting, and research reports, through the MCP protocol.101MIT
- AlicenseNot gradedqualityCmaintenanceEnables quantitative trading research by providing tools to backtest strategies, list market datasets, review forward-test logs, and search previously rejected hypotheses, all through an MCP interface.MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kars0311/quantforge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server