
QuantRisk
- 2 repo stars
- Updated May 26, 2026
- 78degrees/mcp-server
Portfolio risk analytics - VaR, Monte Carlo, optimization, options Greeks, stress testing.
About
Portfolio risk analytics - VaR, Monte Carlo, optimization, options Greeks, stress testing. npm install -g @quantrisk/mcp-server Add to your `claude_desktop_config.json`: Exposes 10 MCP tools including dev.quantrisk/mcp-server, QUANTRISK_API_KEY, | Tool | Description | Tier |, |------|-------------|------|. Install via Claude Desktop, Cursor, or any MCP-compatible client using the upstream server manifest.
- **Institutional-grade portfolio risk analytics for Claude and any MCP client.**
- **2. Configure** (Claude Desktop - see [below](#configuration) for Cursor)
- **"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?"**
QuantRisk by the numbers
- Exposes 10 verified tools (MCP introspection)
- Data as of Jul 9, 2026 (Skillselion catalog sync)
claude mcp add --env QUANTRISK_API_KEY=YOUR_QUANTRISK_API_KEY mcp-server -- npx -y @quantrisk/mcp-serverAdd your badge
Show developers this MCP server is listed on Skillselion. Paste this into your README.
| repo stars | ★ 2 |
|---|---|
| Package | @quantrisk/mcp-server |
| Transport | STDIO, HTTP |
| Auth | Required |
| Tools | 10 |
| Last updated | May 26, 2026 |
| Repository | 78degrees/mcp-server ↗ |
How do I connect QuantRisk to my MCP client?
Portfolio risk analytics - VaR, Monte Carlo, optimization, options Greeks, stress testing.
Who is it for?
Teams wiring QuantRisk into Claude, Cursor, or custom agents for finance.
Skip if: Skip when you need a non-MCP SDK or hosted API without stdio/SSE transport.
What you get
Working QuantRisk MCP server with verified tool registration and client config.
- Agent-invokable VaR, Monte Carlo, optimization, Greeks, and stress-test results from QuantRisk
- Repeatable quant checks documented in agent sessions for fintech build and grow loops
By the numbers
- [object Object]
QuantRisk capabilities & compatibility
- Capabilities
- quantrisk mcp tool registration · quantrisk client configuration · quantrisk agent workflow integration
- Use cases
- orchestration
- Runs
- Remote server
Tools 10
Public tool metadata - what this server can do for an agent.
analyze_risk6 paramsCalculate core risk metrics for a portfolio — Value at Risk (VaR), Conditional VaR (CVaR), volatility, beta, and max drawdown.
positionsarrayrequiredArray of portfolio positions. Each entry needs a ticker and quantity. Free tier: max 20 positions. Paid tier: up to 500.confidence_levelnumberVaR confidence level as a decimal, e.g. 0.95 = 95%. Range: 0.01-0.99. Default: 0.95.horizon_daysintegerRisk horizon in trading days. 1 = overnight, 21 ≈ 1 month, 252 ≈ 1 year. Default: 1.methodstringVaR calculation method. "historical" uses empirical return distribution, "parametric" assumes normality, "cornish_fisher" adjusts for skew and kurtosis. Default: "historical".benchmarkstringBenchmark ticker for beta calculation, e.g. SPY or QQQ. Default: SPY.lookback_daysintegerNumber of historical trading days to use. 252 ≈ 1 year, 756 ≈ 3 years. Range: 30-1260. Default: 252.
monte_carlo_simulation6 paramsRun Monte Carlo simulation on a portfolio to model the distribution of future returns, including percentile outcomes and probability of loss.
positionsarrayrequiredArray of portfolio positions. Free tier: max 20 positions. Paid tier: up to 500.num_pathsintegerNumber of simulation paths to run. More paths = more accurate but slower. Free tier: max 1,000. Paid tier: up to 100,000. Default: 10,000.horizon_daysintegerSimulation horizon in trading days. 21 ≈ 1 month, 63 ≈ 1 quarter, 252 ≈ 1 year. Default: 21.modelstringStochastic process model. "gbm" = Geometric Brownian Motion (standard), "jump_diffusion" = adds jump risk for fat-tail scenarios. Default: "gbm".lookback_daysintegerHistorical window used to estimate drift and volatility parameters. Range: 30-1260 trading days. Default: 252.seedRandom seed for reproducible results. Omit for a fresh random run each time.
stress_test3 paramsStress test a portfolio against historical crisis scenarios (GFC 2008, COVID 2020, etc.) or custom shocks (paid tier).
positionsarrayrequiredArray of portfolio positions. Free tier: max 20 positions and historical scenarios only. Paid tier: up to 500 positions plus custom shocks.scenariosarrayHistorical scenarios to run. Available values: gfc_2008, covid_2020, dot_com_2000, black_monday_1987, taper_tantrum_2013, rate_hike_2022, volmageddon_2018, euro_crisis_2011. Default: [gfc_2008, covid_2020].custom_shocksCustom shock definitions. PAID tier only. Each shock specifies ticker-level, sector-level, or market-wide price changes.
optimize_portfolio6 paramsFind the optimal portfolio allocation using mean-variance optimization. Supports max Sharpe, min variance, and target return objectives. Paid tier only.
tickersarrayrequiredUniverse of tickers to optimize across. Must be 2-50 tickers. The optimizer will determine the best weights within this set.objectivestringOptimization objective. "max_sharpe" = maximize risk-adjusted return, "min_variance" = minimize portfolio volatility, "target_return" = hit a specific return with minimum risk. Default: "max_sharpe".target_returnRequired when objective is "target_return". Annualized return as a decimal, e.g. 0.12 = 12% annual return target.constraintsobjectOptional weight constraints. See ConstraintsInput for details.risk_free_ratenumberAnnualized risk-free rate as a decimal, e.g. 0.05 = 5%. Used in Sharpe ratio calculation. Default: 0.05.lookback_daysintegerHistorical window for estimating return and covariance. 252 = 1 year, 756 = 3 years, 1260 = 5 years. Range: 252-1260. Default: 756.
correlation_matrix3 paramsCompute the pairwise correlation matrix for a set of assets. Identifies highly correlated pairs and diversification opportunities.
tickersarrayrequiredTickers to include in the correlation matrix. Minimum 2, maximum 50. Free tier: max 10 tickers. Paid tier: up to 50.lookback_daysintegerHistorical window for computing correlations in trading days. 30 = ~6 weeks, 252 = ~1 year. Range: 30-1260. Default: 252.methodstringCorrelation method. "pearson" = linear correlation (standard), "spearman" = rank-based (robust to outliers), "kendall" = concordance-based. Default: "pearson".
performance_attribution4 paramsBreak down portfolio performance into factor exposures, sector allocation, and position contributions. Computes Sharpe, Sortino, Treynor, Calmar, and Information ratios.
positionsarrayrequiredArray of portfolio positions. Free tier: max 20 positions (basic ratios only). Paid tier: up to 500 positions with full factor attribution.period_daysintegerMeasurement period in trading days. 252 = ~1 year. Range: 30-1260. Default: 252.benchmarkstringBenchmark ticker for relative performance metrics (Information Ratio, Tracking Error, Beta). Default: SPY.risk_free_ratenumberAnnualized risk-free rate as a decimal, e.g. 0.05 = 5%. Used in Sharpe, Sortino, and Treynor ratios. Default: 0.05.
sector_exposure1 paramBreak down portfolio exposure by GICS sector, market cap, and asset class. Returns concentration metrics including the Herfindahl-Hirschman Index.
positionsarrayrequiredArray of portfolio positions to analyze. Returns GICS sector weights, market cap breakdown, and concentration metrics.
price_history3 paramsFetch historical OHLCV price data for one or more tickers. Free tier: 1 ticker, 252 days. Paid tier: up to 20 tickers, 1260 days.
tickersarrayrequiredTicker symbols to fetch price history for. Free tier: max 1 ticker. Paid tier: up to 20 tickers.daysintegerNumber of historical trading days to return. Free tier: max 252 days (~1 year). Paid tier: up to 1260 days (~5 years). Default: 252.intervalstringPrice interval. "daily" returns one OHLCV row per trading day, "weekly" aggregates to weekly bars, "monthly" aggregates to monthly bars. Default: "daily".
compare_portfolios3 paramsCompare two or more portfolio allocations head-to-head across all key risk and return metrics. Paid tier only.
portfoliosarrayrequiredTwo to five named portfolios to compare head-to-head. Each needs a unique name and a list of positions. Min: 2, max: 5.period_daysintegerLookback period in trading days used for return and risk calculations. 252 = ~1 year. Range: 30-1260. Default: 252.confidence_levelnumberVaR confidence level as a decimal, e.g. 0.95 = 95%. Range: 0.01-0.99. Default: 0.95.
calculate_greeks2 paramsCalculate 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.
optionsarrayrequiredArray of option positions to calculate Greeks for. 1-100 options. Results include per-option Greeks and aggregated portfolio Greeks.risk_free_ratenumberAnnualized risk-free rate as a decimal, e.g. 0.05 = 5%. Used in Black-Scholes and binomial pricing models. Default: 0.05.
README.md
QuantRisk
Institutional-grade portfolio risk analytics for Claude and any MCP client.
VaR / Monte Carlo / Stress Testing / Portfolio Optimization / Greeks / Correlation Matrices
Real market data. Real math. Not hallucinated numbers.
Quick Start
1. Install
npm install -g @quantrisk/mcp-server
2. Configure (Claude Desktop — see below for Cursor)
Add to your claude_desktop_config.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):
{
"mcpServers": {
"quantrisk": {
"command": "quantrisk-mcp-server",
"env": {
"QUANTRISK_API_KEY": "your-api-key"
}
}
}
}
Cursor
Add to .cursor/mcp.json in your project root:
{
"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
| Tool | Description | Tier |
|---|---|---|
analyze_risk |
VaR, CVaR, volatility, Sharpe ratio, max drawdown | Free |
monte_carlo_simulation |
Forward-looking return simulations with configurable paths | Free |
stress_test |
Portfolio impact under historical and hypothetical scenarios | Free |
price_history |
Historical price and return data for any supported ticker | Free |
sector_exposure |
Sector and industry breakdown across holdings | Free |
performance_attribution |
Return attribution by asset, sector, and factor | Free |
correlation_matrix |
Cross-asset correlation analysis | Free |
optimize_portfolio |
Mean-variance and risk-parity optimization | Pro |
compare_portfolios |
Side-by-side risk/return comparison of multiple portfolios | Pro |
calculate_greeks |
Options Greeks — delta, gamma, theta, vega, rho | Pro |
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.
| Free | Pro ($29/mo) | |
|---|---|---|
| Positions | 20 | 500 |
| API calls | 50/day | Unlimited |
| Tools | 7 | All 10 |
| Monte Carlo paths | 1,000 | 100,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.
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.
git clone https://github.com/78degrees/mcp-server.git
cd mcp-server
npm install
npm test
See CONTRIBUTING.md for guidelines.
License
Built by the team at quantrisk.dev
Contact: hello@quantrisk.dev
Recommended MCP Servers
How it compares
Portfolio risk analytics MCP, not a generic data warehouse connector or tax filing skill.
FAQ
What does QuantRisk do?
Portfolio risk analytics - VaR, Monte Carlo, optimization, options Greeks, stress testing.
When should I use QuantRisk?
User asks about QuantRisk mcp, portfolio risk analytics - var, monte carlo, optimization, options gre.
Is this MCP server safe to install?
Review the Security Audits panel on this page before installing in production.