HPSILab Quant Finance

io.github.haiyunskyPublished by GitHub account haiyunskyv0.11.1Updated Oct 31, 2026

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

The publisher's own server: Finance Foundation

VerifiedStreamable HTTPWeb executableFinanceData & Analytics

Overview

AI-generated overview

Gives an assistant quantitative stock and options research tools: pre-trade risk scans, IV structure, gamma walls, Monte Carlo ranges and backtests.

What you can do
  • Analyze a ticker in one call, with direction signal, bullish and bearish factors and a plain-English summary
  • Read implied-volatility level, rank, skew and regime, plus option-chain pressure such as max pain and gamma walls
  • Simulate 10-trading-day price ranges and odds, and review strategy backtests with Sharpe, drawdown and win rate
  • Run a pre-trade risk scan covering volatility, beta, drawdown, VaR, sizing and correlation checks
  • Generate hosted stock-report images and a full markdown research report
  • Register a free account and receive an API key from inside the client
When to use it
Useful when an assistant needs structured, machine-readable market research on US-listed equities, ETFs or supported options — for example a risk gate before a trade idea, an options-structure review, or a quick multi-signal overview of a ticker. It is research and educational only and does not execute trades.
Requirements
Either the hosted streamable HTTP endpoint with OAuth sign-in, or a local stdio process from the PyPI package (pip or uvx). All research tools need a signed-in account: OAuth, or a Bearer API key in the Authorization header, or the HPSILAB_API_KEY environment variable for stdio. Network access to the hosted service; paid tools need Credits or x402 payment.
Before you install
The API key is a secret: keep it in private client configuration and never paste it into chat or commit it. Some tools cost money — the pre-trade risk scan and research report are priced per call via x402 for anonymous callers or spend Credits for signed-in accounts, and plans have daily and per-minute limits. Image and report generation create hosted artifacts, are not idempotent and consume quota, so they should not be retried automatically. register_account creates an account and sends…

Installation

In SourceWeft

  1. Open HPSILab Quant Finance in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.haiyunsky%2Fhpsilab-quant-finance-mcp/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "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.

Source: README.md at commit 3e02e4e

Tools

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.

Parametersemailrequired

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.

Parameterstickerrequiredrefresh

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".

Parameterstickerrequired

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".

Parameterstickerrequired

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.

Parametersticker

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".

Parameterstickerrequired

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.

Parameterslangsymbolrequiredrefresh

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".

Parameterssymbolrequired

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.

Parametersforcetypessymbolrequired

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.

Parameterssymbolrequiredrefreshforce_images

Version history

5
  1. v0.11.1LatestOct 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

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Finance integrations