MCP.Market

Ledger MCP server

by eternal-roman·io.github.eternal-roman/ledger·v0.19.1·1 stars

Exact-decimal double-entry for agents. Call MCP tools; do not do money math in tokens.

A92/100grade A
What users say
No reviews yet
Be the first
Safety scan
A92/100

full report

Adoption
Growing

1 stars64 downloads/wk

Reviews

Write one

Nobody has reviewed Ledger yet.

If you have run it, two minutes of your experience saves the next person an afternoon.

Ledger tools (20, 5 write)

write = sends, deletes, buys or posts

Read from the package source without running it. The installed server may list more.

  • artifact_make

    Assemble a Canonical Financial Artifact (scope, assumptions, citations, kernel plan, proof, reproducibility, auditHash) \u2014 the structured proof bundle a financial answer should carry. Every field is required and auditHash is verified, not just format-checked: it must be a digest a kernel call (ledger_post / ledger_audit_hash / ledger_verify_determinism / trace_run) actually returned in this se

  • cashflow_statement

    Derive an exact direct-method cash flow statement from a serialized ledger: operating / investing / financing flows per currency, with opening and closing cash. Cash accounts are detected by convention (Asset codes starting CASH or names containing "cash") unless cashAccountCodes is supplied. Self-checks that opening + netChange === closing. Kernel verified.

  • cite_lookup

    Retrieve matching IFRS/GAAP facts and citations from the kernel knowledge graph for a query (e.g. "revenue recognition", "lease", "cost basis"). Use to ground claims in canon rather than asserting from memory.

  • closing_generate_entries

    Given a (serialized) ledger snapshot and close date, returns balanced JournalEntry[] that close Income/Expense to RE using the kernel. All entries are pre-validated. Kernel verified.

  • depreciation_build_schedule

    Exact straight-line (allocate) or declining balance schedule. Input cost/salvage/life/method. Returns periods with exact Money amounts as strings. Kernel-allocate based.

  • entry_validatewrite action

    Run the kernel invariant check on a proposed journal entry: balanced debits=credits per currency, >=2 lines, positive amounts, no sub-scale precision, valid ISO date, no silent currency mix. Returns { ok, violations[] }. Always validate before posting.

  • fx_compute_translation

    Translate ledger balances at asOf using provided rates into reportingCurrency. Returns holdings, translated totals, and the exact CTA plug amount. Always kernel-verified for balance.

  • ledger_audit_hash

    Compute the tamper-evident SHA-256 audit-hash chain for a serialized ledger. Any change to any field or line ordering yields a different hash.

  • ledger_balance

    Net balance for an account in a serialized ledger, per its normal balance side. Pass "currency" for multi-currency accounts (otherwise fails closed). Returns all currencies via balancesByCurrency too.

  • ledger_postwrite action

    Validate and apply a journal entry to a (serialized) ledger, returning the new ledger JSON plus its audit hash. The kernel refuses unbalanced state: an invalid entry is NOT posted and its violations are returned instead. Omit "ledger" to start from empty.

  • ledger_trial_balance

    Every account in a serialized ledger with its current net balance (one row per currency).

  • ledger_verify_determinism

    Rebuild a serialized ledger twice and confirm the two runs are byte-for-byte identical via their audit hashes AND that the fundamental equation holds. Returns { ok, hash }.

  • ledger_verify_equation

    Verify Assets + Expenses = Liabilities + Equity + Income (per currency) holds for a serialized ledger. Returns { balanced }.

  • money_compute

    Perform EXACT decimal money arithmetic with the kernel (decimal.js, never floats). Use this for every monetary calculation instead of computing in your own tokens. Ops: add, sub (same currency), mul, div (money x scalar), allocate (split by ratios, remainder to last), convert (via FX rate), compare.

  • periods_create_lockwrite action

    Create an immutable PeriodLock fact for use with guarded posting. effectiveDate <= lockDate will be rejected.

  • periods_guarded_postwrite action

    Like ledger_post but rejects entries whose effectiveDate falls on or before any provided period lock. Returns the same shape. Always kernel-verified.

  • portfolio_relief

    Reconstruct open lots and realized disposals for an asset from the ledger using FIFO / LIFO / HIFO, with exact cost basis. Each disposal is broken down per consumed lot and classified short vs long term by holding days (default threshold 365). Fails closed on oversell. Kernel verified.

  • reconcile_positions

    Compare ledger-derived balances against an external snapshot (exchange/custodian/bank), matched by account code AND currency. Returns per-account status (matched / mismatch / missing_in_ledger / missing_in_external) with exact diffs and an overall reconciled flag. Kernel verified.

  • settlement_build_entries

    Split a fill into trade-date entries (asset moves; cash booked as a settlement receivable on a sell / payable on a buy) and settlement-date entries (the receivable/payable is swapped for cash). All entries are kernel-validated and balanced. Returns both entry sets as JSON. Kernel verified.

  • trace_runwrite action

    Replay a sequence of journal entries on a fresh ledger, capturing balances, the fundamental equation, and an audit-hash prefix at every step. This is the agent-facing audit trail. Fails closed with the offending step if any entry is invalid.

