ledger-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., "@ledger-mcprecord a $10,000 owner capital contribution on 2026-06-21"
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.
Ledger
Money.from · validateEntry · Ledger.apply. Invalid entries are rejected, never posted.
For agents
Do not add, split, convert, or balance amounts yourself. Call the kernel.
npx -y @eternal-roman/ledger-mcp{
"mcpServers": {
"ledger": { "command": "npx", "args": ["-y", "@eternal-roman/ledger-mcp"] }
}
}Then:
Read
ledger://canon/rulesandledger://canon/workflow.Compute with
money_compute. Validate withentry_validate. Post withledger_post.Prove with
ledger_verify_equation+ledger_audit_hash. Never invent an audit hash.Ground treatments with
cite_lookup. Bundle proof withartifact_make.
Rules live in AGENTS.md. Protocol: docs/CORE-PROTOCOL.md. Machine index: llms.txt. Full tool list: mcp/.
Host plugins (Grok and compatible) load /ledger-verify, /ledger-audit, /ledger-cite, /ledger-reconcile, /ledger-sim, /ledger-review from this repo. Copy AGENTS.md or skills/ledger/SKILL.md if the host has no plugin loader.
Related MCP server: ledger-mcp
Why this exists
Token-level arithmetic is indifferent to scale, balance, and currency. The kernel is not.
Failure | Kernel |
Float drift / sub-scale |
|
Unbalanced entry |
|
Silent currency mix | Per-currency; FX must be explicit |
Tamper / non-repro | SHA-256 |
Ungrounded treatment | Starter IFRS/GAAP graph via |
Exact money | Double-entry | Immutable + audit hash | Deterministic | No DB | Agent / MCP | |
Ledger | yes | kernel | yes | yes | yes | yes |
dinero.js | yes | — | — | — | yes | — |
medici | partial | yes | — | — | MongoDB | — |
Formance / TigerBeetle | yes | yes | yes | partial | service | — |
Install (library)
npm install @eternal-roman/ledgerimport { Money, Account, AccountType, createBalancedEntry, emptyLedger, validateEntry } from '@eternal-roman/ledger';
const cash = new Account('1000', 'Cash', AccountType.Asset);
const equity = new Account('3000', 'Owner Equity', AccountType.Equity);
const contribution = createBalancedEntry(
'cap-001', '2026-06-21', cash, equity,
Money.from('10000', 'USD'), 'Initial capital'
);
if (!validateEntry(contribution).ok) throw new Error('Invariant violation');
const ledger = emptyLedger().apply(contribution).ledger;
ledger.balance(cash).toString(); // "10000.00 USD"ESM and CommonJS. Kernel-only import: @eternal-roman/ledger/core.
Mechanical check (no LLM):
npx ledger-verify --scan .
npx ledger-verify --prove entries.jsonLayers on the kernel
All of these emit validated JournalEntrys. None reimplement money.
Trading / custody —
fillToEntries, deposits, withdrawals, taker/maker feesPortfolio — FIFO/LIFO/HIFO lots, realized/unrealized P&L,
valuePortfolioInvesting — time- and money-weighted returns, allocation,
planRebalanceCrypto transfers — one-shot or two-phase in-transit + network fees
IFRS 16 lessee — PV liability, ROU, full schedule, golden-master to the cent
Close / FX / depreciation / cash flow / reconcile — period locks, CTA, schedules, direct-method cash flow
Asset scales (BTC=8, ETH=18, …) are installed with installAssetScales(defaultAssetRegistry()). Fiat is unchanged. See examples/.
Verify
npm test
npm run verify # determinism harness
npm run verify:full # build + typecheck + tests + versions + MCP smoke
npm run eval # unguarded vs kernel benchmarkDocs
Doc | For |
Agent contract | |
Machine-readable map | |
Zero-Skip protocol | |
Pre-ship checklist | |
What the kernel rejects | |
What ships today | |
MCP tools, resources, prompts | |
Developing this repo |
Python kernel port: reference-implementations/python/ (same invariants; install an asset-scale resolver for non-fiat).
License
MIT. See LICENSE.
Disclaimer
Deterministic primitives and verification tools. Not financial, tax, legal, or accounting advice. You are responsible for inputs, assumptions, rates, jurisdiction, and compliance. Tests and benchmarks are due diligence, not a certification. See LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Deterministic signed verification of numeric & financial claims for AI agents & spreadsheets.
High-precision finance & business calculations for AI agents — exact decimals, never floats.
Agent-native double-entry accounting ledger with x402 micropayments
Open-source AI accounting skills verified by licensed accountants (tax, VAT, payroll).
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI agents to interact with a double-entry ledger, offering tools for account management, balanced journal entries, balance queries, trial balance, and penny-perfect allocation. Built with safety by construction: no update/delete tools, idempotent posting, and an append-only journal.7MIT
- FlicenseAqualityBmaintenanceEnables AI agents to create accounts, record balanced double-entry transactions, query balances, and reconcile accounts against a SQLite-backed ledger through four MCP tools.4-
- AlicenseBqualityAmaintenanceEnables AI assistants to query and manage self-hosted accounting data—invoices, balances, and books—through natural language, with read-only tools by default and optional scoped write operations.3048 PyPIAGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to operate a self-hosted financial platform over MCP, managing books, expenses, revenues, settlements, payments, accounts, categories, transfers, positions, and cash flow with idempotent and audited writes.MIT