HPSILab Quant Finance

io.github.haiyunsky由 GitHub 帳號 haiyunsky 發布v0.11.1更新於 Oct 31, 2026

Stock & options risk analytics for AI agents: pre-trade risk scan, IV, gamma walls, Monte Carlo.

發布方自己的服務:Finance Foundation

已驗證Streamable HTTP可網頁執行金融資料與分析

概覽

AI 產生的概覽

為助理提供股票與期權的量化研究工具:交易前風險掃描、隱含波動率結構、Gamma 牆、蒙地卡羅區間與回測。

可以做什麼
  • 一次呼叫完成個股綜合分析,給出方向訊號、利多與利空因素及白話總結
  • 讀取隱含波動率水準、排名、偏斜與狀態,以及期權鏈壓力如最大痛點與 Gamma 牆
  • 模擬未來約 10 個交易日的價格區間與上漲機率,並檢視策略回測的夏普比率、回撤與勝率
  • 執行交易前風險掃描,涵蓋波動率、貝他值、回撤、VaR、部位規模與相關性檢查
  • 產生託管的股票報告圖片與完整的 Markdown 研究報告
  • 在用戶端內註冊免費帳號並立即取得 API 金鑰
適用情境
適合需要結構化、機器可讀的美股、ETF 或支援期權市場研究的場合,例如交易想法前的風險把關、期權結構檢視,或對某檔股票做多訊號速覽。僅供研究與教育用途,不執行交易。
執行需求
可使用託管的 streamable HTTP 端點並以 OAuth 登入,或在本機以 stdio 執行 PyPI 套件(pip 或 uvx)。所有研究工具都需要已登入帳號:OAuth,或在 Authorization 標頭提供 Bearer API 金鑰,stdio 方式則使用 HPSILAB_API_KEY 環境變數。需要連線至託管服務的網路;付費工具需要 Credits 或 x402 付款。
安裝前請注意
API 金鑰屬於機密:應放在用戶端的私有設定中,切勿貼到對話或提交進程式庫。部分工具會產生費用——交易前風險掃描與研究報告對匿名呼叫者按次以 x402 收費,登入使用者則扣抵 Credits,且各方案有每日與每分鐘呼叫上限。圖片與報告產生會建立託管產物、不具冪等性並消耗配額,不應自動重試。register_account 會在無人參與的情況下建立帳號並寄送電子郵件。輸出為即時資料,兩次呼叫之間可能變動。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 HPSILab Quant Finance,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.haiyunsky%2Fhpsilab-quant-finance-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "hpsilab-quant-finance": {
      "type": "http",
      "url": "https://hpsilab.com/mcp"
    }
  }
}

README

HPSILab Quant Finance MCP Server for Stock & Options Analytics

[HPSILab in the Claude Directory] [PyPI] [CI] [License] [Listed on mcpservers.org] [HPSILab Quant Finance MCP on Glama]

Stock and options risk analytics for AI agents. Connect one remote MCP endpoint, https://hpsilab.com/mcp, sign in with OAuth (no API key to paste), and your agent can call:

  • a pre-trade risk scan: volatility, beta, drawdown and VaR against SPY with fixed pass/warn/fail limits, plus sizing, sector exposure and correlation checks;
  • options structure: IV level, rank and skew, gamma wall, call/put walls, max pain;
  • a 10-trading-day Monte Carlo price range and odds of finishing higher;
  • analyze_stock for a one-call overview, plus AI prediction and backtests.

Results are structured JSON with machine-readable errors, for US-listed equities, ETFs and supported options. This repository is the open-source Python server (MIT); the hosted endpoint runs the same tool surface.

Research and educational use only. HPSILab does not provide investment advice and does not execute trades.

Get a Free API Key · Pricing · Tool reference · Client setup · Python SDK

Registry nameio.github.haiyunsky/hpsilab-quant-finance-mcp
Version0.11.1 — a source checkout reports 0.11.1+source
TransportsStreamable HTTP (hosted) · stdio (PyPI package)
Remote endpointhttps://hpsilab.com/mcp
Packagepip install -U hpsilab-quant-finance-mcp
AuthenticationOAuth sign-in or Bearer API key (hosted), HPSILAB_API_KEY (stdio)
Tools10 — nine financial research tools plus register_account

