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 分