About ledger
ledger is an MCP adapter for `@eternal-roman/ledger`, exposing deterministic tools for exact-decimal double-entry accounting. It is intended for agents that need reliable financial calculations and audit workflows, with validation, closing, and reporting capabilities.
Key features
- 01Exact-decimal calculations
- 02Entry validation and posting
- 03Account and trial balances
- 04Audit hashes and determinism checks
- 05Closing, depreciation, and cash flow tools
- 06External position reconciliation
Use cases
- 01Calculate and validate accounting entries
- 02Check account balances and the accounting equation
- 03Prepare closing, depreciation, or cash flow data
- 04Compare a ledger with an external position snapshot
MCP support
As a stdio MCP adapter, it exposes `@eternal-roman/ledger` tools, resources, and prompts to MCP hosts. At startup, clients can read the accounting rules, workflow, and tool catalog resources.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
20Saved tool list · updated 2w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| a | object | Yes | |
| a.amount | string | Yes | Exact decimal string, never a float literal |
| a.currency | string | Yes | |
| b | any | No | Second operand for add/sub/compare |
| op | enum | Yes | add | sub | mul | div | allocate | convert | compare | negate | abs |
| rate | object | No | FX rate for convert |
| rate.to | string | Yes | |
| rate.from | string | Yes | |
| rate.rate | string | Yes | |
| ratios | array | No | Ratios for allocate |
| scalar | string | No | Scalar for mul/div, as a decimal string |
| roundingMode | enum | No | Rounding for mul/div/convertHALF_UP |
Details
From the project README@eternal-roman/ledger-mcp
MCP adapter for @eternal-roman/ledger. The kernel does the math. This process exposes it over stdio.
Agents must not compute money in tokens. Call these tools instead.
Run
npx -y @eternal-roman/ledger-mcp
{
"mcpServers": {
"ledger": {
"command": "npx",
"args": ["-y", "@eternal-roman/ledger-mcp"]
}
}
}
Same shape in Cursor, Windsurf, and other stdio MCP hosts.
On start, read ledger://canon/rules, then ledger://canon/workflow. Catalog: ledger://tools/catalog.
Tools
| Tool | Use when |
|---|---|
money_compute | Any arithmetic (add/sub/mul/div/allocate/convert/compare) |
entry_validate | Before posting |
ledger_post | Validate then apply; fail-closed |
ledger_balance | One account (pass currency if mixed) |
ledger_trial_balance | Every account |
ledger_verify_equation | Assets + Expenses = Liabilities + Equity + Income |
ledger_audit_hash | Tamper-evident digest (ledger-audit-v2) |
ledger_verify_determinism | Rebuild twice; byte-identical |
trace_run | Replay with per-step checkpoints |
cite_lookup | IFRS/GAAP from the graph |
artifact_make | Proof bundle; hash must be session-issued or recomputable |
periods_create_lock | Create a hard-close lock |
periods_guarded_post | Post, rejected if the period is locked |
closing_generate_entries | Income/Expense → RE |
fx_compute_translation | Reporting currency + CTA |
depreciation_build_schedule | Straight-line or declining |
cashflow_statement | Direct method from cash accounts |
reconcile_positions | Ledger vs external snapshot |
portfolio_relief | FIFO/LIFO/HIFO lots |
settlement_build_entries | Trade date vs T+N |
Stateless: ledger JSON in, ledger JSON out. Prompts: post_entry, audit_ledger, cite_treatment.
Not advice
Deterministic tools only. You own inputs, jurisdiction, and compliance. MIT LICENSE.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.