npm @quantrisk/mcp-serverstreamable-httpMITupdated 3mo ago
Institutional-grade portfolio risk analytics for Claude and any MCP client.
What can you do with QuantRisk?
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.
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
Install
Add QuantRisk to your client. Pick the one you use.
{
"servers": {
"mcp-server": {
"type": "http",
"url": "https://quantrisk-mcp.quantrisk.workers.dev/mcp"
}
}
}Add to `.vscode/mcp.json` in your workspace.
claude mcp add mcp-server -- npx -y @quantrisk/mcp-servercodex mcp add mcp-server -- npx -y @quantrisk/mcp-serveramp mcp add mcp-server -- npx -y @quantrisk/mcp-server{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@quantrisk/mcp-server"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@quantrisk/mcp-server"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@quantrisk/mcp-server"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@quantrisk/mcp-server"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@quantrisk/mcp-server"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"mcp-server": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@quantrisk/mcp-server"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"mcp-server": {
"command": {
"path": "npx",
"args": [
"-y",
"@quantrisk/mcp-server"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @quantrisk/mcp-serverRun `goose configure`, choose **Add Extension โ Command-line Extension**, and paste this command.
10 tools
QuantRisk exposes 10 tools to a connected agent.
- analyze_risk
- VaR, CVaR, volatility, Sharpe ratio, max drawdown
- monte_carlo_simulation
- Forward-looking return simulations with configurable paths
- stress_test
- Portfolio impact under historical and hypothetical scenarios
- price_history
- Historical price and return data for any supported ticker
- sector_exposure
- Sector and industry breakdown across holdings
- performance_attribution
- Return attribution by asset, sector, and factor
- correlation_matrix
- Cross-asset correlation analysis
- optimize_portfolio
- Mean-variance and risk-parity optimization
- compare_portfolios
- Side-by-side risk/return comparison of multiple portfolios
- calculate_greeks
- Options Greeks โ delta, gamma, theta, vega, rho
Score
74 / 100
Good
- Documentation25/25
- Maintenance13/25
- Trust13/20
- Capability8/15
- Install experience15/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 97 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 10 tool(s) documented
- Provides prompt templates
- Provides resources
- 18 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint โ no local install
Version history
| Versions | Published |
|---|---|
| 1.0.2Latest | May 9, 2026 |