QuantRisk MCP server
✓ VerifiedProvides institutional-grade portfolio risk analytics including VaR, Monte Carlo simulations, stress testing, and portfolio optimization.
Also known as 78degrees/mcp-server, @quantrisk/mcp-server
- Stars
- 2
- Tools
- 10
- Downloads, 30 days
- —
- Latest version
- 1.0.3
- Last commit
- May 26, 2026
- License
- MIT
What is QuantRisk MCP?
QuantRisk provides institutional-grade portfolio risk analytics including VaR, Monte Carlo simulations, stress testing, and portfolio optimization. It exposes 10 tools, such as analyze_risk, monte_carlo_simulation, stress_test.
Summary generated from the project's README
About QuantRisk MCP server
QuantRisk provides institutional-grade financial analytics for users of Claude Desktop, Cursor, and other Model Context Protocol clients. It allows developers and investors to perform complex mathematical operations on market data directly through an AI interface. The server runs as a local process using stdio, requiring a QUANTRISK_API_KEY provided via environment variables to authenticate with the remote risk engine.
Users can access a variety of tools including analyze_risk for calculating VaR and Sharpe ratios, monte_carlo_simulation for forward-looking returns, and stress_test for historical scenario analysis. While the free tier includes seven tools and supports up to 20 positions, the Pro tier expands capabilities to include portfolio optimization, side-by-side portfolio comparison, and options Greeks calculation. The system utilizes Yahoo Finance for real market data to ensure calculations are based on actual prices rather than generated numbers.
What you can do with it
- 1Calculate portfolio risk metricsAsk the AI to determine the Value at Risk for a specific collection of assets.
- 2Simulate future market outcomesRun a Monte Carlo simulation to see potential percentile outcomes for a set of holdings.
- 3Analyze historical stress scenariosTest how a specific asset allocation would have performed during the 2008 financial crisis.
- 4Perform advanced portfolio optimizationUse Pro features to find the best mean-variance or risk-parity allocation for a large number of positions.
Written from the project's README. Every use case is checked against a quote from it.
How to install QuantRisk MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall QuantRisk MCP in Claude Code
$ claude mcp add --env 'YOUR_API_KEY=<YOUR_YOUR_API_KEY>' quantrisk -- npx -y @quantrisk/mcp-serverInstall QuantRisk MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"quantrisk": {
"command": "npx",
"args": [
"-y",
"@quantrisk/mcp-server"
],
"env": {
"YOUR_API_KEY": "<YOUR_YOUR_API_KEY>"
}
}
}
}Install QuantRisk MCP in VS Code
.vscode/mcp.json
{
"servers": {
"quantrisk": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@quantrisk/mcp-server"
],
"env": {
"YOUR_API_KEY": "<YOUR_YOUR_API_KEY>"
}
}
}
}Install QuantRisk MCP in VS Code CLI
$ code --add-mcp '{"name":"quantrisk","type":"stdio","command":"npx","args":["-y","@quantrisk/mcp-server"],"env":{"YOUR_API_KEY":"<YOUR_YOUR_API_KEY>"}}'Install QuantRisk MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"quantrisk": {
"command": "npx",
"args": [
"-y",
"@quantrisk/mcp-server"
],
"env": {
"YOUR_API_KEY": "<YOUR_YOUR_API_KEY>"
}
}
}
}Install QuantRisk MCP in Codex
$ codex mcp add quantrisk --env 'YOUR_API_KEY=<YOUR_YOUR_API_KEY>' -- npx -y @quantrisk/mcp-serverInstall QuantRisk MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.quantrisk] command = "npx" args = ["-y", "@quantrisk/mcp-server"] [mcp_servers.quantrisk.env] YOUR_API_KEY = "<YOUR_YOUR_API_KEY>"
Install QuantRisk MCP in Gemini CLI
$ gemini mcp add -s user -e 'YOUR_API_KEY=<YOUR_YOUR_API_KEY>' quantrisk npx -- -y @quantrisk/mcp-serverInstall QuantRisk MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"quantrisk": {
"command": "npx",
"args": [
"-y",
"@quantrisk/mcp-server"
],
"env": {
"YOUR_API_KEY": "<YOUR_YOUR_API_KEY>"
}
}
}
}QuantRisk MCP tools 10
Detected from the READMEanalyze_riskmonte_carlo_simulationstress_testprice_historysector_exposureperformance_attributioncorrelation_matrixoptimize_portfoliocompare_portfolioscalculate_greeks
| analyze_risk | — | |
| monte_carlo_simulation | — | |
| stress_test | — | |
| price_history | — | |
| sector_exposure | — | |
| performance_attribution | — | |
| correlation_matrix | — | |
| optimize_portfolio | — | |
| compare_portfolios | — | |
| calculate_greeks | — |
Configuration
YOUR_API_KEYRequiredSecretYour API key for the service
QUANTRISK_API_KEY
| Name | Description | |
|---|---|---|
| YOUR_API_KEY | Your API key for the service | RequiredSecret |
| QUANTRISK_API_KEY | — |
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work · What to fix for more points
- Source repository linked and reachable78degrees/mcp-server is public and reachablegithub.com/78degrees/mcp-server ↗Pass
- Package names this repository as its source@quantrisk/mcp-server names git+https://github.com/quantrisk/mcp-server.git as its sourcenpmjs.com/package/@quantrisk/mcp-server ↗Finding
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-05-27github.com/78degrees/mcp-server ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from @quantrisk/mcp-serverPass
- No critical advisory in the package or its dependencies138 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model10 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubQuantRisk
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.
Website · Get Pro · Documentation
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
QuantRisk MCP questions
How do I add QuantRisk MCP to Claude Code?
Run claude mcp add --env 'YOUR_API_KEY=<YOUR_YOUR_API_KEY>' quantrisk -- npx -y @quantrisk/mcp-server in your terminal. Add --scope user to make it available in every project.
How do I add QuantRisk MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does QuantRisk MCP provide?
It exposes 10 tools, including analyze_risk, monte_carlo_simulation, stress_test, price_history, sector_exposure.
Is my portfolio data stored by the server?
No, the service does not store data or retain portfolio information after a request is completed.