Connect: hosted Streamable HTTP

Recommended, and requires no local installation.

With OAuth sign-in

Clients that support MCP OAuth (Claude Code, Claude.ai and ChatGPT connectors, and others) only need the URL; they open the HPSILab sign-in page on first use.

bash
claude mcp add --transport http hpsilab https://hpsilab.com/mcp

In a connector UI, add a custom connector with the URL https://hpsilab.com/mcp.

With an API key

For clients without OAuth support, or for scripts:

  1. Register a free account, sign in, and generate an API key from Settings.
  2. Add the server to your client's private configuration, replacing hpsi_your_key. Never commit a real key or paste one into chat.

The example below is Claude Code's .mcp.json; other clients use different configuration schemas, all covered in client setup.

json
{  "mcpServers": {    "hpsilab": {      "type": "http",      "url": "https://hpsilab.com/mcp",      "headers": {        "Authorization": "Bearer hpsi_your_key"      }    }  }}
  1. Verify the connection:
text
Use HPSILab to analyze AAPL. Separate observed metrics from interpretation,identify conflicting signals, and finish with a concise risk summary.

All financial research tools require a signed-in account: OAuth or a valid API key. See authentication for key handling and rotation.

Building an agent? examples/agents has one-file risk-check agents for the OpenAI Agents SDK, the Claude Agent SDK and LangGraph. Walkthrough: docs/guide-risk-gate-for-trading-agents.md.

Connect: local stdio

For clients that require a local process:

bash
pip install -U hpsilab-quant-finance-mcp

This example uses the mcpServers schema supported by Claude and Cursor; VS Code and GitHub Copilot use a servers schema instead.

json
{  "mcpServers": {    "hpsilab": {      "command": "hpsilab-quant-finance-mcp",      "env": {        "HPSILAB_API_KEY": "hpsi_your_key"      }    }  }}

Then verify it through the MCP client:

text
Use HPSILab to get the AI prediction for NVDA and summarize the model consensus.

The client discovers tools with MCP tools/list and invokes them with tools/call. See local setup and Python usage, which also covers calling the tool functions directly from Python.

Tools

Nine financial research tools, plus register_account. Tool names and parameter meanings are part of the public compatibility contract.

ToolWhat it returnsBehavior
analyze_stockAggregate directional and quantitative stock analysisRead-only
get_ai_predictionNext-session prediction, confidence, and model consensusRead-only
get_iv_radarIV level, rank, percentile, skew, and regimeRead-only
get_option_pressureMax pain, gamma walls, expected move, and pressure zonesRead-only
get_monte_carlo10-trading-day simulated distribution and probabilitiesRead-only
get_equity_curveStrategy backtests and risk-adjusted performanceRead-only
get_pretrade_risk_scanPosition, exposure, correlation, and risk checksRead-only
generate_stock_imagesHosted stock and options chart artifactsCreates an artifact; not idempotent
generate_stock_research_reportStructured Markdown research report and timestampCreates an artifact; not idempotent
register_accountSigning up from the client with no API key yet, or a fresh key for an existing accountCreates an account and sends email; not idempotent

Research tools accept one exchange ticker such as NVDA, SPY, or BRK.B; company names are not accepted. Live results can change between calls. Artifact tools can consume quota and should not be retried automatically.

Full inputs, outputs, side effects, and tool-selection guidance are in docs/tools.md.

Monte Carlo research example

[PLTR Monte Carlo scenario visualization]

Example visualization of scenario-based Monte Carlo research output. Results depend on the selected inputs and model assumptions. See get_monte_carlo for tool details.

Copy-ready prompts

Claude

text
Use HPSILab to analyze NVDA. Summarize the directional signal, AI modelconsensus, IV regime, options pressure, 10-day Monte Carlo range, and thethree most important risks. Distinguish tool data from interpretation.

Cursor

text
Use HPSILab's IV radar and option-pressure tools for SPY. Compare IV rank,percentile, skew, expected move, max pain, gamma wall, and pressure zones.Return a compact table and do not recommend a trade.

ChatGPT

