DEV Community

DatanestDigital
DatanestDigital

Posted on • Originally published at scenariosim-mcp.pages.dev

ScenarioSim MCP: a deterministic what-if & scenario simulation engine for AI agents

The third in a suite of deterministic MCP servers for AI agents — after PrecisionCalc MCP (high-precision finance math) and DecisionMatrix MCP (multi-criteria decision analysis).

The problem

Ask an LLM to "project 12 months of SaaS growth at 3% churn" and it will happily produce a table of numbers. Ask it twice and you'll get two different tables. Compounding, churn, elasticity, break-even — these are exactly the kind of multi-period arithmetic that language models drift on, and they can't show their work.

ScenarioSim MCP offloads that to an exact, explainable engine. Your agent hands over assumptions; it gets back projections over time, sensitivity analysis, and break-even solving — every number computed with 40-digit decimal precision, so identical inputs always produce byte-identical output.

Connect (free, no install)

It runs as a remote MCP server on Cloudflare's edge over Streamable HTTP:

{ "mcpServers": { "scenariosim": {
    "type": "http", "url": "https://scenariosim-mcp.pages.dev/mcp" } } }
Enter fullscreen mode Exit fullscreen mode

Free tier is 20 calls/day with no API key. Works in Cursor, Claude Desktop (via mcp-remote), VS Code, Windsurf, and any Streamable-HTTP client.

Six tools

  • run_scenario — the main tool: project a template or a free-form model over time → per-period projections, headline key results, the exact assumptions used, methodology, and a plain-language explanation.
  • sensitivity_analysis — vary one or more inputs and see the impact on a target metric, with an elasticity estimate and a "most influential" ranking.
  • break_even — solve for the input value that makes a metric hit a target (deterministic bisection).
  • compare_scenarios — run 2–3 scenarios side by side with deltas and an optional winner.
  • list_templates / health_check — discovery + status.

Nine templates (plus a free-form model)

saas_growth, pricing_change, churn_impact, cost_reduction, hiring_plan, cash_runway, unit_economics, marketing_funnel, compound_growth — or bring your own metrics array for anything else.

Example: solve for the churn you can tolerate

{ "name": "break_even", "arguments": {
  "template": "churn_impact",
  "inputs": { "starting_customers": 1000, "new_customers_per_period": 0 },
  "solve_for": "churn_rate", "target_metric": "retention_pct",
  "target_value": 0.9, "horizon": 12
} }
Enter fullscreen mode Exit fullscreen mode

"To reach retention_pct = 0.9, 'churn_rate' must be 0.008742 (a change of -0.041258 from the baseline 0.05)."

Roughly 0.87%/month churn to keep 90% of customers over a year — solved exactly, with the residual reported.

Why deterministic matters for agents

Every response is one consistent JSON envelope — status, key_results, projections, assumptions_used, methodology, notes, explanation — and errors come back as structured, actionable data ({type, message, hint}), never raw exceptions. That's what lets an agent reliably parse and act on the result instead of re-reading a prose paragraph.

The engine is pure and stateless: no database, no sessions, no clocks, no randomness. Self-host it on Cloudflare Pages, Node, Deno, or Bun in one command.

Open source

If your agents make plans, give them a calculator that never drifts. Feedback welcome.

Top comments (0)