Atlas / MCP servers / iiatlas / HLedger

HLedgerBLOCK

mcp/iiatlas/hledger

A local MCP server for interacting with the HLedger cli

Verdict
BLOCK
Grade
F
Trust score
27 /100
Exposed tools
36 30r · 5w · 1d
Transport
sse · stdio · streamable-http
License
MIT
Stars
65
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

A Model Context Protocol (MCP) server that provides AI assistants (MCP Clients) with direct access to HLedger accounting data and functionality. This server enables AI applications to query account balances, generate financial reports, add new entires, and analyze accounting data through a standardized protocol.

It has support for most hledger cli commands, the ability to fetch an traverse include'd journal files, and a safe --read-only mode. I hope you find it useful!

Published on npm as @iiatlas/hledger-mcp, and available as an installable .mcpb file from releases.

Features

The HLedger MCP server provides comprehensive access to HLedger's financial reporting capabilities through the following tools:

Core Accounting

  • Accounts - List and query account names and structures
  • Balance - Generate balance reports with extensive customization options
  • Register - View transaction registers and posting details
  • Print - Output journal entries and transactions

Financial Reports

  • Balance Sheet - Generate balance sheet reports
  • Balance Sheet Equity - Balance sheet reports with equity details
  • Income Statement - Profit & loss statements
  • Cash Flow - Cash flow analysis and reports

Data Analysis

  • Stats - Statistical analysis of journal data
  • Activity - Account activity and transaction frequency analysis
  • Payees - List and analyze tran
Read from source at commit a18a6f3ff896OBSERVED · 2026-10-07
Advertisement
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code
claude mcp add hledger-mcp --env MCP_AUTH_PORT=${MCP_AUTH_PORT} -- npx -y @iiatlas/[email protected]
claude-desktop
{
  "mcpServers": {
    "hledger-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@iiatlas/[email protected]"
      ],
      "env": {
        "MCP_AUTH_PORT": "${MCP_AUTH_PORT}"
      }
    }
  }
}
03

Exposed tools (36)

30 read · 5 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.

ToolRiskDescription
collect-user-inforeadA tool that collects user information through elicitation
fullreadfull options
get_weatherread
greetreadA simple greeting tool
helloreadworld
hledger_accountsreadList account names from the journal, with optional filtering and formatting
hledger_activityreadShow posting activity counts as a bar chart
hledger_add_transactionwriteAdd a new transaction to the journal file using structured input
hledger_balancereadShow account balances, balance changes, or other balance-related reports with extensive customization options
hledger_balancesheetreadSummarize assets and liabilities with balance sheet layout
hledger_balancesheetequityreadBalance sheet including equity accounts
hledger_cashflowreadCash flow statement showing liquidity changes
hledger_closereadGenerate and optionally append closing/opening transactions to the journal
hledger_descriptionsreadList transaction descriptions from the journal
hledger_filesreadList data files in use by hledger
hledger_find_entryreadFind complete journal entries matching a query
hledger_importwriteImport transactions from external data files using hledger
hledger_incomestatementreadIncome statement summarizing revenues and expenses
hledger_notesreadList unique transaction notes, optionally filtered by query
hledger_payeesreadList payee names from the journal, optionally filtered and sorted
hledger_printreadPrint full transactions from the journal with optional filtering and formatting
hledger_registerreadShow postings with running totals, filtered by query or account
hledger_remove_entrydestructiveRemove a complete journal entry by exact match
hledger_replace_entryreadReplace a complete journal entry with new content
hledger_rewritereadRewrite matching transactions by adding postings using hledger
hledger_statsreadShow journal statistics and health metrics
hledger_tagsreadList tag names used in transactions
hledger_webwriteStart the hledger web interface server without blocking
hledger_web_listreadList active hledger web instances started by this MCP server
hledger_web_stopwriteStop one or more hledger web server instances
list-filesread
multi-greetreadA tool that sends different greetings with delays between them
numberreadnumber
queryread
start-notification-streamwriteStarts sending periodic notifications
testreadtest
04

Trust audit

BLOCKgrade F · trust 27/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.

LayerWhat it checksResult
L0Provenance & inventoryWARN
L1Static analysis of the codeFAIL
L2Instruction surface (what it tells the agent)FAIL
L3Class-specific surfaceWARN
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (4 observation(s))
Network
declared (4 observation(s))
Shell
declared (9 observation(s))
Dependencies
not all pinned
Secrets in source
none-found

Findings (25)

HIGHCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
node_modules/@types/node/sqlite.d.ts:314
exec(sql: string): void;
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
HIGHCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
node_modules/@types/node/url.d.ts:808
exec(input?: string | URLPatternInit, baseURL?: string): URLPatternResult | null;
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
HIGHCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
node_modules/ajv/dist/ajv.bundle.js:421
var makeValidate = new Function(
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
HIGHCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
node_modules/ajv/lib/compile/index.js:120
var makeValidate = new Function(
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
HIGHSupply chain · supply.typosquat · CWE-829, CWE-1357
node_modules/iconv-lite/package.json
request ~ requests
Why it matters. dependency name one edit from a popular package
Fix. verify the package; likely typosquat
HIGHSupply chain · supply.typosquat · CWE-829, CWE-1357
node_modules/raw-body/node_modules/iconv-lite/package.json
request ~ requests
Why it matters. dependency name one edit from a popular package
Fix. verify the package; likely typosquat
HIGHPrompt injection · prompt.zero_width · CWE-94, CWE-1427
node_modules/express-rate-limit/license.md:1
# MIT License
Why it matters. invisible characters in instruction text
Fix. strip non-printing characters
MEDIUMInventory / provenance · inv.symlink · CWE-1104
node_modules/.bin/node-which
node_modules/.bin/node-which
Why it matters. link not followed
MEDIUMInventory / provenance · inv.symlink · CWE-1104
node_modules/.bin/tsc
node_modules/.bin/tsc
Why it matters. link not followed
MEDIUMInventory / provenance · inv.symlink · CWE-1104
node_modules/.bin/tsserver
node_modules/.bin/tsserver
Why it matters. link not followed
MEDIUMInformation disclosure · disclose.log_secret · CWE-209, CWE-532
node_modules/@types/node/url.d.ts:572
* console.log(myURL.password);
MEDIUMObfuscation / stealth · obf.zero_width · CWE-506, CWE-94
node_modules/iconv-lite/encodings/sbcs-data-generated.js:100
"chars": "€پ‚ƒ„...†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—کTMڑ›œں ،¢£¤¥¦§ ̈©ھ«¬® ̄°±23 ́μ¶· ̧1؛»1⁄41⁄23⁄4؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûüے"
MEDIUMObfuscation / stealth · obf.zero_width · CWE-506, CWE-94
node_modules/iconv-lite/encodings/sbcs-data-generated.js:373
"chars": "«»...“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาําิีึืฺุู–—฿เแโใไๅๆ็่้๊๋์ํTM๏๐๑๒๓๔๕๖๗๘๙®©����"
MEDIUMObfuscation / stealth · obf.zero_width · CWE-506, CWE-94
node_modules/raw-body/node_modules/iconv-lite/encodings/sbcs-data-generated.js:100
"chars": "€پ‚ƒ„...†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—کTMڑ›œں ،¢£¤¥¦§ ̈©ھ«¬® ̄°±23 ́μ¶· ̧1؛»1⁄41⁄23⁄4؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûüے"
MEDIUMObfuscation / stealth · obf.zero_width · CWE-506, CWE-94
node_modules/raw-body/node_modules/iconv-lite/encodings/sbcs-data-generated.js:373
"chars": "«»...“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาําิีึืฺุู–—฿เแโใไๅๆ็่้๊๋์ํTM๏๐๑๒๓๔๕๖๗๘๙®©����"
MEDIUMPrompt injection · prompt.hidden_style · CWE-94, CWE-1427
node_modules/zod-to-json-schema/README.md:26
<div style="background-color: white; padding: 4px; padding-bottom: 8px;" alt="stainless">
MEDIUMFilesystem / path · mcp.destructive_tools · CWE-22, CWE-59
hledger_remove_entry
Why it matters. 1 tool(s) can delete or overwrite
Fix. prefer a read-only mode or scoped tokens; the page states the blast radius
LOWInventory / provenance · inv.hidden_file · CWE-1104
.mcpbignore
.mcpbignore
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
.prettierignore
.prettierignore
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
node_modules/ajv/.tonic_example.js
.tonic_example.js
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
node_modules/ajv/scripts/.eslintrc.yml
.eslintrc.yml
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
node_modules/call-bind-apply-helpers/.nycrc
.nycrc
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/simpleOAuthClient.js:84
exec(command, (error) => {
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
node_modules/etag/index.js:47
.createHash('sha1')
LOWInformation disclosure · disclose.log_secret · CWE-209, CWE-532
node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleStreamableHttp.js:553
console.log(`Using resumption token: ${notificationsToolLastEventId || 'none'}`);

Gates applied: no_behavioural_pass.

Audited 2026-10-07 · audit v0.4.1 · source sha a18a6f3ff896full audit observations/trust-audit/mcp-server/iiatlas__hledger.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-07a18a6f3ff896BLOCKF27first audit
06

Questions

What is the HLedger MCP server?

A local MCP server for interacting with the HLedger cli

What tools does HLedger expose?

36 in total: 30 read-only, 5 that write, and 1 that can delete or overwrite (hledger_remove_entry). Every one is listed on this page with its risk.

Is HLedger safe to connect to an agent?

No — not without reading the findings first. The audit graded it F (27/100) and found 7 critical or high issues in the source. Each one is listed on this page with the file and line it is on. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.

What credentials does HLedger need?

It reads MCP_AUTH_PORT from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How does HLedger run?

It speaks sse, stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as @iiatlas/hledger-mcp at 1.0.5.

How current is this page?

The grade is for one exact copy of the source (a18a6f3ff896), read on 2026-10-07. The repository is watched and re-audited when it changes.

Advertisement