analyze_risk
Calculate core risk metrics for a portfolio — Value at Risk (VaR), Conditional VaR (CVaR), volatility, beta, and max drawdown.
methodbenchmarkpositionsrequiredhorizon_dayslookback_daysconfidence_level
dev.quantriskPublished by quantrisk.devv1.0.2Updated Oct 24, 2026
Portfolio risk analytics — VaR, Monte Carlo, optimization, options Greeks, stress testing.
QuantRisk gives an assistant institutional-style portfolio risk analytics: VaR, Monte Carlo, stress tests, correlations, exposure and option Greeks.
Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.
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.Add this to your client's mcpServers config.
{
"mcpServers": {
"quantrisk": {
"type": "http",
"url": "https://quantrisk-mcp.quantrisk.workers.dev/mcp"
}
}
}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.
1. Install
2. Configure (Claude Desktop — see below for Cursor)
Add to your claude_desktop_config.json:
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.
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Add to .cursor/mcp.json in your project root:
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.
Once configured, ask Claude questions like these:
The free tier covers core risk analytics for small portfolios. Pro unlocks the tools and scale that serious analysis demands.
What that means in practice:
No data is stored. No portfolio information is retained after a request completes.
Contributions are welcome. Please open an issue first to discuss what you'd like to change.
See CONTRIBUTING.md for guidelines.
Built by the team at quantrisk.dev
Contact: [email protected]
Source: README.md at commit df287a5
Calculate core risk metrics for a portfolio — Value at Risk (VaR), Conditional VaR (CVaR), volatility, beta, and max drawdown.
methodbenchmarkpositionsrequiredhorizon_dayslookback_daysconfidence_levelRun Monte Carlo simulation on a portfolio to model the distribution of future returns, including percentile outcomes and probability of loss.
seedmodelnum_pathspositionsrequiredhorizon_dayslookback_daysStress test a portfolio against historical crisis scenarios (GFC 2008, COVID 2020, etc.) or custom shocks (paid tier).
positionsrequiredscenarioscustom_shocksFind the optimal portfolio allocation using mean-variance optimization. Supports max Sharpe, min variance, and target return objectives. Paid tier only.
tickersrequiredobjectiveconstraintslookback_daystarget_returnrisk_free_rateCompute the pairwise correlation matrix for a set of assets. Identifies highly correlated pairs and diversification opportunities.
methodtickersrequiredlookback_daysBreak down portfolio performance into factor exposures, sector allocation, and position contributions. Computes Sharpe, Sortino, Treynor, Calmar, and Information ratios.
benchmarkpositionsrequiredperiod_daysrisk_free_rateBreak down portfolio exposure by GICS sector, market cap, and asset class. Returns concentration metrics including the Herfindahl-Hirschman Index.
positionsrequiredFetch historical OHLCV price data for one or more tickers. Free tier: 1 ticker, 252 days. Paid tier: up to 20 tickers, 1260 days.
daystickersrequiredintervalCompare two or more portfolio allocations head-to-head across all key risk and return metrics. Paid tier only.
portfoliosrequiredperiod_daysconfidence_levelCalculate 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.
optionsrequiredrisk_free_rate100% 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.
npm install -g @quantrisk/mcp-server{ "mcpServers": { "quantrisk": { "command": "quantrisk-mcp-server", "env": { "QUANTRISK_API_KEY": "your-api-key" } } }}{ "mcpServers": { "quantrisk": { "command": "quantrisk-mcp-server", "env": { "QUANTRISK_API_KEY": "your-api-key" } } }}{ "mcpServers": { "quantrisk": { "command": "quantrisk-mcp-server", "env": { "QUANTRISK_API_KEY": "your-api-key" } } }}Claude / MCP Client | MCP Protocol |QuantRisk MCP Server (local process) |QuantRisk API (Cloudflare Workers) |Yahoo Finance (market data) + risk engine (math)git clone https://github.com/78degrees/mcp-server.gitcd mcp-servernpm installnpm test