MCP server exposing quantitative risk analytics to AI agents: 4-method VaR/ES, GARCH volatility, EVT tail risk, Basel backtesting, stress scenarios, and a PD scorecard.
risk-mcp provides 7 well-scoped tools with complete input schemas and descriptions. Naming follows verb_noun convention (compute_var_es, garch_volatility, backtest_var, stress_test, evt_tail_risk, score_credit_application, credit_model_summary). Descriptions are domain-specific and explain WHAT each tool does and WHEN to use it (e.g., 'Divergence between historical and normal VaR is the fat-tail signal'). However, output schemas are not documented, LLMs cannot predict return structure. Parameter descriptions are present but lack constraints (e.g., no min/max for alpha, no enum for method values). Error handling is absent, no guidance on invalid inputs or recovery paths. Security is adequate (READ_ONLY risk classification, no secrets in params), but no permission gates or audit trail patterns.
Walk-forward VaR backtest (no look-ahead): Kupiec proportion-of-failures, Christoffersen independence/conditional-coverage tests, and the Basel traffic-light zone. `method` is 'historical' or 'parametric'. Needs more than `window`+30 observations; omit `returns` to use the demo portfolio.
Portfolio VaR and Expected Shortfall by four methods (historical, parametric-normal, Cornish-Fisher, Monte Carlo) at confidence `alpha`. `asset_returns` maps asset name -> equal-length list of daily returns; `weights` defaults to equal. Omit both to use the demo book. Divergence between historical and normal VaR is the fat-tail signal.
Metadata for the credit scorecard: held-out AUROC/Gini/KS, per-feature Information Values, and the valid categorical inputs.
Extreme-value tail analysis: fit a Generalized Pareto to losses beyond the `threshold_q` quantile (peaks-over-threshold) and report EVT VaR/ES at `alpha` (use for 99.5%+ where empirical quantiles run out of data).
Fit GARCH(1,1) by maximum likelihood to a daily return series (>= 250 obs) and forecast volatility `forecast_horizon` days ahead (mean-reverting to long-run vol). Omit `returns` to use the demo portfolio.
Output schemas not documented. LLMs cannot predict return structure (e.g., what fields does compute_var_es return? Is it a dict with 'var_historical', 'var_parametric', etc.?). This forces agents to guess and wastes tokens on trial-and-error.
Parameter constraints missing. 'alpha' (confidence level) lacks min/max bounds, LLMs could pass 0.5 or 1.5 (invalid). 'method' in backtest_var is free-form string, not enum, should declare ['historical', 'parametric']. 'forecast_horizon' lacks min bound.
No error handling or recovery guidance. If an LLM passes returns with <250 observations to garch_volatility, the tool will fail silently or return a cryptic error. No guidance on 'try with demo data' or 'provide at least 250 observations'.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 55 | 2026-07-28+ | v2 |
Score a retail loan application on a WoE logistic PD scorecard: 12-month probability of default, scorecard points (higher = safer) and a letter rating. Demo model trained on a synthetic book — methodology is production-style, the score is not a production score.
Stress the portfolio two ways: a preset crisis-shock library (GFC-style equity crash, 2020 pandemic, +200bp rates, flight to quality, USD squeeze) and the portfolio's own worst `horizon`-day historical windows.
score_credit_application has 13 required parameters with no defaults except home_ownership and purpose. This is high cognitive load for LLMs and invites missing-parameter errors. Consider grouping related params (e.g., credit_profile = {age, credit_history_length, num_delinquencies_2yr}) or providing smart defaults.
credit_model_summary has empty input schema (no parameters). Description is clear, but LLMs may not recognize this as a discovery/metadata tool. Add a note like 'Call this first to understand model performance and valid categorical values.'