Finance Toolkit
500+ transparent financial methods calculated from raw statements, not third-party endpoints.
作者提供的说明(英文原文)
High-precision finance & business calculations for AI agents — exact decimals, never floats.
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
适用于网页版、桌面版和手机版 Claude:
https://precisioncalc-mcp.pages.dev/mcp打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"precisioncalc": {
"command": "npx",
"args": [
"-y",
"precisioncalc-mcp"
]
}
}
}在终端中运行这条命令
claude mcp add --transport http precisioncalc https://precisioncalc-mcp.pages.dev/mcpclaude mcp add precisioncalc -- npx -y precisioncalc-mcp粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"precisioncalc": {
"url": "https://precisioncalc-mcp.pages.dev/mcp"
}
}
}粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"precisioncalc": {
"command": "npx",
"args": [
"-y",
"precisioncalc-mcp"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"precisioncalc": {
"type": "http",
"url": "https://precisioncalc-mcp.pages.dev/mcp"
}
}
}粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"precisioncalc": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"precisioncalc-mcp"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
ChatGPT 只能连接互联网上的服务器:
https://precisioncalc-mcp.pages.dev/mcp菜单名称可能因套餐和版本不同而略有差异。
你的选择通过 Cookie 保存在这台设备上,无需账户。
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
我们还没有读取这个服务器的工具列表;我们会轮流检查各个端点。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日
注册名称已通过 GitHub 账户 inity13 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
尚未检查;我们会轮流检查各个端点
尚未检查;我们会轮流检查各个端点
尚未检查;我们会在检查端点时读取工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
两种方式都可以:安装在你的电脑上,或者连接云端版本。
GitHub 仓库最后更新于–,最新版本(2.1.1)于3个月前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。它通过 URL 连接,所以接受远程 MCP 服务器的应用也可以使用,例如开启开发者模式的 ChatGPT。
同一分类中有:Finance Toolkit, SolidInvoice, Korea Tax Calculator
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
500+ transparent financial methods calculated from raw statements, not third-party endpoints.
Create and send invoices and quotes, manage clients, and track payments in SolidInvoice.
Korean tax calculation and tax-audit judgment MCP: 96 tools with statutory citations.
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
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:
https://precisioncalc-mcp.pages.dev/mcp
Run the server locally over stdio with a single command — nothing to deploy:
npx -y precisioncalc-mcp
Claude Desktop / any stdio MCP client (claude_desktop_config.json):
{ "mcpServers": { "precisioncalc": { "command": "npx", "args": ["-y", "precisioncalc-mcp"] } } }
This is the same deterministic engine as the hosted server, running on your machine.
{ "mcpServers": { "precisioncalc": {
"type": "http", "url": "https://precisioncalc-mcp.pages.dev/mcp" } } }
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: (or Authorization: Bearer ). 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:
npm install # decimal.js + esbuild
npm run deploy # bundles worker-src -> site/_worker.js and deploys to Pages
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:
{
"status": "success", "value": "1600", // exact, full-precision (string for money/rates) "formatted_value": "$1,600.00", // human-readable "formula": "LTV = (ARPU * gross_margin) / churn_rate", "inputs_used": { "arpu": "100", "gross_margin": "0.8", "churn_rate": "0.05" }, "unit": "USD", "notes": ["LTV = (ARPU x gross_margin) / churn_rate.", "..."] }
Error (never raised across the tool boundary):
{
"status": "error", "error": { "type": "missing_parameter", "message": "Missing required parameter 'churn_rate'.", "hint": "Include 'churn_rate' in params. See list_metrics for the full schema." } }
precisioncalc-mcp/
├── server.py # MCP server: tool definitions + transports ├── security.py # API-key auth + token-bucket rate limit + metering (ASGI) ├── observability.py # Structured JSON logging + optional OpenTelemetry ├── requirements.txt / pyproject.toml ├── Dockerfile / .dockerignore ├── fly.toml / render.yaml # One-click hosting configs ├── .env.example ├── calculations/ │ ├── _util.py # Decimal coercion, validation, formatting │ ├── metrics.py # 14 business/SaaS metrics + catalog │ ├── currency.py # FX: static + Frankfurter (live/historical) providers │ ├── business_days.py # Region-aware holidays (built-in + holidays lib) │ ├── growth.py # FV / PV / CAGR │ └── finance.py # NPV / IRR / loan amortization / depreciation ├── schemas/responses.py # Response envelope helpers ├── examples/agent_example.py # End-to-end MCP client demo ├── site/ # Static landing/docs page (Cloudflare Pages) └── tests/ # 49 unit tests + Hypothesis property tests
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.
cd precisioncalc-mcp
python -m venv .venv && source .venv/bin/activate pip install -r requirements.txt # or: pip install -e ".[all]"
python server.py # or: precisioncalc-mcp (console entrypoint)
python server.py http PRECISIONCALC_API_KEYS=key1,key2 PRECISIONCALC_FX_PROVIDER=frankfurter python server.py http
Demo + tests:
python examples/agent_example.py # live end-to-end over stdio
python tests/test_calculations.py # 28 core tests (no pytest needed) python tests/test_v2.py # 17 v2 tests python tests/test_properties.py # Hypothesis property tests
{ "mcpServers": { "precisioncalc": {
"command": "python", "args": ["/absolute/path/to/precisioncalc-mcp/server.py"] } } }
docker build -t precisioncalc-mcp .
docker run --rm -p 8000:8000 -e PRECISIONCALC_API_KEYS=your-key precisioncalc-mcp docker run --rm -i precisioncalc-mcp python server.py stdio
fly launch --no-deploy
fly secrets set PRECISIONCALC_API_KEYS=key1,key2 fly deploy
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 |
currency_convert(amount, from_currency, to_currency, date=None, live=None)USD, EUR, GBP, JPY, CAD, AUD, CHF, CNY, INR. date (YYYY-MM-DD) or live=true uses live/historical ECB rates (frankfurter.app), with automatic static fallback on any network failure. Returns rate, provider, is_live, and timestamps.
business_days(operation, start_date, days=None, end_date=None, region="US", custom_holidays=None)operation: add_business_days | count_business_days (inclusive) | next_business_day | previous_business_day. region: US | UK | EU | NONE, or any ISO country code when the holidays package is installed (DE, FR, CA, AU, JP, IN, ...).
compound_growth(operation, rate, years, present_value, future_value, begin_value, end_value, compounding="annually", currency="USD")operation: future_value | present_value | cagr. compounding: daily | weekly | monthly | quarterly | semiannually | annually | continuous.
net_present_value(rate, cashflows, currency="USD")NPV = Σ CFₜ/(1+rate)ᵗ. cashflows[0] = period 0 (usually the negative outlay).
internal_rate_of_return(cashflows, guess=0.1)Per-period rate where NPV = 0. Requires a sign change in the cashflows.
loan_amortization(principal, annual_rate, term_months, extra_payment=0, currency="USD", include_schedule=false)Returns monthly payment, months-to-payoff, total interest, total paid, and (optionally) the full month-by-month schedule.
depreciation(method, cost, salvage_value, useful_life_years, currency="USD")method: straight_line | declining_balance | sum_of_years_digits. Returns the full yearly schedule; book value converges to salvage_value.
batch_calculate(calls)calls: list of {"tool": , "arguments": {...}} (max 100). One item failing never aborts the batch.
list_metrics() / health_check()Discovery + status. No parameters.
{ "name": "calculate_metric",
"arguments": { "me
只显示了开头部分;其余内容请在仓库中阅读