mcpField
L
ledger

ledger

Local
github.com/eternal-romanFinance1Updated 4w ago

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

  1. 01Exact-decimal calculations
  2. 02Entry validation and posting
  3. 03Account and trial balances
  4. 04Audit hashes and determinism checks
  5. 05Closing, depreciation, and cash flow tools
  6. 06External position reconciliation

Use cases

  1. 01Calculate and validate accounting entries
  2. 02Check account balances and the accounting equation
  3. 03Prepare closing, depreciation, or cash flow data
  4. 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.

mcp.json · Universal config
{
"mcpServers": {
"eternal-roman-ledger": {
"command": "npx",
"args": [
"-y",
"@eternal-roman/ledger-mcp"
]
}
}
}
Run commandnpx -y @eternal-roman/ledger-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@eternal-roman/ledger-mcp0.19.1

Tools

20

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
aobjectYes
a.amountstringYesExact decimal string, never a float literal
a.currencystringYes
banyNoSecond operand for add/sub/compare
openumYesadd | sub | mul | div | allocate | convert | compare | negate | abs
rateobjectNoFX rate for convert
rate.tostringYes
rate.fromstringYes
rate.ratestringYes
ratiosarrayNoRatios for allocate
scalarstringNoScalar for mul/div, as a decimal string
roundingModeenumNoRounding 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

ToolUse when
money_computeAny arithmetic (add/sub/mul/div/allocate/convert/compare)
entry_validateBefore posting
ledger_postValidate then apply; fail-closed
ledger_balanceOne account (pass currency if mixed)
ledger_trial_balanceEvery account
ledger_verify_equationAssets + Expenses = Liabilities + Equity + Income
ledger_audit_hashTamper-evident digest (ledger-audit-v2)
ledger_verify_determinismRebuild twice; byte-identical
trace_runReplay with per-step checkpoints
cite_lookupIFRS/GAAP from the graph
artifact_makeProof bundle; hash must be session-issued or recomputable
periods_create_lockCreate a hard-close lock
periods_guarded_postPost, rejected if the period is locked
closing_generate_entriesIncome/Expense → RE
fx_compute_translationReporting currency + CTA
depreciation_build_scheduleStraight-line or declining
cashflow_statementDirect method from cash accounts
reconcile_positionsLedger vs external snapshot
portfolio_reliefFIFO/LIFO/HIFO lots
settlement_build_entriesTrade 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

Markdown supported

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.