Public scan report

scanner v0.1.10 · 2026-11-03 · same rubric, same numbers if you re-run it

no findings
  • Code scan13 source files scanned25/25
  • –Live reliabilityno gateway calls yet and no remote to proben/a
  • –Tool poisoningtools not inspected (local package is not executed); not countedn/a
  • Auth qualitylocal package, no credentials required12/15
  • Maintenancelast push 2 days ago15/15
  • Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Overall 92/100. Components that don't apply are left out of the denominator. Any critical finding is an F.RubricAppeal a findingJSON

How Ledger compares

Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.

Safety score
92/100
higher than 95% of 48,255 servers
Tools
20
the typical server has 7
Tools that change things
25%
typical: 0%. Fewer write tools means less an agent can break
GitHub stars
1
more than 65% of 28,688 servers
Downloads a week
64
more than 51% of 12,191 servers with a package

What its tools let an agent do: 14 read · 6 change

Install Ledger in Claude Code, Cursor or VS Code

Runs npx -y @eternal-roman/ledger-mcp on your machine. Read the scan report first; the gateway never runs local packages.

claude mcp add ledger -- npx -y @eternal-roman/ledger-mcp
Add to Cursor

What the publisher says

From the Ledger repository's README, as published. We do not edit it. Read it on GitHub

Ledger

Agents do not do money math in tokens. Exact-decimal double-entry kernel + MCP. Fail-closed. Audit-hashed. Deterministic.

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:

  1. Read ledger://canon/rules and ledger://canon/workflow.
  2. Compute with moneycompute. Validate with entryvalidate. Post with ledger_post.
  3. Prove with ledgerverifyequation + ledgeraudithash. Never invent an audit hash.
  4. Ground treatments with citelookup. Bundle proof with artifactmake.

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.

Why this exists

Token-level arithmetic is indifferent to scale, balance, and currency. The kernel is not.

Install (library)

npm install @eternal-roman/ledger
import { 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.json

Layers on the kernel

All of these emit validated JournalEntrys. None reimplement money.

Shortened. The full README is on GitHub.

Nothing above is checked by us. What we check is on the safety report.

Ledger: common questions

Is Ledger MCP server safe?
Yes, by our scan: it is graded A (92/100). Read the Ledger safety report
How do I install Ledger?
It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
Does Ledger need an API key?
Not as far as the registry entry and our scan can tell: no credentials are declared or required.
Is Ledger maintained?
The last commit was 3 days ago (2026-11-01). The latest release is v0.19.1.
How does Ledger compare with other MCP servers?
safety score 92/100 (higher than 95% of 48,255 servers); tools 20 (the typical server has 7); tools that change things 25% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.