High-precision finance & business calculations for AI agents โ exact decimals, never floats.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag โ we're steadily working through the catalog.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A deterministic Model Context Protocol (MCP) server that gives LLM agents reliable, high-precision business, finance, and operational calculations.
LLMs routinely lose precision or hallucinate on multi-step financial formulas,
currency conversions, business-day logic, and growth math. PrecisionCalc offloads
that work to exact, transparent tools. Every monetary/financial value is computed
with Python's decimal module (never floats), and every result is returned in
a consistent, agent-parseable JSON envelope that includes the exact value, a
human-readable value, the formula applied, the inputs used, the unit, and
any assumptions/warnings.
v2 highlights: live + historical FX (ECB), 14 SaaS metrics, NPV/IRR, loan amortization, depreciation, a
batch_calculatetool, per-country holidays, API-key auth + rate limiting + usage metering on the HTTP transport, structured JSON logging, optional OpenTelemetry tracing, and property-based tests.
A public remote MCP server runs on Cloudflare's edge โ point any Streamable-HTTP MCP client at it:
Run the server locally over stdio with a single command โ nothing to deploy:
Claude Desktop / any stdio MCP client (claude_desktop_config.json):
This is the same deterministic engine as the hosted server, running on your machine.
The edge build (worker-src/) is a Cloudflare Pages Function that mirrors the
Python engine using decimal.js โ verified 17/17 exact output parity. Landing
page + docs: https://precisioncalc-mcp.pages.dev.
| Plan | Price | Daily calls | Live/historical FX | batch_calculate |
|---|---|---|---|---|
| Free (no key) | $0 | 15 / day (per IP) | โ static only | โ |
| Starter | $12/mo | 5,000 / day | โ | โ |
| Pro | $39/mo | 50,000 / day | โ | โ |
Checkout is Stripe (subscription). On success you get an API key instantly; send it as
X-API-Key: <key> (or Authorization: Bearer <key>). Manage/cancel at /portal.
When a limit is hit, tools return a structured status:"error" envelope with type,
usage, and an upgrade block containing checkout URLs โ so an agent can surface the
paywall to the user and act on it. Self-host (below) for unlimited calls with your own keys.
Billing internals live in worker-src/billing.mjs (Stripe REST + Cloudflare KV for keys
and daily counters). Server env: STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET,
PRICE_STARTER, PRICE_PRO, FREE_DAILY, STARTER_DAILY, PRO_DAILY, and a
PRECISIONCALC_KV namespace binding (see wrangler.toml).
Rebuild/redeploy the edge server:
11 tools, all returning a uniform structured response:
| Tool | Purpose |
|---|---|
calculate_metric | 14 SaaS/business metrics (LTV, CAC, churn, MRR growth, NRR, GRR, Rule of 40, magic number, break-even, ...) |
currency_convert | Convert 9 major currencies; static (offline) or live/historical ECB rates |
business_days | Add/count business days, next/previous; US/UK/EU + any ISO country + custom holidays |
compound_growth | Future value, present value, CAGR; 7 compounding frequencies incl. continuous |
net_present_value | NPV / discounted cash flow of a cashflow series |
internal_rate_of_return | IRR (Newton + bisection fallback) |
loan_amortization | Level-payment loan: payment, totals, full schedule, extra-payment payoff |
depreciation | straight-line / declining-balance / sum-of-years-digits schedules |
batch_calculate | Run many calculations in one request |
list_metrics | Discovery: every metric with descriptions + required params |
health_check | Server status, version, capabilities |
Success:
Error (never raised across the tool boundary):
mcp, python-dateutiluvicorn + starlette (HTTP transport), holidays (per-country calendars)opentelemetry-sdk (tracing), pytest + hypothesis (tests)The server auto-detects the SDK layout and works with mcp >= 2.0
(MCPServer), mcp 1.x (FastMCP), or the standalone fastmcp package.
Demo + tests:
Push to GitHub, then New + โ Blueprint and point at the repo (render.yaml).
Set PRECISIONCALC_API_KEYS as a secret in the dashboard.
| Var | Default | Purpose |
|---|---|---|
PRECISIONCALC_HOST / PRECISIONCALC_PORT | 127.0.0.1 / 8000 | HTTP bind |
PRECISIONCALC_API_KEYS | (empty) | Comma-separated keys. Empty = open mode (still metered/limited by IP) |
PRECISIONCALC_RATE_LIMIT_PER_MIN / _BURST | 120 / 40 | Token-bucket limits |
PRECISIONCALC_METRICS_PATH | /metrics | Usage-metrics endpoint |
PRECISIONCALC_FX_PROVIDER | static | static or frankfurter (live/historical ECB) |
PRECISIONCALC_FX_TTL / _TIMEOUT | 3600 / 4 | FX cache TTL / HTTP timeout (s) |
PRECISIONCALC_LOG_LEVEL / _LOG_JSON | INFO / 1 | Logging |
PRECISIONCALC_OTEL | 0 | 1 enables OpenTelemetry tracing if SDK present |
calculate_metric(metric, params, currency="USD")Rates/margins are decimals (0.05 = 5%).
| metric | params | unit |
|---|---|---|
ltv | arpu, churn_rate, gross_margin(=1) | currency |
cac | total_spend, new_customers | currency |
ltv_cac_ratio | ltv, cac | ratio |
payback_period_months | cac, monthly_revenue_per_customer, gross_margin(=1) | months |
contribution_margin | revenue, variable_costs | currency |
gross_margin | revenue, cogs | percent |
churn_rate | customers_lost, customers_at_start | percent |
mrr_growth_rate | beginning_mrr, ending_mrr | percent |
arr | mrr | currency |
break_even_units | fixed_costs, price_per_unit, variable_cost_per_unit | units |
nrr | starting_mrr, expansion_mrr, contraction_mrr, churned_mrr | percent |
grr | starting_mrr, contraction_mrr, churned_mrr | percent |
rule_of_40 | growth_rate, profit_margin | percent |
magic_number | current_quarter_revenue, prior_quarter_revenue, prior_quarter_sm_spend | ratio |
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/precisioncalc-mcp)<a href="https://allmcps.com/mcp/precisioncalc-mcp"><img src="https://allmcps.com/api/badge/precisioncalc-mcp?style=directory" alt="Precisioncalc MCP on AllMCPs" /></a>