text
Run the HPSILab pre-trade risk scan for TSLA. Explain every warning or failedcheck, preserve unavailable fields as unavailable, and quote the returnedreason instead of guessing. Do not execute or recommend a trade.

Setup guidance covers ChatGPT, Claude, Cursor, VS Code, GitHub Copilot, Continue, and Kimi. See the client setup guide for each client's transport and configuration format.

Errors, retries, and limits

Every failure is a structured object with a stable error_code, never prose an agent has to pattern-match. Five refusals matter, because each has a different remedy:

error_codeMeaningWhat resolves it
api_key_requiredNo key is configuredRegistering. Nothing is sent downstream
rate_limitedCalling too fast (429)Waiting — next_actions carries the seconds
insufficient_creditsThe Credit balance is empty (402)Adding Credits, or registering for trial Credits
allowance_exhaustedThe free evaluation ceiling is spent (402)Registering, or verifying an email. Money does not lift it
settlement_unknownA payment whose outcome is unconfirmedReconciliation. Do not retry it and do not pay again

Without a key the package stops locally, before constructing the downstream client or sending a request:

json
{  "error": "api_key_required",  "message": "A free API key is required.",  "register_url": "https://hpsilab.com/register",  "docs_url": "https://hpsilab.com/developer/v2"}

401 and 402 responses are never retried. A 429 is retried only when it carries a valid Retry-After. Read-only calls use a finite retry budget for timeouts and recoverable 500/502/503/504 responses; artifact-producing calls are not retried automatically. The package also applies one process-local safeguard of 10 requests per rolling minute per API key — burst protection, not a quota, since only the hosted service knows the balance and the plan.

Field-by-field payloads, the Credits circuit breaker, and the reasoning behind each remedy are in docs/authentication.md and docs/python-sdk.md.

Why HPSILab

HPSILab gives assistants typed inputs, structured outputs, ticker validation, machine-readable errors, and dedicated tools instead of invented metrics. It supports US-listed equities, ETFs, and supported options data; coverage and limits depend on the hosted service and plan.

Safety and license

HPSILab is for research and education only. Outputs may be incomplete, delayed, or wrong and are not investment, financial, or trading advice. The MCP server has no brokerage connectivity, order entry, or trade-execution capability.

Licensed under the MIT License. Contributions are welcome; read AGENTS.md and CONTRIBUTING.md before proposing public schema changes.

來源:README.md,提交 3e02e4e

工具

10

register_account

Register a Free Account

Register a free hpsilab account for yourself, with no human involvement, and receive an API key immediately. Call this when the user has no API key yet and asks to sign up from here, or when a refusal's `next_actions` names register_account and the user agrees. This is the only tool that works without an API key. You do not need a password, a wallet, or a web browser. The account is bound to you server-side, so calls you make after this are metered as your account even though you cannot change your own Authorization header. The account is created unverified, with only a capped evaluation allowance and no trial Credits, until the email address is confirmed; confirming it grants the one-time 100-Credit Registered Trial (14 days). Ask the human you are working with to click the link in the email that will arrive. Calling again from the same caller returns the same account with a fresh key; an address that belongs to another account is refused. A valid user email address is required. Do not call this tool with an empty or fabricated email address. If the user's email is unavailable, ask the user to provide it before calling register_account. Args: email: The real user email address that will receive verification.

輸入參數email必填

get_iv_radar

Implied Volatility Radar

Implied-volatility (IV) structure for a stock: how expensive options are, whether volatility is being squeezed, and whether traders are paying up for upside (calls) or downside (puts). Available to all signed-in users. Args: ticker: Stock symbol, e.g. "NVDA". refresh: Bypass the backend's fresh IV cache and request the latest option-chain pull. Defaults to False.

輸入參數ticker必填refresh

get_monte_carlo

Monte Carlo Simulation

Monte Carlo price simulation for the next ~10 trading days: thousands of random price paths estimate a likely price range and the odds of finishing higher. Args: ticker: Stock symbol, e.g. "AAPL".

輸入參數ticker必填

get_ai_prediction

AI Prediction

