QuantRisk

dev.quantriskPublished by quantrisk.devv1.0.2Updated Oct 24, 2026

Portfolio risk analytics — VaR, Monte Carlo, optimization, options Greeks, stress testing.

VerifiedStreamable HTTPWeb executableFinanceData & Analytics

Overview

AI-generated overview

QuantRisk gives an assistant institutional-style portfolio risk analytics: VaR, Monte Carlo, stress tests, correlations, exposure and option Greeks.

What you can do
Compute portfolio risk metrics such as VaR, CVaR, volatility, beta and max drawdown, and run Monte Carlo return simulations and historical or custom stress tests on a portfolio allocation, with portfolio optimization and head-to-head portfolio comparison on the paid tier. Analyze diversification with pairwise correlation matrices and break down exposure by GICS sector, market cap and asset class, including concentration measures. Attribute performance to factors, sectors and positions and compute Sharpe, Sortino, Treynor, Calmar and Information ratios. Fetch historical OHLCV price data for one or more tickers and calculate option Greeks for single options or an options portfolio.
When to use it
Useful when you want an assistant to answer quantitative portfolio questions — risk of a given allocation, downside scenarios, diversification, sector concentration or option sensitivities — without building the math yourself. The free tier covers small portfolios and core metrics; optimization, comparison and Greeks need Pro.
Requirements
Runs as a remote endpoint or as a local npm package (@quantrisk/mcp-server) over stdio, so Node.js is needed for local use. An API key in QUANTRISK_API_KEY is optional; without it requests run on the free tier with limited tools and quotas. Network access to the QuantRisk API is required.
Before you install
Portfolio holdings and tickers you submit are sent to the QuantRisk API and market data is sourced from Yahoo Finance; the README states no portfolio data is retained after a request. The paid tier costs $29/month and unlocks optimization, portfolio comparison and Greeks. The free tier is capped at 20 positions and 50 calls per day.

Installation

In SourceWeft

  1. Open QuantRisk 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/dev.quantrisk%2Fmcp-server/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": {
    "quantrisk": {
      "type": "http",
      "url": "https://quantrisk-mcp.quantrisk.workers.dev/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]

Source: README.md at commit df287a5

Tools

10

analyze_risk

Calculate core risk metrics for a portfolio — Value at Risk (VaR), Conditional VaR (CVaR), volatility, beta, and max drawdown.

Parametersmethodbenchmarkpositionsrequiredhorizon_dayslookback_daysconfidence_level

monte_carlo_simulation

Run Monte Carlo simulation on a portfolio to model the distribution of future returns, including percentile outcomes and probability of loss.

Parametersseedmodelnum_pathspositionsrequiredhorizon_dayslookback_days

stress_test

Stress test a portfolio against historical crisis scenarios (GFC 2008, COVID 2020, etc.) or custom shocks (paid tier).

Parameterspositionsrequiredscenarioscustom_shocks

optimize_portfolio

Find the optimal portfolio allocation using mean-variance optimization. Supports max Sharpe, min variance, and target return objectives. Paid tier only.

Parameterstickersrequiredobjectiveconstraintslookback_daystarget_returnrisk_free_rate

correlation_matrix

Compute the pairwise correlation matrix for a set of assets. Identifies highly correlated pairs and diversification opportunities.

Parametersmethodtickersrequiredlookback_days

performance_attribution

Break down portfolio performance into factor exposures, sector allocation, and position contributions. Computes Sharpe, Sortino, Treynor, Calmar, and Information ratios.

Parametersbenchmarkpositionsrequiredperiod_daysrisk_free_rate

sector_exposure

Break down portfolio exposure by GICS sector, market cap, and asset class. Returns concentration metrics including the Herfindahl-Hirschman Index.

Parameterspositionsrequired

price_history

Fetch historical OHLCV price data for one or more tickers. Free tier: 1 ticker, 252 days. Paid tier: up to 20 tickers, 1260 days.

Parametersdaystickersrequiredinterval

compare_portfolios

Compare two or more portfolio allocations head-to-head across all key risk and return metrics. Paid tier only.

Parametersportfoliosrequiredperiod_daysconfidence_level

calculate_greeks

Calculate option Greeks (delta, gamma, theta, vega, rho) for individual options or an options portfolio. Uses Black-Scholes for European, binomial for American style. Paid tier only.

Parametersoptionsrequiredrisk_free_rate

Version history

1
  1. v1.0.2LatestSep 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