
Quant Research MCP
io.github.FlawlessByte由 GitHub 帳號 FlawlessByte 發布v0.1.0更新於 Oct 24, 2026
Paper-backed quant trading methods and a deterministic, no-LLM decision helper for serious traders.
概覽
本機 MCP 伺服器,為助理提供有論文依據的量化交易方法與確定性評分工具,用於篩選、訊號與進場決策。
- 可以做什麼
- 列出並說明內建交易方法及其論文出處,並可透過程式模組註冊新方法。篩選股票池並計算 EMA、RSI、ATR、VWAP、Hurst 等指標。辨識市場狀態,依個股或股票池執行方法,取得訊號及進場、停損、目標價位。對方法做歷史回測,給出勝率、期望值、回撤及樣本內與樣本外比較。檢查財報與除息事件、投資組合熱度與相關性,以及含類股與 VIX 的大盤環境。以確定性方式為交易設定評分,輸出結論、部位大小與執行計畫,並抓取近期新聞供助理自行判斷情緒。
- 適用情境
- 適合希望助理對美股進行可重現的量化篩選、方法訊號、回測與風險檢查的交易者或研究者,由助理負責敘述與情緒判斷。不用於下單,也不構成投資建議。
- 執行需求
- 以本機 stdio 程序執行;可透過 uvx 從 PyPI 或 GitHub、pipx、Docker 或原始碼(需 git 與 uv)安裝。以 Python 為基礎;Claude Desktop 安裝包仍需電腦上安裝 uv。多數工具需要網路,預設使用 yfinance,資料約延遲 15 分鐘。可透過環境變數 QUANT_DATA_PROVIDER 選擇其他資料來源。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Quant Research MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
quant_research_mcp
[CI] [License: MIT] [Python] [MCP]
An MCP server exposing a registry of paper-backed quantitative trading methods
plus a deterministic, no-LLM decision helper. The server supplies reproducible
math (screening, indicators, regime detection, method signals, scored entry
decisions); the calling agent supplies judgement (e.g. reading headlines into a
sentiment signal). No claude -p, no subprocess, no LLM inside the server.
⚠️ Not financial advice. This is read-only research and educational tooling. It performs quantitative computation only and places no orders. Nothing it outputs is investment advice or a recommendation. Market data may be delayed or wrong, backtests are not forecasts, and trading carries substantial risk of loss. You alone are responsible for any capital you risk. Provided "as is" without warranty — see
LICENSE.
Why this exists
Repackages a working day-trading pipeline as composable MCP tools, with two goals:
- Extensible to future papers. Each strategy is a
TradingMethodregistered in a registry. Adding a new paper = drop one module, callregister(...), import it. Nothing else changes. - Decision-making is scientific, not generative. The old pipeline gated entries
with an LLM call. Here that is replaced by
quant_score_decision— a pure function combining reward:risk, regime strength, volume, RSI positioning and ATR-normalised stop quality into an auditable score. Same inputs → same output.
Tools (13)
All tools are read-only and support response_format: markdown | json.
Workflows
Day trade
Swing (days) — rsi2_reversion, pairs_cointegration via
quant_analyze_setup / quant_analyze_universe; earnings veto matters most
here (quant_check_events → days_to_earnings).
Position (weeks+) — donchian_trend per ticker, xs_momentum over the
universe; re-rank monthly, weekly stop review per the execution plan.
Before trusting any method: quant_backtest_method on your tickers and
period — it replays the method's own signal logic with costs, and reports
in-sample vs out-of-sample halves so you can see decay.
The agent writes any narrative; the server guarantees the numbers.
The decision helper (quant_score_decision)
Pure function. Composite score (weights in config.DECISION_WEIGHTS):
- reward_risk — realised R:R vs the target multiple.
- regime_strength —
|Hurst − 0.5|scaled (distance from random walk). - volume_confirmation — relative volume vs the floor.
- momentum_position — RSI in a healthy band for the direction (not exhausted).
- stop_quality — stop distance normalised by daily ATR (noise-tight stops penalised).
Optional news_sentiment (the agent derives this) boosts an aligned score or
vetoes a contradicted one at confidence ≥ 0.5. Output includes the per-factor
breakdown, fixed-fractional position_size (with a haircut for noise-tight stops),
and a mechanically derived execution_plan (entry trigger, order type, stop ladder,
profit taking, time stop, abort conditions).
Bundled methods (5)
Data providers
Default is yfinance (free, ~15-min delayed). The data layer sits behind a
provider interface (quant_research_mcp/providers/): implement the
DataProvider protocol for Alpaca/Polygon/IBKR, register the factory, then run
with QUANT_DATA_PROVIDER=<name>. All calls are TTL-cached in-process (daily
15 min, intraday 60 s, news 5 min, events/sector 1 h).
Adding a future paper
Then add from . import my_paper to methods/__init__.py. It now appears in
quant_list_methods and is runnable via quant_analyze_setup(method_key=...).
Quick start (Makefile)
Install as a shell binary
If the command isn't found after install, run uv tool update-shell and restart
your shell (uv's tool bin dir, usually ~/.local/bin, must be on PATH).
Install
Every method runs the same stdio server — pick whichever fits your setup.
PyPI and Docker images are published on tagged releases; until the first release, use the uvx from GitHub or from source rows.
Use with Claude Code
Fastest — runs straight from GitHub, no clone:
After a PyPI release this shortens to:
Containerised:
From a local clone (development): make claude-add registers this checkout at
user scope; make register prints a paste-ready .mcp.json block.
Verify inside Claude Code:
Then ask e.g. "screen the universe and analyze the top name with the hurst
method, then score the entry decision." It will call quant_screen_universe
→ quant_analyze_setup → quant_score_decision.
From source (development)
Optional: make install-cli puts a quant-research-mcp binary on your PATH
(via uv tool). If it isn't found afterwards, run uv tool update-shell and
restart your shell. Inspect tool schemas with make inspect.
Releasing (maintainers)
CI runs ruff + the 40 offline tests on every push/PR (Python 3.12 & 3.13). Cutting a release is tag-driven:
That fires two workflows:
release.yml→uv build, publish to PyPI via Trusted Publishing (OIDC, no stored token), and attach the wheel/sdist + a.mcpbbundle to the GitHub Release.docker.yml→ build and pushghcr.io/flawlessbyte/quant-research-mcp.
One-time setup:
- PyPI: create the project and add a Trusted Publisher (owner
FlawlessByte, repoquant-research-mcp, workflowrelease.yml, environmentpypi). - GHCR: after the first push, set the package visibility to public.
- MCP registry: after the first PyPI release, list it with the
mcp-publisherCLI —mcp-publisher login githubthenmcp-publisher publish(usesserver.json; GitHub login proves ownership of theio.github.FlawlessByte/…namespace).
The Claude Desktop
.mcpbinvokesuvxunder the hood, so a one-click install still requires uv on the machine — bundling pandas/scipy/statsmodels wheels directly would be large and platform-specific.
Limitations (what a serious trader still needs elsewhere)
- Delayed data until you wire a real-time provider key (interface is ready; yfinance is ~15-min delayed and its news feed is thin).
- No macro calendar (FOMC/CPI/NFP) — no reliable free feed; pass your own
judgement through
news_sentiment/news_confidence. - No options data (IV, term structure, gamma levels), no short interest/float, no Level 2 — next frontier.
- Backtests are parameter validation, not forecasts: yfinance history has survivorship bias, costs are estimates, intraday replay is capped at ~60 days of 5m bars by the provider.
- No persistence by design — the server stores nothing; supply open
positions per call (
quant_portfolio_risk). A trade journal is a planned opt-in module.
來源:README.md,提交 337602f
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。