AI next-day prediction: probability the stock closes UP, a paper-trading buy/watch/sell lean (research only, not a trade instruction), and how strongly the models agree (consensus). Available to every authenticated plan (Free / Pro / Enterprise); subject to the caller's plan requests/day and requests/minute limits. Args: ticker: Stock symbol, e.g. "TSLA".

輸入參數ticker必填

get_equity_curve

Strategy Backtest

Backtest performance of the quant strategy across your watchlist: Sharpe ratio, max drawdown, win rate and total return per symbol. Available to every authenticated plan (Free / Pro / Enterprise); subject to the caller's plan requests/day and requests/minute limits. Args: ticker: Optional symbol to show just one row, e.g. "SPY". Leave blank for all.

輸入參數ticker

get_option_pressure

Options Pressure Map

Option-chain pressure map for the nearest weekly/monthly expiry — Max Pain, dealer Gamma Wall, likely weekly high, and an extreme squeeze target. Args: ticker: Stock symbol, e.g. "SPY".

輸入參數ticker必填

analyze_stock

Stock Analysis

Aggregate all quant tools into one JSON stock analysis. The tool reuses the existing MCP tools as its data sources, then derives a direction signal, direction score, bullish factors, bearish factors and plain-English summary. If one underlying tool is gated, unavailable or raises an error, the remaining tools still contribute to the final result (status "partial"); if every underlying tool fails, the whole call fails (status "error", isError=True) instead of a misleadingly "successful" empty analysis. Args: symbol: Stock symbol, e.g. "NVDA". refresh: Request fresh IV Radar data instead of using the backend's fresh IV cache. Defaults to False. lang: Language for `summary`, `bullish_factors` and `bearish_factors` - "en" (default), "zh" or "ja"; regional forms like "zh-CN" are accepted. Everything else in the response, `signal` included, is language-independent, so an existing caller that omits this gets byte-identical output to before.

輸入參數langsymbol必填refresh

get_pretrade_risk_scan

Pre-Trade Risk Scan

Full pre-trade risk scan JSON for a stock. Pro tool ($0.15/call via x402 for anonymous callers; Credits for signed-in accounts). Signed-in hpsilab users (including Free, on its trial Credits) spend Credits from their balance at this tool's catalog price — each tool is priced differently; see GET /api/credits/catalog. Anonymous / tokenless agents pay per call via x402 (USDC on Base) when payments are enabled — send the x402 payment in the request _meta. Args: symbol: Stock symbol, e.g. "NVDA".

輸入參數symbol必填

generate_stock_images

Stock Chart Generator

Generate stock-report PNG images and return their URLs. This is intentionally separate from analyze_stock so the JSON analysis stays fast and light. The backend reuses the same Growth Engine image generators used by email/social publishing. Args: symbol: Stock symbol, e.g. "RXRX". force: Regenerate images instead of using cached PNGs. Defaults to True so manually requested images reflect the latest available data. types: Optional subset of chart types. Allowed values are "ai_prediction", "iv_radar", "option_pressure", "monte_carlo", and "equity_curves". Omit to generate every chart type.

輸入參數forcetypessymbol必填

generate_stock_research_report

Stock Research Report

Full markdown research report with five stock-report charts. Pro tool ($0.35/call via x402 for anonymous callers; free within plan limits for signed-in accounts, subject to a monthly report quota). Runs analyze_stock and stock-report image generation concurrently, then renders a presentation-ready markdown report (direction, direction score, bullish / bearish factors, source-tool status, and the five chart embeds). The markdown is returned for display and the same data is mirrored in structured JSON. Signed-in hpsilab users call this within their plan's free rate limits. Anonymous / tokenless agents pay per call via x402 (USDC on Base) when payments are enabled — send the x402 payment in the request _meta. Args: symbol: Stock symbol, e.g. "RXRX". refresh: Bypass the backend's fresh IV cache for the IV-driven modules. Defaults to False. force_images: Force a fresh image render instead of reusing the backend's image cache. Defaults to False.

輸入參數symbol必填refreshforce_images

版本歷史

5
  1. v0.11.1最新Oct 24, 2026
  2. v0.11.0Oct 12, 2026
  3. v0.10.2Oct 12, 2026
  4. v0.10.1Sep 30, 2026
  5. v0.10.0Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Finance 整合