Quantrisk

io.github.78degrees由 GitHub 帳號 78degrees 發布v1.0.3更新於 Oct 24, 2026

Portfolio risk analytics MCP server — VaR, Monte Carlo, stress testing, and more.

已驗證STDIO僅桌面金融資料與分析

概覽

AI 產生的概覽

本機 MCP 伺服器,透過 QuantRisk 雲端 API 讓助理進行投資組合風險分析,包括 VaR、蒙地卡羅模擬、壓力測試、相關性與投資組合最佳化。

可以做什麼
分析投資組合:計算 VaR、CVaR、波動率、夏普比率與最大回撤,並提供產業曝險及依資產、產業與因子拆解的績效歸因。模擬與壓力測試:執行前瞻性蒙地卡羅報酬模擬,並評估投資組合在歷史或假設情境下的影響。取得市場資料:查詢支援代碼的歷史價格與報酬,建立跨資產相關性矩陣。最佳化與比較(Pro 版):執行均值變異數與風險平價最佳化、並排比較多個投資組合,以及計算選擇權希臘值。
適用情境
適合讓助理以真實市場資料而非估算數字回答量化風險問題,例如風險值、回撤、壓力情境、相關性或資產配置最佳化。
執行需求
以本機 stdio 程序執行,從 npm 套件 @quantrisk/mcp-server 安裝,需要 Node.js。需在 QUANTRISK_API_KEY 環境變數中提供 API 金鑰,可於廠商網站註冊取得。需要連線至廠商雲端 API 的網路;免費方案限制為 20 個持倉、每日 50 次呼叫、7 項工具與 1000 條蒙地卡羅路徑。
安裝前請注意
API 金鑰屬於機密,會傳送至廠商雲端服務進行驗證。持倉與股票代碼會傳送給該第三方 API,由其從 Yahoo Finance 取得行情;README 表示請求完成後不保留投資組合資料。投資組合最佳化、組合比較與選擇權希臘值等工具需要每月 29 美元的 Pro 付費訂閱。

安裝

在 SourceWeft 中

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

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

QuantRisk

Institutional-grade portfolio risk analytics for Claude and any MCP client.

[npm version] [npm downloads] [License: MIT] [MCP Compatible]

VaR / Monte Carlo / Stress Testing / Portfolio Optimization / Greeks / Correlation Matrices

Real market data. Real math. Not hallucinated numbers.

Website · Get Pro · Documentation


Quick Start

1. Install

bash
npm install -g @quantrisk/mcp-server

2. Configure (Claude Desktop — see below for Cursor)

Add to your claude_desktop_config.json:

json
{  "mcpServers": {    "quantrisk": {      "command": "quantrisk-mcp-server",      "env": {        "QUANTRISK_API_KEY": "your-api-key"      }    }  }}

Get your free API key at quantrisk.dev/signup.

3. Ask Claude

"What's the Value at Risk on a portfolio of 60% SPY, 25% TLT, and 15% GLD?"

That's it. Claude now has access to institutional-grade risk analytics.


Configuration

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

json
{  "mcpServers": {    "quantrisk": {      "command": "quantrisk-mcp-server",      "env": {        "QUANTRISK_API_KEY": "your-api-key"      }    }  }}

Cursor

Add to .cursor/mcp.json in your project root:

json
{  "mcpServers": {    "quantrisk": {      "command": "quantrisk-mcp-server",      "env": {        "QUANTRISK_API_KEY": "your-api-key"      }    }  }}

Any MCP Client

QuantRisk works with any client that supports the Model Context Protocol. Point it at the quantrisk-mcp-server binary with your API key in the environment.


Tools

ToolDescriptionTier
analyze_riskVaR, CVaR, volatility, Sharpe ratio, max drawdownFree
monte_carlo_simulationForward-looking return simulations with configurable pathsFree
stress_testPortfolio impact under historical and hypothetical scenariosFree
price_historyHistorical price and return data for any supported tickerFree
sector_exposureSector and industry breakdown across holdingsFree
performance_attributionReturn attribution by asset, sector, and factorFree
correlation_matrixCross-asset correlation analysisFree
optimize_portfolioMean-variance and risk-parity optimizationPro
compare_portfoliosSide-by-side risk/return comparison of multiple portfoliosPro
calculate_greeksOptions Greeks — delta, gamma, theta, vega, rhoPro

Example Queries

Once configured, ask Claude questions like these:

  • "Run a Monte Carlo simulation on my portfolio: 50% AAPL, 30% MSFT, 20% NVDA. Show me the 5th percentile outcome."
  • "Stress test 70% VTI / 30% BND against the 2008 financial crisis and a hypothetical 300bp rate shock."
  • "What's my sector exposure if I hold equal weights in AMZN, JPM, JNJ, XOM, and NEE?"
  • "Show me the correlation matrix for SPY, GLD, TLT, and BTC-USD over the last 2 years."
  • "Compare the risk-adjusted returns of a 60/40 portfolio vs. an all-weather portfolio." (Pro)
  • "Calculate the Greeks for a SPY 550 call expiring in 30 days." (Pro)

Why Pro?

The free tier covers core risk analytics for small portfolios. Pro unlocks the tools and scale that serious analysis demands.

FreePro ($29/mo)
Positions20500
API calls50/dayUnlimited
Tools7All 10
Monte Carlo paths1,000100,000
Portfolio optimization—Mean-variance, risk-parity, min-volatility
Portfolio comparison—Side-by-side multi-portfolio analysis
Options Greeks—Full Greeks surface

What that means in practice:

  • Free: "What's the VaR on my 10-stock portfolio?" — works great.
  • Pro: "Optimize my 200-position portfolio for maximum Sharpe, then stress test it against 5 scenarios and compare it to my current allocation." — you need Pro for that.

Upgrade to Pro


How It Works

Claude / MCP Client      |  MCP Protocol      |QuantRisk MCP Server (local process)      |QuantRisk API (Cloudflare Workers)      |Yahoo Finance (market data) + risk engine (math)
  • MCP Server runs locally as a stdio process — your API key never leaves your machine except to authenticate with the QuantRisk API.
  • Risk Engine runs on Cloudflare Workers. All calculations — VaR, Monte Carlo, optimization — happen server-side with real math on real market data.
  • Market Data sourced from Yahoo Finance. Prices, fundamentals, and options chains are fetched in real time.
  • Reports generated with pdf-lib when applicable.

No data is stored. No portfolio information is retained after a request completes.


Contributing

Contributions are welcome. Please open an issue first to discuss what you'd like to change.

bash
git clone https://github.com/78degrees/mcp-server.gitcd mcp-servernpm installnpm test

See CONTRIBUTING.md for guidelines.


License

MIT


Built by the team at quantrisk.dev

Contact: [email protected]

來源:README.md,提交 df287a5

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分