Back to Browse

Agentstack MCP Server

by Inity13
Developer ToolsModerate5.7MCP RegistryLocalRemote
Free

Server data from the Official MCP Registry

Deterministic reasoning stack for AI agents: simulate, decide & compute, plus cross-domain tools.

About

Deterministic reasoning stack for AI agents: simulate, decide & compute, plus cross-domain tools.

Remote endpoints: streamable-http: https://agentstack-mcp.pages.dev/mcp

Security Report

5.7
Moderate5.7Moderate Risk

AgentStack MCP is a deterministic financial reasoning server with generally sound architecture and security practices. Authentication via API keys and rate limiting are properly implemented via Stripe/KV integration. Input validation is thorough, and the codebase avoids dangerous patterns like unsanitized exec/eval. Minor concerns include broad exception handling, some logging patterns that could expose sensitive data, and reliance on external Stripe/KV secrets management, but these do not pose critical vulnerabilities. Supply chain analysis found 2 known vulnerabilities in dependencies (0 critical, 1 high severity).

3 files analyzed · 9 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

HTTP Network Access

Connects to external APIs or services over the internet.

env_vars

Check that this permission is expected for this type of plugin.

File System Read

Reads files on your machine. Normal for tools that analyze or process local data.

process_spawn

Check that this permission is expected for this type of plugin.

How to Install & Connect

Available as Local & Remote

This plugin can run on your machine or connect to a hosted endpoint. during install.

Documentation

View on GitHub

From the project's GitHub README.

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.


The three namespaces (24 tools)

namespaceenginetools
sim_*ScenarioSim — what-if / scenario simulationsim_run, sim_sensitivity, sim_break_even, sim_compare, sim_list_templates
decide_*DecisionMatrix — multi-criteria decision analysisdecide, decide_score, decide_sensitivity, decide_compare_two, decide_list_methods
calc_*PrecisionCalc — exact finance/business mathcalc_metric, calc_list_metrics, calc_currency_convert, calc_business_days, calc_compound_growth, calc_npv, calc_irr, calc_loan_amortization, calc_depreciation
metalist_capabilities, health_check

Note on two deliberately-namespaced collisions: sim_sensitivity varies scenario inputs; decide_sensitivity varies 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:

ToolPipelineWhat it does
plan_to_valuationsimulate → computeProject a scenario, take a per-period cash-flow line (cashflow_metric), and value it: NPV at a discount rate, IRR, undiscounted total. initial_investment becomes the period-0 outflow (needed for IRR).
evaluate_options_with_scenariossimulate → decideProject each option as its own scenario, then rank the options against weighted criteria drawn from the scenario outcomes (key_results).
stress_test_decisionsimulate × decideStress 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:

profiletools
all (default)every tool (24)
financecalc_* + plan_to_valuation + meta
decisiondecide_* + evaluate_options_with_scenarios + stress_test_decision + meta
simulationsim_* + all composites + meta
{ "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.md

Why 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":{}}}'

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 deploy

Runs 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-mcp

Routes: /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:

License

MIT — see LICENSE.

Reviews

No reviews yet

Be the first to review this server!