AgentStack MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AgentStack MCP Stress test my decision to expand to Europe under higher costs"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AgentStack MCP
One deterministic reasoning stack for AI agents — behind a single Model Context Protocol (MCP) endpoint and one API key:
simulate (ScenarioSim) → decide (DecisionMatrix) → compute (PrecisionCalc)
plus cross-domain composite tools that chain the three. Every number runs
through decimal.js at 40-digit precision
(never floats), so identical inputs always produce byte-identical output.
The server is stateless — no database, no sessions.
AgentStack bundles three standalone MCP servers so an agent installs one server, uses one key, and can run reasoning that spans all three domains. It imports the same engines directly (no HTTP proxying) — zero added latency, no cascading failure.
🌐 Live hosted server (free, no install)
https://agentstack-mcp.pages.dev/mcp{ "mcpServers": { "agentstack": {
"type": "http", "url": "https://agentstack-mcp.pages.dev/mcp" } } }Free tier: no key, 20 calls/day per IP. Paid plans (Starter $19/mo · 8,000/day,
Pro $59/mo · 80,000/day) return an API key sent as X-API-Key. One key covers
all three products and the composites — about half the cost of subscribing to them
separately. Landing page: https://agentstack-mcp.pages.dev.
Related MCP server: Sablier MCP Server
The three namespaces (24 tools)
namespace | engine | tools |
| ScenarioSim — what-if / scenario simulation |
|
| DecisionMatrix — multi-criteria decision analysis |
|
| PrecisionCalc — exact finance/business math |
|
meta | — |
|
Note on two deliberately-namespaced collisions:
sim_sensitivityvaries scenario inputs;decide_sensitivityvaries criteria weights. They are different operations — the prefix disambiguates them for the agent.
Composite tools — the reason to use the stack
Deterministic end-to-end; each chains engines that no single server bundles:
Tool | Pipeline | What it does |
| simulate → compute | Project a scenario, take a per-period cash-flow line ( |
| simulate → decide | Project each option as its own scenario, then rank the options against weighted criteria drawn from the scenario outcomes ( |
| simulate × decide | Stress one scenario assumption across every option and report how often the baseline winner survives (robustness) and where it flips. |
Composite responses report the pipeline they ran and carry each stage's
structured output, so an agent can drill into any step.
Profiles — fight tool-selection noise
Append ?profile= to the endpoint to load only a subset:
profile | tools |
| every tool (24) |
|
|
|
|
|
|
{ "mcpServers": { "agentstack": {
"url": "https://agentstack-mcp.pages.dev/mcp?profile=finance" } } }Response envelope
Namespaced tools return the exact envelope of their underlying product. Composite
tools add composite, pipeline, per-stage blocks, methodology, notes, and a
plain-language explanation. Errors are always structured data:
{ "status": "error", "error": { "type": "unknown_metric", "message": "...", "hint": "..." } }Example — plan_to_valuation (trimmed):
{
"status": "success",
"composite": "plan_to_valuation",
"pipeline": ["scenariosim.run_scenario", "precisioncalc.net_present_value", "precisioncalc.internal_rate_of_return"],
"scenario": { "template": "saas_growth", "horizon": 12, "key_results": { "ending_mrr": 26982.1 } },
"cashflow_metric": "mrr",
"cashflows": [-150000, 14040, 15600, "..."],
"valuation": { "discount_rate": 0.01, "npv": 11157.386023, "irr": 0.02504, "value_creating": true },
"explanation": "Projecting 'saas_growth' over 12 month(s) and valuing the 'mrr' stream at 1%/period gives an NPV of ..."
}Project structure
agentstack-mcp/
├── worker-src/
│ ├── index.mjs # Cloudflare Pages Function: MCP transport, namespacing, profiles, billing
│ ├── composites.mjs # the 3 cross-domain tools (simulate -> decide -> compute)
│ ├── billing.mjs # Stripe + KV: one key / one quota for the whole stack
│ └── engines/ # vendored, unmodified product engines (100% deterministic)
│ ├── scenariosim.mjs
│ ├── decisionmatrix.mjs
│ └── precisioncalc.mjs
├── server.mjs # local stdio MCP server (same engines + composites; AGENTSTACK_PROFILE env)
├── site/ # landing page + mcp.json + llms.txt + _worker.js (built)
├── tests/composites.test.mjs
├── examples/agent_example.mjs
├── scripts/sync-engines.sh # re-vendor engines from the sibling repos
├── package.json · wrangler.toml · server.json · smithery.yaml · Dockerfile · LICENSE
└── README.mdWhy vendor the engines? So this repo is self-contained and reproducible. The
engines are the same deterministic modules that power the three standalone
servers; npm run sync-engines re-copies them from the sibling repos when an
upstream change lands.
Run it locally
git clone <your-fork> agentstack-mcp && cd agentstack-mcp
npm install
npm test # composite-logic tests (no network)
npm run dev # -> http://127.0.0.1:8788/mcp
node examples/agent_example.mjs # hosted demo
node examples/agent_example.mjs http://127.0.0.1:8788
node server.mjs # dependency-light stdio server (AGENTSTACK_PROFILE=finance to subset)Quick manual call:
curl -s http://127.0.0.1:8788/mcp \
-H 'content-type: application/json' -H 'accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_capabilities","arguments":{}}}'Install via npm (stdio, no hosting)
Run the server locally over stdio with a single command — nothing to deploy:
npx -y agentstack-mcpClaude Desktop / any stdio MCP client (claude_desktop_config.json):
{ "mcpServers": { "agentstack": { "command": "npx", "args": ["-y", "agentstack-mcp"] } } }This is the same deterministic engine as the hosted server, running on your machine.
Client configuration
Cursor — ~/.cursor/mcp.json
{ "mcpServers": { "agentstack": { "url": "https://agentstack-mcp.pages.dev/mcp" } } }Claude Desktop — claude_desktop_config.json (via mcp-remote)
{ "mcpServers": { "agentstack": { "command": "npx", "args": ["-y", "mcp-remote", "https://agentstack-mcp.pages.dev/mcp"] } } }VS Code — .vscode/mcp.json
{ "servers": { "agentstack": { "type": "http", "url": "https://agentstack-mcp.pages.dev/mcp" } } }Windsurf — ~/.codeium/windsurf/mcp_config.json
{ "mcpServers": { "agentstack": { "serverUrl": "https://agentstack-mcp.pages.dev/mcp" } } }Add "headers": { "X-API-Key": "ssak_live_..." } once you have a key.
Example composite payloads
Rank growth strategies on their projected outcomes:
{ "name": "evaluate_options_with_scenarios", "arguments": {
"template": "saas_growth", "horizon": 12,
"options": [
{ "name": "Aggressive", "inputs": { "new_customers_per_period": 60, "churn_rate": 0.05 } },
{ "name": "Lean", "inputs": { "new_customers_per_period": 20, "churn_rate": 0.02 } }
],
"criteria": [
{ "metric": "ending_mrr", "weight": 3, "direction": "benefit" },
{ "metric": "total_churned_customers", "weight": 1, "direction": "cost" }
]
} }Value a plan's MRR stream:
{ "name": "plan_to_valuation", "arguments": {
"template": "saas_growth", "horizon": 12,
"inputs": { "new_customers_per_period": 60, "churn_rate": 0.05, "arpu": 60 },
"cashflow_metric": "mrr", "rate": 0.01, "initial_investment": 150000
} }Stress-test the decision:
{ "name": "stress_test_decision", "arguments": {
"template": "saas_growth", "horizon": 12,
"options": [ { "name": "Aggressive", "inputs": { "churn_rate": 0.05 } },
{ "name": "Lean", "inputs": { "churn_rate": 0.02 } } ],
"criteria": [ { "metric": "ending_mrr", "weight": 3 } ],
"stress": { "variable": "churn_rate", "variation": 0.5, "steps": 5 }
} }Deploy on Cloudflare Pages
npm install
npx wrangler login
npm run deploy # esbuild -> site/_worker.js, then wrangler pages deployRuns fully free / private with no bindings or secrets (fails open on the free
tier). For billing: bind a KV namespace AGENTSTACK_KV, set PRICE_STARTER /
PRICE_PRO in [vars], and add Stripe secrets:
wrangler pages secret put STRIPE_SECRET_KEY --project-name agentstack-mcp
wrangler pages secret put STRIPE_WEBHOOK_SECRET --project-name agentstack-mcpRoutes: /mcp (Streamable HTTP), /checkout, /success, /portal, /webhook, /metrics.
Auth & rate limiting
Enforced in worker-src/billing.mjs: identify() reads X-API-Key /
Authorization: Bearer and falls back to per-IP free tier; consumeQuota() is a
KV daily counter (the single gating point). One key / one quota spans the whole
stack. Marked NOTE (auth) / NOTE (rate limiting) seams show where to swap in
JWT/mTLS or a token-bucket. None of it touches the deterministic math.
Relationship to the standalone servers
AgentStack is additive, not a replacement. The three products keep running on their own for single-domain use:
ScenarioSim — https://scenariosim-mcp.pages.dev/mcp
DecisionMatrix — https://decisionmatrix-mcp.pages.dev/mcp
PrecisionCalc — https://precisioncalc-mcp.pages.dev/mcp
License
MIT — see LICENSE.
Available Tools
24 toolscalc_business_daysCInspect
COMPUTE. Business-day arithmetic with holidays.
Inputs: operation (required), start_date (required), days, region, +2 more.
calc_compound_growthDInspect
COMPUTE. future_value | present_value | cagr.
Inputs: operation (required), rate, years, currency, +5 more.
calc_currency_convertCInspect
COMPUTE. Convert currencies with Decimal precision.
Inputs: amount (required), to_currency (required), from_currency (required), date, +1 more.
calc_depreciationDInspect
COMPUTE. Depreciation schedule.
Inputs: cost (required), method (required), salvage_value (required), useful_life_years (required), +1 more.
calc_list_metricsBInspect
COMPUTE. List supported metrics + schemas.
Inputs: no named parameters.
calc_loan_amortizationCInspect
COMPUTE. Level-payment loan schedule.
Inputs: principal (required), annual_rate (required), term_months (required), currency, +2 more.
calc_metricCInspect
COMPUTE. Exact business/SaaS/finance metric (ltv, cac, rule_of_40, nrr, ...).
Inputs: metric (required), params (required), currency.
decideAInspect
DECIDE. Rank options against weighted criteria; returns winner, ranking, breakdowns, explanation.
Inputs: scores (required), options (required), criteria (required), method.
decide_compare_twoCInspect
DECIDE. Head-to-head between exactly two options.
Inputs: scores (required), criteria (required), method, options, +2 more.
decide_list_methodsBInspect
DECIDE. List scoring methods.
Inputs: no named parameters.
decide_scoreCInspect
DECIDE. Full normalized scored matrix + ranking.
Inputs: scores (required), options (required), criteria (required), method.
decide_sensitivityCInspect
DECIDE. Robustness of the winner to CRITERIA-WEIGHT changes.
Inputs: scores (required), options (required), criteria (required), steps, +2 more.
evaluate_options_with_scenariosCInspect
COMPOSITE (simulate -> decide). Project each option, rank the outcomes.
Inputs: options (required), criteria (required), inputs, method, +3 more.
health_checkBInspect
Aggregated health for the whole stack.
Inputs: no named parameters.
list_capabilitiesBInspect
Discovery: namespaces (sim_*, decide_*, calc_*), composite tools, and profiles.
Inputs: no named parameters.
plan_to_valuationCInspect
COMPOSITE (simulate -> compute). Project a scenario, value its cash-flow line (NPV/IRR).
Inputs: rate (required), template (required), cashflow_metric (required), inputs, +4 more.
sim_break_evenCInspect
SIMULATE. Solve for the input value that makes a metric hit a target.
Inputs: template (required), solve_for (required), target_value (required), bounds, +4 more.
sim_compareCInspect
SIMULATE. Compare 2-3 scenarios side by side.
Inputs: scenarios (required), goal, horizon, compare_metric.
sim_list_templatesAInspect
SIMULATE. List every scenario template with inputs and outputs.
Inputs: no named parameters.
sim_runCInspect
SIMULATE. Deterministic what-if projection from a template or free-form 'metrics' model.
Inputs: inputs, horizon, metrics, template, +1 more.
sim_sensitivityCInspect
SIMULATE. Vary scenario inputs and show impact on a target metric.
Inputs: template (required), steps, inputs, horizon, +5 more.
stress_test_decisionCInspect
COMPOSITE (simulate x decide). Stress a scenario assumption and see if the winner holds.
Inputs: stress (required), options (required), criteria (required), inputs, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Most tools are cleanly separated by domain prefixes (sim_, decide_, calc_) with distinct actions. However, decide and decide_score have overlapping outputs, and calc_metric overlaps conceptually with specific calc_npv and calc_irr tools, creating potential confusion.
Domain prefixes give structure, but the suffixes mix verbs and nouns inconsistently (sim_run vs sim_sensitivity, calc_metric vs calc_list_metrics). Composite tools use a completely different naming style, breaking the pattern.
At 24 tools, the server is on the heavy side, but the three domains each justify several tools. Some redundancy (decide vs decide_score) could reduce the count, making it borderline.
Core workflows for simulation, decision, and calculation are well covered, including composite tools that span domains. Minor gaps exist, such as no way to create or edit scenario templates and no persistence for decisions, but these are not critical.
Maintenance
Related MCP Connectors
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Production MCP server for US equity and options intelligence: real-time IV radar, Monte Carlo simulation, options pressure, strategy backtesting, AI prediction, pre-trade risk analysis, and automated stock research reports.
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
Deterministic what-if & scenario simulation for AI agents: projections, sensitivity & break-even.
Related MCP Servers
AlicenseNot gradedqualityBmaintenanceDeterministic decision engine with DAG-based receipts. Build entity graphs, query with MCP, get auditable proof.18Apache 2.0
Sablier MCP Serverofficial
AlicenseAqualityDmaintenanceAn MCP server that lets AI assistants analyze portfolios, stress-test scenarios, generate synthetic market paths, and scan SEC filings — in under 2 minutes.833MIT- AlicenseNot gradedqualityDmaintenanceAgent-to-agent reasoning-as-a-service providing structured reasoning, data analysis, decision support, and code/document review via REST API and MCP protocol.MIT
- AlicenseAqualityCmaintenanceAn MCP server that provides deterministic, high-precision business, finance, and operational calculations such as SaaS metrics, currency conversion, business days, and financial formulas, returning structured JSON results.1141 npmMIT