ModelRisk MCP
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MODELRISK_MCP_TOKEN | No | Token for HTTP transport authentication (required for streamable-http). | |
| MODELRISK_AUTO_LAUNCH | No | Set to '0' to disable auto-launch of Excel and ModelRisk. | 1 |
| MRSERVICE_ACTIVATION_KEY | No | Override the default bundled activation key for MRService.dll. |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_open_workbooksA | ModelRisk: List all Excel workbooks currently open. |
| get_active_workbookA | ModelRisk: Get the name and path of the active workbook. |
| open_workbookA | ModelRisk: Open a workbook (.xlsx/.xlsm) from disk in the running Excel so the other tools can act on it. Pass an absolute file path. If a workbook with the same file name is already open, returns that one (Excel won't open two with the same name). Requires Excel running. |
| close_workbookA | ModelRisk: Close an open workbook by file name. By DEFAULT unsaved changes are DISCARDED (save=False) — pass save=True to write them first. Returns the closed name and the workbooks still open. Raises if the named workbook isn't open. |
| get_workbook_summaryA | ModelRisk: Aggregated summary of a workbook — sheet names plus counts of VoseInput, VoseOutput, distribution, formula, and numeric cells. One-shot alternative to running the individual list tools. |
| list_modelrisk_inputsA | ModelRisk: List every cell wrapped with VoseInput() in the workbook. Returns each cell's reference, the input name, the full formula, and the current calculated value. |
| list_modelrisk_outputsA | ModelRisk: List every cell wrapped with VoseOutput() in the workbook. |
| list_distributionsA | ModelRisk: List every cell containing a Vose distribution / aggregate / copula / time-series / fitting function. Includes flags for whether each cell is also wrapped with VoseInput or VoseOutput. Optional |
| get_cellB | ModelRisk: Read a single cell's formula, value, and number format. |
| read_rangeA | ModelRisk: Read a contiguous range as a 2D array of values and formulas. Use ranges like 'A1:C10'. |
| get_simulation_resultsA | ModelRisk: Read simulation result statistics for the workbook's outputs. Returns per-output mean, stdev, variance, skewness, kurtosis, min, max, and P5/P10/P25/P50/P75/P90/P95 percentiles. Requires a simulation to have been run; pass output_names to filter. |
| get_correlation_matrixA | ModelRisk: Pearson and Spearman rank correlation between the named simulation inputs and outputs. Computed from the per-iteration samples ModelRisk records. Pass a name list to restrict; otherwise all variables are included. |
| get_sensitivity_rankingA | ModelRisk: Tornado / sensitivity ranking for a single output. Returns each input ranked by its Spearman rank correlation with the output, plus the standardised regression coefficient. |
| find_hard_coded_inputsA | ModelRisk: Heuristic discovery of cells that look like deterministic numeric inputs — i.e. a plain number, referenced by at least one formula. These are candidates for replacing with a distribution + VoseInput wrapper. |
| list_vmrs_variablesA | ModelRisk: List every variable in the active simulation results ( |
| get_samplesA | ModelRisk: Return raw per-iteration sample values for a single output or input. Useful for custom histograms, arbitrary percentiles, downstream analysis. Caps at 10 000 samples by default to keep the MCP response small; raise |
| set_active_vmrsA | ModelRisk: Pin a specific |
| read_vmrsA | ModelRisk: Read simulation results directly from a |
| compute_distributionA | ModelRisk: Analytic distribution calculator — compute a property of a distribution WITHOUT running a simulation. Give a |
| fit_and_rank_distributionsA | ModelRisk: Fit several distribution families to a data range and rank them by goodness of fit. For each family it fits VoseFitObject and scores it with ModelRisk's information criteria — AIC, SIC (Schwarz/BIC) and HQIC — then ranks ascending (lower = better) by |
| get_tail_riskA | ModelRisk: Tail-risk profile of a simulation output from its per-iteration samples — Value-at-Risk (VaR) and Conditional VaR / expected shortfall (CVaR) at each confidence level, plus optional threshold probabilities P(X>t) / P(X<=t). |
| compute_correlation_matrixA | ModelRisk: Compute the rank-order (Spearman) correlation matrix of a data range via VoseCorrMatrix, and its nearest valid (positive-semidefinite) form via VoseValidCorrmat. Use this to turn historical data into the correlation matrix you feed to create_copula for correlated inputs. Variables are columns by default (set |
| fit_tailA | ModelRisk: Fit an extreme-value / Generalised-Pareto tail to data and read its risk. |
| compare_distributionsA | ModelRisk: Compare two simulation outputs head-to-head from their per-iteration samples — mean/stdev/percentile differences, P(A > B), and first- and second-order stochastic dominance (under the convention that larger outcomes are preferred). First-order dominance means one option is better at every probability level; second-order adds risk-aversion. Use it to decide between strategies. Run a simulation that records both outputs first. |
| backtest_outputA | ModelRisk: Backtest a simulation output against realised actuals — does the model's predicted distribution match what actually happened? Reports the Probability Integral Transform (PIT, ~0.5 mean and uniform if calibrated), the empirical coverage of central prediction intervals (e.g. ~90% of actuals should fall in the 90% interval), and bias. Pass the historical |
| decompose_uncertaintyA | ModelRisk: Split an output's uncertainty into EPISTEMIC (parameter / knowledge uncertainty — reducible with more data) and ALEATORY (natural variability — irreducible), via the law of total variance. ModelRisk has no two-dimensional-simulation worksheet function, so this approximates it from two runs you provide as two outputs: |
| fit_copula_to_dataA | ModelRisk: Fit parametric copulas to a multi-column data range and rank them by goodness of fit — the DEPENDENCE STRUCTURE fitted from data, not merely constructed. Tries Normal, T, Clayton, Frank and Gumbel families (VoseFitObject), scores each with AIC / SIC / HQIC, and reports the winner plus its tail-dependence character (lower = crash-together, upper = boom-together, both = T, none = Normal/Frank) — the joint-tail risk a single correlation coefficient throws away. Runs on a transient scratch sheet that is always deleted; the data is not modified. Pair with fit_all_data_and_wire to insert the fitted copula into the model. |
| fit_time_seriesA | ModelRisk: Fit TIME-SERIES models to a historical data range and rank them by goodness of fit — GBM (plus mean-reverting / jump-diffusion / seasonal variants), AR1/AR2, MA1/MA2, ARMA, ARCH/GARCH/EGARCH. Each family's VoseTimeFitObject is scored with AIC / SIC / HQIC on a transient scratch sheet (nothing in the workbook is modified by the ranking). Optionally pass |
| reverse_stress_testA | ModelRisk: Reverse stress test — start from a BAD output outcome and work back to the joint input state that produces it. Partitions the simulation's iterations into breach / no-breach (output above/below a threshold, given directly or as a percentile), then for each input reports how far its mean shifts inside the breach set (in its own standard deviations) and how concentrated breaches are in its tail — a breach-driver tornado — plus the mean input vector as a concrete named stress scenario. This is the Solvency II / PRA 'reverse stress test' and is only possible with the engine's recorded per-iteration joint sample matrix (requires a completed simulation). |
| insert_distributionA | ModelRisk: Write a Vose distribution formula (e.g. =VoseModPERT(...)) into a cell. Validates the function name against the ModelRisk catalogue. Defaults to dry_run=True — Claude must explicitly pass dry_run=False to commit. |
| wrap_with_inputC | ModelRisk: Wrap an existing distribution cell with VoseInput("name")+ so it appears in the input list and the Results Viewer. |
| wrap_with_outputC | ModelRisk: Wrap an existing output cell with VoseOutput("name")+ so it appears in the output list and Results Viewer. |
| replace_constant_with_distributionA | ModelRisk: Replace a hard-coded number in a cell with a Vose distribution wrapped by VoseInput. Use after find_hard_coded_inputs identifies candidates. This is the only tool that overwrites a non-Vose cell — it does so by design. |
| fit_distribution_to_dataA | ModelRisk: Fit a distribution family to a data range and write the result. 'family' is e.g. 'Normal', 'Lognormal', 'Beta', 'Gamma', 'Weibull' — the tool maps it to the catalogue function (VoseFit). Set uncertainty=True (the default) to include parameter uncertainty in the fitted distribution. |
| create_aggregate_mcC | ModelRisk: Build a VoseAggregateMC(n, distribution, ...) formula that simulates the aggregate of a (possibly random) number n of i.i.d. severity draws. n and distribution are cell references — n points at a frequency cell, distribution at a severity object cell (built with a VoseObject function). |
| create_aggregateA | ModelRisk: Build a frequency-severity aggregate using the chosen |
| create_risk_eventC | ModelRisk: Build a VoseRiskEvent(probability, impact_object) formula. The impact_function_name must be a distribution-object function (category 'object') — typically a VoseObject variant. |
| create_time_seriesA | ModelRisk: Build a time-series formula (VoseTimeGBM, VoseTimeAR1, etc.) and write it into the target_range. Time-series tools are exempt from the >50-cell bulk-write guard because the dimension of the time series is the whole point. |
| create_copulaB | ModelRisk: Build a copula formula (e.g. VoseCopulaMultiNormal) that produces a correlated u-array for downstream distribution calls. Copula tools are exempt from the bulk-write guard. |
| set_named_rangeA | ModelRisk: Create or overwrite a workbook-level named range. Useful for giving cells clear identities the LLM can reference by name later. The reference must be A1-style (e.g. 'Sheet1!$A$1:$A$10'). |
| write_formulaA | ModelRisk: Write an arbitrary formula or value into a single cell. Use this for wiring cells (e.g. =A1*B1, =SUM(...), =IF(...), or links to other sheets) that aren't covered by the Vose-specific tools. Safety: refuses to overwrite a cell containing an existing formula unless allow_overwrite=True — that protects user-written formulas AND prior Vose distributions. Empty cells write freely. Defaults to dry_run=True; pass dry_run=False to commit. Every commit appends to the audit log so |
| save_workbook_asA | ModelRisk: Save the workbook to a specific path on disk. Distinct from the user's Ctrl+S — the MCP server never calls Workbook.Save() implicitly. Use only when the caller explicitly named a target file. Refuses to overwrite an existing file unless overwrite=True. Returns the resolved absolute path that was written. |
| restore_cellA | ModelRisk: Restore a cell to its pre-write state from the audit log. Reads %LOCALAPPDATA%\VoseSoftware\modelrisk-mcp\writes.log and rewrites the oldest captured before-formula for the cell. Pass |
| restore_deterministic_stateA | ModelRisk: Recover a workbook that's been left in a 'frozen sample' state — VoseOutput cells stuck on per-iteration sample values instead of their deterministic baseline. Triggers a full Excel recalculation (Application.CalculateFull) which re-evaluates every formula and restores the deterministic values. Use this after |
| run_simulationA | ModelRisk: Run a Monte Carlo simulation on the active (or named) workbook and save the results to a |
| run_scenariosA | ModelRisk: Sweep a single input cell across multiple deterministic values, running a full simulation at each. Returns per-output P5 / P50 / P95 / mean for every scenario value. Useful for what-if analysis: 'what if widget cost is $50 vs $75 vs $100'. The cell's original formula is captured before the sweep and restored afterwards (even on error), so the workbook ends in its pre-call state. Each scenario takes roughly the same time as one |
| propose_distributions_for_inputsA | ModelRisk: Propose distribution families for a list of uncertain inputs. Each input gets a ranked list of recommendations from the methodology-grounded selection guide. The tool does NOT write to Excel — it returns suggestions for the LLM to walk through with the user before committing via replace_constant_with_distribution. |
| discover_inputsA | ModelRisk: Discover candidate input cells — numeric cells referenced by formulas — and rank them by how likely they are to be uncertain model inputs (vs. constants like 12 months per year). The ranking weighs reference count and number magnitude. Pair with propose_distributions_for_inputs. |
| plan_risk_modelA | ModelRisk: One-call blueprint for turning a deterministic workbook into a Monte Carlo risk model. Reports what's already there (declared outputs, existing distributions), the ranked hard-coded cells that look like uncertain inputs, and an ordered, state-aware checklist of next actions (wrap outputs, fit/propose distributions, correlate, audit, simulate, interpret). Read-only — it plans, it doesn't modify. Run this first when asked to 'add uncertainty' or 'make this a risk model'. |
| audit_modelB | ModelRisk: Run the model audit against the workbook. Each rule's detector lives in modelrisk_mcp.audit.rules; the rule set is editable in data/audit_rules.yaml. Returns an AuditReport with severity-tagged findings (error/warning/info) and suggested fixes. |
| diagnose_workbookA | ModelRisk: One-call workbook health check. Returns everything an MCP client typically wants at the start of a session: whether Excel is reachable, whether the ModelRisk SDK is activated, the active workbook's name + sheets, counts of inputs / outputs / distributions, whether a sibling |
| build_drivers_reportA | ModelRisk: Build a single-sheet drivers report — a sensitivity analysis presented for a decision-maker. Drops onto a new sheet: title band; auto-generated KEY FINDINGS in plain English ('The dominant driver of NPV is widget cost, r = -0.65; higher widget cost lowers NPV'); a prominent tornado chart; a driver-ranking table with correlation + |r| + approximate variance share; a HOW TO READ THIS CHART panel for stakeholders who don't know what Spearman correlation means; and tiered RECOMMENDED ACTIONS (focus / monitor / deprioritise) grouping inputs by strength. Use this when the user asks for an uncertainty-drivers report rather than the broader executive dashboard. |
| build_executive_reportA | ModelRisk: Build a single-sheet executive report for a decision-maker. Drops a curated dashboard onto a new sheet with: title band, headline numbers (mean / P5 / P50 / P95 / stdev — colored by volatility), histogram + cumulative chart of the primary output, tornado of top N sensitivity drivers, a stats table for the primary plus any secondary outputs, and auto-generated risk callouts framed in plain English ('90% confident X lands between A and B', 'tail risk Y% above mean', 'primary driver is Z'). Idempotent — re-running replaces the sheet. Use this when the user asks for a decision-maker-facing summary rather than raw stats. |
| create_tornado_chartA | ModelRisk: Render a tornado chart of input sensitivity for a single output as a new sheet in the workbook. The sheet has a sorted data table (Spearman rank correlation + regression coefficient per input) plus a native Excel BarClustered chart with the largest-magnitude input at the top. Idempotent — if a sheet with the target name already exists, it's replaced. Useful when the user wants the visualization persisted in the workbook, not just returned over MCP. |
| create_histogram_chartA | ModelRisk: Render a histogram of one output's simulation result distribution as a new sheet in the workbook. The sheet has a binned data table (bin centre / frequency / cumulative %) plus a native Excel chart: frequency columns with the cumulative-probability curve overlaid on a secondary % axis and the central-80% (P10-P90) band highlighted — the same view as ModelRisk's Results Viewer, persisted into the workbook. Requires a completed simulation (reads samples from the active .vmrs). Idempotent — a sheet with the target name is replaced. |
| create_cdf_chartA | ModelRisk: Render the ascending cumulative-probability curve (CDF) of one output's simulation result distribution as a new sheet in the workbook. The sheet has a binned data table plus a native Excel line chart of cumulative probability (0-100%) against the output value — the 'what's the chance the output is below X' view. Requires a completed simulation (reads samples from the active .vmrs). Idempotent — a sheet with the target name is replaced. |
| generate_executive_summaryA | ModelRisk: Generate an executive-audience summary of the most recent simulation results for a workbook. Returns markdown ready to paste into a deck/report — covers deterministic vs P50 vs mean comparisons, P80 contingency, and the top sensitivity drivers. |
| fit_all_data_and_wireA | ModelRisk: Fit BOTH the marginal distributions and the copula dependence from a data block, then wire the whole correlated, simulation-ready model into the workbook in one reversible pass. For each variable column it fits+ranks the best marginal (AIC/SIC/HQIC); across the columns it fits the best copula (fit_copula_to_data) and writes the correlated-U block at |
| build_model_from_briefA | ModelRisk: Turn a deterministic workbook into a simulation-ready Monte Carlo model in one atomic, reversible pass. Given the output cells to track and the uncertain inputs to add (each with a Vose distribution family + parameters you choose from the brief), it wraps the outputs with VoseOutput, replaces the input cells with VoseInput-wrapped distributions, optionally runs a validating simulation, and returns the headline percentiles. Every write goes through the audit-logged safe-write path and is tracked in a change-set: if any step fails, the ENTIRE build is rolled back so the workbook is never left half-converted. Defaults to dry_run=True. This end-to-end build+simulate is exactly what an advisory agent cannot do. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| add-uncertainty | Take a deterministic Excel model and add uncertainty to it. Walk the user through identifying which inputs are uncertain, choosing distributions for each, wrapping inputs/outputs, and running the simulation. |
| audit-model | Run audit_model against the active workbook, then walk the user through each finding — explain what it means, why it matters, and offer to fix it with the appropriate tool. Defaults every fix to dry_run=True so the user can preview before committing. |
| build-risk-model | Multi-turn workflow: walks the user from a deterministic question to a runnable Monte Carlo risk model. Asks about the decision, the output(s) of interest, the candidate inputs; proposes distributions; commits with confirmation; runs the simulation; interprets results. |
| import-legacy-model | Open a workbook built with another Monte Carlo add-in (notably the legacy RiskXXX(...) functions) and propose ModelRisk equivalents cell by cell. |
| interpret-results | Read the latest simulation results from the active workbook, produce a structured executive summary, then offer drill-downs into specific outputs (sensitivity, correlation, percentiles). |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| modelrisk-audit-rules | ModelRisk: the active audit-rule set as YAML. Lists every rule's id, name, severity, enabled state, description, and suggested-fix template. Editable in data/audit_rules.yaml without code changes. |
| modelrisk-distribution-guide | ModelRisk: methodology-grounded guide for choosing a distribution family given a description of the uncertain quantity. Drives propose_distributions_for_inputs. |
| modelrisk-function-catalogue | ModelRisk: full ModelRisk function catalogue (1400+ entries) as JSON. The LLM grounds every formula-writing tool against this list to prevent hallucinated function names. |
| modelrisk-knowledge-base | ModelRisk: curated risk-analysis knowledge base distilled from the ModelRisk Help (Vose Software) — why to quantify uncertainty, the two forms of uncertainty, selecting distributions (the five properties), eliciting expert opinion, modeling correlation, and modeling over time. Consult when building or critiquing a model for authoritative methodology. |
| modelrisk-methodology | ModelRisk: the 8 core methodology principles the LLM follows when building, fitting, or auditing models. Loaded into context whenever the user starts a /build-risk-model or /audit-model conversation. |
| modelrisk-workbook-current | ModelRisk: live structured summary of the active workbook — sheet names, counts of inputs/outputs/distributions/formulas/numerics. Lighter than calling list_open_workbooks + get_workbook_summary separately. |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/vosesoftware/modelrisk-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server