Listed from the MCP registry; nobody on Odel publishes it.
Banktivity MCP server for .bank8 vaults; writes go through Core Data so CloudKit sync sees them.
Runs on your machine from its package; the steps are below.
At most: moves money, runs code or commands, deletes data, or sends messages for you.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Distributed as an MCP bundle (`https://github.com/david00769/banktivity-swift-mcp/releases/download/v1.0.0/banktivity-swift-mcp-v1.0.0-macos-universal.mcpb`) — download it and import the bundle in your MCP client.
A Swift library, Model Context Protocol (MCP)
server and command-line tool for Banktivity
personal finance files. It lets Claude Desktop, Claude Code, Cursor and other
MCP clients or AI agents read and write a Banktivity 10 .bank8 vault:
accounts, transactions, splits, categories, payees, tags, templates, import
rules, scheduled transactions, statements and securities. It can also export a
vault as RDF.
Every change goes through Core Data, the way Banktivity itself writes, so edits are seen by Banktivity's iCloud/CloudKit sync. See CloudKit sync safety.
A .bank8 vault is a Core Data store, and Banktivity syncs it through CloudKit.
core.sql with SQL bypasses Core Data's change tracking. CloudKit sync never
sees those edits, so they can fail to sync, be reverted, or corrupt the vault.
Martijn Riemers's TypeScript
banktivity-mcp, which
inspired the Swift rewrite, was built that way.NSPersistentContainer, using Banktivity's own compiled data
model, and makes every change through it, as Banktivity does.lsof check,
from the Swift rewrite).pModificationDate on
the owning Transaction or Security, which is what makes Banktivity upload it.
Changes to cached running balances alone never stamp anything.Warning: this tool changes your Banktivity data. Write commands make real changes to your vault, and AI assistants make mistakes. Back up the vault before any write session, and work on a copy until you trust your setup. The authors are not responsible for data loss.
Using it safely
banktivity-cli or banktivity-mcp process per vault at a time.
Writes are queued inside one process, but nothing locks the file across
processes.banktivity-mcp server before you open the same vault in
Banktivity.app. The app and this tool must not have the file open together.
(Writes are refused while Banktivity has the vault open, but reads are not.)This is david00769's maintained fork of Steve Flinter's
banktivity-swift-mcp. It
has everything upstream has: v1.0.0 is in sync with upstream main as of
660cbc3, which includes upstream's v0.18.0. Fork releases are numbered from
1.0.0 so that their tags never collide with upstream's 0.x releases, and each
CHANGELOG entry names the upstream version it includes. Upstream has merged most of this fork's work, including sync
by modification date (2026-11-15), so edits are signalled to Banktivity's sync
the way the app itself does and are not reverted by a remote copy. What is
listed below is only here, or is still offered upstream as
pull requests.
Use banktivity-cli first. Every MCP tool has a CLI verb (a parity test
keeps the two in step), and the CLI is the primary, documented interface. The
MCP server is for clients that can only speak MCP.
What the fork adds:
balancesStale) instead of failing a write that committed. Trade cash
signs are checked, a zero price is never written into price history
(--worthless records a worthless disposal), and categories delete
refuses while a template, schedule or import rule still uses the category.BANKTIVITY_REPORTING_CURRENCY,
and accounts with no stored rate are listed in excludedAccounts with
complete: false, not dropped silently.accounts update;line-items source, showing the raw bank import behind a transaction;Some of this came from other people's forks. ACKNOWLEDGEMENTS.md credits each contribution, and CHANGELOG.md lists every change by release.
Three related projects come up when you search for a Banktivity MCP server:
| Project | Language | How it writes | Install | Status |
|---|---|---|---|---|
| mhriemers/banktivity-mcp | TypeScript (npm) | SQL into core.sql (as described when the Swift rewrite began) | npm | The original TypeScript server that inspired the Swift rewrite |
| sflinter/banktivity-swift-mcp | Swift | Core Data (NSPersistentContainer) | Homebrew (sflinter/tap) | The Swift rewrite this fork is based on |
| david00769/banktivity-swift-mcp (this repo) | Swift | Core Data, plus the guards above | Release download or make install | Maintained; everything upstream has, plus the fork's additions |
If you want an AI assistant to write to a vault that syncs through iCloud, use one of the Core Data projects. All three can read a vault.
Writes are serialized within each running process, which covers concurrent MCP tool calls handled by one banktivity-mcp server and overlapping writes inside a single CLI command. It is not a cross-process file lock: run one banktivity-cli or banktivity-mcp process per vault at a time, and shut them down before opening the same vault in Banktivity.app.
The numeric IDs this tool returns are local to one store, not to the vault. They are Core Data row ids assigned by whichever SQLite file you opened. The same logical record — the same transaction, account, statement or category — carries a different number on a second Mac syncing the same vault through Banktivity's own sync, and can change again after restoring from backup, importing, or migrating a Banktivity 10 vault. The stable identifier is the record's pUniqueID.
The consequence is worth stating plainly, because it is the failure this tool cannot detect for you: an id captured on one machine and replayed on another does not point at nothing, it points at a different real record. A delete or an amount correction aimed that way succeeds, reports success, and hits the wrong row. So resolve ids on the machine you are about to write on, in the same session, and read the row back to confirm it is the one you meant before mutating it.
.bank8 vaultEach release has one universal download (Apple Silicon and Intel) and a checksum file. CI builds and tests the release from the tagged commit. For v1.0.0:
base=https://github.com/david00769/banktivity-swift-mcp/releases/download/v1.0.0
curl -LO "$base/banktivity-swift-mcp-v1.0.0-macos-universal.tar.gz"
curl -LO "$base/banktivity-swift-mcp-v1.0.0-macos-universal.tar.gz.sha256"
shasum -a 256 -c banktivity-swift-mcp-v1.0.0-macos-universal.tar.gz.sha256 # prints "OK"
tar xzf banktivity-swift-mcp-v1.0.0-macos-universal.tar.gz
xattr -d com.apple.quarantine banktivity-cli banktivity-mcp 2>/dev/null || true
mkdir -p ~/.local/bin && mv banktivity-cli banktivity-mcp ~/.local/bin/
banktivity-cli --version # 1.0.0
The binaries are signed ad hoc, not notarized. The xattr line removes the
quarantine flag macOS puts on downloaded files, which would otherwise stop them
from running.
.mcpb)Each release also has banktivity-swift-mcp-vX.Y.Z-macos-universal.mcpb, an
MCP Bundle. Download it and
open it with Claude Desktop to install banktivity-mcp as an extension. Leave
Vault path blank to use your Banktivity 10 vault (see
Where is my vault?), and consider turning Read-only on. The binary inside is ad-hoc signed, not
notarized; if macOS refuses to run it, clear the quarantine flag with
xattr -dr com.apple.quarantine ~/Library/Application\ Support/Claude/Claude\ Extensions
and restart Claude Desktop. It installs only the MCP server; for the CLI, use the download above. The server
is also listed in the MCP Registry
as io.github.david00769/banktivity-swift-mcp.
Xcode 16 or later is recommended. Without Xcode the Makefile falls back to the Command Line Tools for building and installing (not tested here); running the tests needs Xcode.
git clone https://github.com/david00769/banktivity-swift-mcp.git
cd banktivity-swift-mcp
make install # universal build, installed to ~/.local/bin
Always install with make install (or make install-fast for a quicker
single-architecture build). Never copy a new binary over ~/.local/bin with
cp. cp rewrites the file in place, and a banktivity-mcp still running from
it is killed by macOS the next time it starts ("Code Signature Invalid"). The
Makefile copies to a temporary name, signs it, then renames it into place.
Other Makefile targets:
make help # list all targets
make install-fast # native-architecture build and install, for development
make verify # check that the installed binaries actually run
make build # debug build
make test # run all tests
make test-filter FILTER=AccountUpdateTests # run one test type
make release # universal release build (arm64 + x86_64)
make package # release tarball plus its SHA-256
make mcpb # the tarball plus the Claude Desktop bundle (.mcpb)
make clean # remove build output
make test runs the suite the way a release build behaves: release
configuration, one worker, Xcode's test frameworks.
brew install sflinter/tap/banktivity-swift-mcp
This installs upstream's binaries, without this fork's changes.
CI (.github/workflows/ci.yml) runs on every push and pull request to main.
It runs make test, then make package, so a change that breaks the release
build fails before anyone tags it. To release, bump
Sources/BanktivityLib/Version.swift and add a matching section to
CHANGELOG.md, then push a tag:
git tag -a v0.18.0 -m "v0.18.0" && git push origin v0.18.0
.github/workflows/release.yml then checks that the tag matches
Version.swift, runs the tests, builds the tarball and publishes the release.
The CHANGELOG section becomes the release notes.
make test builds the CLI first and runs the suite single-worker under the same release configuration and Xcode framework paths as make release, so a test failure reproduces the way a release build would hit it. Use make test-filter FILTER=TestName when iterating on one test.
Banktivity 10 keeps a vault that syncs through Banktivity Cloud in its own library, not in Documents:
~/Library/Group Containers/group.com.iggsoftware.banktivity.library/IGGFinance/production/Documents/<vault id>/1.bank8
The <vault id> folder differs from Mac to Mac. If BANKTIVITY_FILE_PATH
is unset or empty, banktivity-mcp and banktivity-cli use the vault in that
folder, provided there is exactly one. With several they list them and stop,
so you can pick one.
macOS asks permission first. That folder belongs to Banktivity, and macOS protects one app's data from other apps, so the first run is blocked until you grant access. See Granting access on macOS.
A vault saved anywhere else (the examples below use
~/Documents/Banktivity/My Accounts.bank8) needs its path set. The path must
end in .bank8; if you give a folder, the error lists the vaults inside it.
macOS blocks other programs from reading Banktivity 10's library until you allow it. Until then the server logs:
Error: macOS blocked access to Banktivity's library (…/IGGFinance/production/Documents). …
and Claude Desktop shows the extension as failed. You may also get a macOS notification about a program accessing "data from other apps". To fix it:
banktivity-mcp that is actually
running, and click Open:
~/Library/Application Support/Claude/Claude Extensions/local.mcpb.david00769.banktivity-swift-mcp/server/banktivity-mcpmake install: ~/.local/bin/banktivity-mcp
(and ~/.local/bin/banktivity-cli for the CLI)Grant the program itself, not the app that runs it. Giving Claude.app Full
Disk Access did not unblock the extension; adding the banktivity-mcp binary
did. Claude.app does not need Full Disk Access for this. The exception is a
terminal that already has Full Disk Access (Terminal, iTerm): the CLI run from
it, including from Claude Code, works without its own entry.
After every update, grant again. The binaries are ad-hoc signed, not notarized, so macOS ties the permission to the exact file. An update installs a new file, so add it again (remove the old entry first).
How to tell it worked. Claude Desktop's server log,
~/Library/Logs/Claude/mcp-server-Banktivity.log, shows:
Vault: /Users/you/Library/Group Containers/…/IGGFinance/production/Documents/<vault id>/1.bank8
Core Data container loaded successfully
In the extension's Configure dialog, turn Read-only on and click Save until you trust your setup. The toggle only takes effect once saved.
Add to a project's .mcp.json, or to ~/.claude.json for every project
(claude mcp add writes the same entry):
{
"mcpServers": {
"banktivity": {
"command": "/Users/you/.local/bin/banktivity-mcp",
"env": {
"BANKTIVITY_FILE_PATH": "/Users/you/Documents/Banktivity/My Accounts.bank8",
"BANKTIVITY_REPORTING_CURRENCY": "USD"
}
}
}
}
claude_desktop_config.json)Add the same block to
~/Library/Application Support/Claude/claude_desktop_config.json, then
restart Claude Desktop.
mcp.json)Add the same block to ~/.cursor/mcp.json, or to .cursor/mcp.json in a
project.
Any client that starts stdio MCP servers takes the same two things: the
command banktivity-mcp (use its absolute path) and the environment variable
BANKTIVITY_FILE_PATH set to your .bank8 vault (optional for a Banktivity 10
vault; see Where is my vault?). For one shared server over
HTTP, see below. For agents that can run shell commands, also consider the
CLI.
Normally each client starts its own banktivity-mcp over stdio. If you'd rather
run one server that stays up (for example under launchd), set
BANKTIVITY_HTTP_PORT. It listens on 127.0.0.1 only:
BANKTIVITY_FILE_PATH=~/Documents/Banktivity/My\ Accounts.bank8 \
BANKTIVITY_HTTP_PORT=8790 banktivity-mcp
# Banktivity MCP server listening on http://127.0.0.1:8790/mcp
BANKTIVITY_HTTP_PATH changes the /mcp path. To check that it answers:
curl -s http://127.0.0.1:8790/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H 'MCP-Protocol-Version: 2025-06-18' \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"check","version":"1"}}}'
# {"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{...}},"serverInfo":{"name":"banktivity-mcp","version":"0.17.4"},...}}
Point a client at it with a URL instead of a command:
{ "mcpServers": { "banktivity": { "type": "http", "url": "http://127.0.0.1:8790/mcp" } } }
Two things to know before you use it:
Origin header is checked), and so are malformed requests.Set BANKTIVITY_STORE_READ_ONLY=1 (or true, yes) to open the vault
read-only. Even a plain read lets SQLite tidy its write-ahead log, which
changes files on disk. Use this when you want to look at a vault without
changing a byte of it:
BANKTIVITY_STORE_READ_ONLY=1 \
banktivity-cli accounts list --vault ~/Documents/Banktivity/My\ Accounts.bank8
In this mode a write fails when it reaches the database. SQLite may still open
core.sql-shm for writing on its own, so this is an extra layer; keep your
backups.
Net worth (accounts net-worth, get_net_worth, and netWorth inside
summary) reports assets, liabilities and netWorth, which add each account's
cash in its own currency, without converting. Net worth also
reports:
reportingCurrency and converted: the same totals converted into one
currency, plus holdingsValue (the market value of investments) and
netWorthWithHoldings;currencyBreakdown: for each currency, the cash, holdings, exchange rate used
and converted amounts;warnings: for example, an account left out because the vault has no
exchange rate for its currency;complete and excludedAccounts: complete is false when any account with a
balance had no exchange rate to the reporting currency, and excludedAccounts
lists those accounts (name and currency) so a total that silently omits one
cannot pass for the whole. The CLI also prints a warning on stderr.Choose the currency with BANKTIVITY_REPORTING_CURRENCY (an ISO code such as
USD). If it is unset, EUR is used, the label the totals have always carried.
Rates come from the vault's own exchange-rate table: the latest direct rate if
there is one, otherwise the inverse of the latest reverse rate, otherwise a
conversion through USD.
BANKTIVITY_REPORTING_CURRENCY=USD banktivity-cli accounts net-worth
Investment accounts in accounts list and accounts balance (and their MCP
tools) also carry holdingsValue: shares held × latest closing price × the
security's price multiplier. It is shown next to balance, never added to it.
list_accounts — List all accounts with balancesget_account_balance — Get balance for a specific account (investment accounts: cash balance, with holdingsValue beside it)get_net_worth — Net worth in the reporting currency: cash plus holdings, each account converted at the vault's latest exchange rate, with a per-currency breakdown and warnings for missing or stale ratesget_spending_by_category — Spending breakdown by category for a date rangeget_income_by_category — Income breakdown by category for a date rangeget_summary — Overall financial summaryupdate_account — Rename an account, change its type, or hide it (see Changing an account)get_transactions — List transactions with filtering and paginationsearch_transactions — Full-text search across payees, memos, etc.get_transaction — Get a single transaction by IDcreate_transaction — Create a new transaction; optional transaction_type, otherwise deposit, withdrawal or transfer is inferred from the bank-account linesrepair_forex_transfer — Repair an existing cross-currency transfer with a target-currency receipt and source-currency fee splitupdate_transaction — Update an existing transactiondelete_transaction — Delete a transactionrepair_forex_transfer repairs existing cross-currency transfer transactions through MCP, and the same BanktivityLib repair path is available in the CLI as transactions repair-forex. Use it when a transfer already exists in Banktivity but was recorded with equal numeric source/target amounts or without a fee split. It does not create new transfers.
Required inputs:
transaction_id — existing transaction to repairsource_account_id — account debited in the source currencytarget_account_id — account receiving funds in the target currencyfee_category_id — expense category for the source-currency feegross_source_amount — full source-currency debitsource_fee_amount — fee in the source currencytarget_amount — amount received in the target account currencyexchange_rate — rate from source amount after fees to target currencyOptional inputs are title, date, note, source_memo, target_memo, and fee_memo.
The repaired transaction is stored in the source account currency. The target line item stores gross_source_amount - source_fee_amount as its transaction amount, exchange_rate as pExchangeRate, and target_amount as the target account amount. The fee is a separate source-currency category split. Transactions with unmanaged extra line items are rejected instead of merged or deleted.
Example MCP call arguments:
{
"transaction_id": 1001,
"source_account_id": 2001,
"target_account_id": 2002,
"fee_category_id": 3001,
"gross_source_amount": 100.00,
"source_fee_amount": 1.00,
"target_amount": 74.25,
"exchange_rate": 0.75,
"title": "Cross-Currency Transfer",
"date": "2025-04-27",
"note": "Provider transfer reference",
"source_memo": "Source-currency gross debit",
"target_memo": "Target-currency receipt",
"fee_memo": "Provider fee"
}
Equivalent CLI example:
banktivity-cli transactions repair-forex \
--transaction-id 1001 \
--source-account-id 2001 \
--target-account-id 2002 \
--fee-category-id 3001 \
--gross-source-amount 100.00 \
--source-fee-amount 1.00 \
--target-amount 74.25 \
--exchange-rate 0.75 \
--title "Cross-Currency Transfer" \
--date 2025-04-27 \
--note "Provider transfer reference" \
--source-memo "Source-currency gross debit" \
--target-memo "Target-currency receipt" \
--fee-memo "Provider fee"
get_line_item — Get a specific line itemget_line_item_source — Raw imported bank details (Plaid/OFX description, source type and identifier) for a line item; empty for manual entriesadd_line_item — Add a line item to a transaction (for splits)update_line_item — Update a line itemdelete_line_item — Delete a line itemlist_categories — List all income/expense categoriesget_category — Get a specific categoryget_category_tree — Get the full category hierarchycreate_category — Create a new categoryaudit_category_entities — Find income/expense categories stored under the wrong Core Data entityget_uncategorized_transactions — Find transactions without categoriessuggest_category_for_merchant — Suggest a category based on merchant historyrecategorize_transaction — Change a transaction's categorybulk_recategorize_by_payee — Recategorize all transactions for a payeereview_categorizations — Review recent categorization changesget_payee_category_summary — Summary of categories used per payeeget_tags — List all tagscreate_tag — Create a new tagtag_transaction — Tag a transactionget_transactions_by_tag — Find transactions with a specific tagbulk_tag_transactions — Tag multiple transactions at oncelist_transaction_templates — List saved transaction templatesget_transaction_template — Get a specific templatecreate_transaction_template — Create a new templateupdate_transaction_template — Update a templatedelete_transaction_template — Delete a templatelist_import_rules — List all import rulesget_import_rule — Get a specific import rulematch_import_rules — Find rules matching a payee stringcreate_import_rule — Create a new import ruleupdate_import_rule — Update an import ruledelete_import_rule — Delete an import rulelist_scheduled_transactions — List all scheduled transactionsget_scheduled_transaction — Get a specific scheduled transactioncreate_scheduled_transaction — Create a new scheduled transactionupdate_scheduled_transaction — Update a scheduled transactiondelete_scheduled_transaction — Delete a scheduled transactionlist_statements — List statements for an accountget_statement — Get a statement with reconciliation progress and its line itemsget_account_reconciliation_status — Statement count, unbalanced statements, last statement, and line items on no statementupdate_statement — Change a statement's beginning and/or ending balancecreate_statement — Create a new statement with balance validationdelete_statement — Delete a statement; its line items keep their cleared state; internal statement rows require explicit allow_internalreconcile_line_items — Assign line items to a statementunreconcile_line_items — Remove line items from a statement (they stay cleared)get_unreconciled_line_items — List unreconciled line items for an accountupdate_statement — Correct a statement's ending balance to match what Banktivity's window showsplan_statement_visible_row_correction — Turn the start, end and missing amounts you read off Banktivity's statement window into a correction plan (it does not read Banktivity's screen itself)Each line item in a statement carries statementBalanceAmount, the amount
that line contributes to the statement's balance. For an investment account, add
up statementBalanceAmount rather than amount or accountAmount: a security
trade can move cash that the raw amounts don't show.
list_securities — List all securities with name, symbol, and currencycreate_security — Create a new security with symbol, name, and currencyget_security_prices — Get price history for a security (by symbol or ID, optional date range/limit)get_security_holdings — Get current holdings (positions) with shares, cost basis, and market valueget_security_trades — Get trade history (buys, sells, transfers) with shares, prices, and commissionsget_security_realized_gains — Get realised capital gains per closed lot (acquisition date, proceeds, cost basis, gain, short/long term)get_security_income — Get investment income (dividends, interest, capital gains distributions)create_security_trade — Record a buy or sell (positive shares buy, negative shares sell), with its cash and balancing line itemsupdate_security_trade — Correct an existing trade's shares, price, amount, commission or security; basis_only_transfer for a zero-cash transfer-inaudit_security_prices — List trades stored with a price per share of 0, flagging those that make other devices value a holding at 0rename_security — Change a security's ticker, display name, or both (refuses a ticker another security holds)create_security_income — Create native security income, currently dividend incomecreate_share_adjustment — Create a share adjustment (e.g. charges, stock splits, position corrections)import_security_prices — Import prices from a CSV file (Yahoo Finance, OHLCV, or Date/Close)delete_security_prices — Delete price history for a security (optional date range)reset_security_price_range — Forget a security's known price range without deleting any pricesdelete_security — Delete a security record that no trade referencesexport_turtle — Export the entire vault as RDF/Turtle (.ttl), optionally to a filedump_schema — Inspect the Core Data model schema (entity names, attributes, relationships)get_capabilities — List every command and tool, whether it reads or writes, and what confirmation it needsDefault to the CLI. Use banktivity-mcp only where the client cannot run
shell commands. Both call the same library functions with the same parameters;
CLIMCPParityTests fails if an MCP tool has no CLI verb.
The CLI is a first-class part of this project, and the reason is the vault's safety.
An MCP server stays running. banktivity-mcp opens the vault when it
starts and keeps it open until it exits. A client such as Claude Desktop
usually starts it at launch and leaves it running in the background, even when
you are not using it. If Banktivity then opens the same vault for reading and
writing, or its sync touches the file, the two processes have the database
open at once. Banktivity may hang or crash, or sync may go wrong. You can quit
the server whenever you are done, but it is easy to forget.
The CLI opens the vault for one command and exits. banktivity-cli loads
the vault, runs the read or write, prints JSON and exits, so it is not holding
the file when you open Banktivity. AI agents are good at tool calling through
the shell, so Claude Code, Cursor's agent and other terminal agents can do the
same work through the CLI that they do through MCP tools. The
Claude Code skill does exactly that.
banktivity-cli | banktivity-mcp | |
|---|---|---|
| Holds the vault open | Only while one command runs | For as long as the server runs |
| Best for | Claude Code, terminal agents, scripts, cron | Clients that only speak MCP (e.g. Claude Desktop) |
| Before opening Banktivity | Nothing to do | Quit the server (or the client that started it) |
What neither tool does:
lsof check before writes, cached for 3 seconds). Nothing stops Banktivity
from opening the vault while a command is running, and reads are not
blocked. The CLI shortens the window; it does not close it.# Read the five latest transactions; nothing stays running afterwards
banktivity-cli transactions list --vault ~/Documents/Banktivity/My\ Accounts.bank8 --limit 5
A standalone CLI (banktivity-cli) provides the same query and write
functionality without an MCP server. It reads a .bank8 vault selected by
--vault /absolute/path/to/Ledger.bank8 or BANKTIVITY_FILE_PATH, or with
neither, the Banktivity 10 vault (Where is my vault?).
Start with the built-in help:
banktivity-cli --help
banktivity-cli accounts --help
banktivity-cli statements inspect-membership --help
banktivity-cli capabilities --format compact
Help is safe to run without opening a vault. Read commands return JSON on standard output. Write commands change financial records immediately through Core Data; back up the vault first and review the command-specific safeguards before using them.
Common examples:
banktivity-cli accounts list --vault ~/Documents/Banktivity/My\ Accounts.bank8
banktivity-cli accounts balance --account-name "Checking"
banktivity-cli transactions list --account-name "Checking" --start-date 2025-01-01 --limit 10
banktivity-cli statements status --account-name "Brokerage"
banktivity-cli tags get-by-tag --tag-name "Vacation" --limit 20
banktivity-cli export turtle --output vault.ttl
Copy-paste commands for common jobs. Set BANKTIVITY_FILE_PATH once, or add
--vault <path> after the subcommand (accounts list --vault <path>; it is
not accepted before it). Every command takes
--format compact for one-line JSON, which is easier for scripts and agents to
parse.
Commands available:
accounts list, accounts balance, accounts net-worth, accounts spending, accounts income, accounts summary, accounts update, accounts recalc-balances (writes also keep running balances current)transactions list, transactions search, transactions get, transactions create, transactions repair-forex, transactions update, transactions deletecategories list, categories get, categories tree, categories audit-entities, categories create, categories delete
categories delete --category-id N refuses a category that has line items or subcategories, or that a template, scheduled transaction or import rule still uses.tags list, tags create, tags tag-transaction, tags get-by-tag, tags bulk-taguncategorized list, uncategorized suggest, uncategorized recategorize, uncategorized bulk-recategorize, uncategorized review, uncategorized payee-summaryline-items get, line-items add, line-items update, line-items delete, line-items sourcetemplates list, templates get, templates create, templates update, templates deleteimport-rules list, import-rules get, import-rules match, import-rules create, import-rules update, import-rules deletescheduled list, scheduled get, scheduled create, scheduled update, scheduled deletestatements list, statements status, statements get, statements create, statements update, statements delete, statements reconcile, statements unreconcile, statements unreconciled
--backup-confirmed, --post-ui-verification-required, --operator-confirmed-visible) are optional: ordinary, unnamed statements need none, and they are accepted only for compatibility.securities list, securities create, securities delete, securities rename, securities audit-prices, securities prices, securities holdings, securities trades, securities realized-gains, securities income, securities create-trade, securities create-income, securities adjust, securities update-trade, securities import-prices, securities delete-prices, securities reset-price-range, securities fix-prices
securities create-trade --worthless records a sale of a worthless security (--price-per-share 0) without storing a price, so no device writes a 0 into price history; securities update-trade --clear-price clears a trade's stored price (not with --price-per-share).securities delete refuses while any trade still references the security, because deleting it would orphan the line items carrying its cost basis and realized gain. Merge those trades onto the surviving security with securities update-trade --security-id first. Price history is kept unless --with-prices is given.export turtleschemaexport BANKTIVITY_FILE_PATH=~/Documents/Banktivity/My\ Accounts.bank8
# Split one payment across two categories. Make the lines balance:
# money out of Checking (-120) equals money into the categories (+90, +30).
# Any difference is added as an uncategorized offset line.
banktivity-cli transactions create --date 2026-10-01 --title "Costco" \
--line-items '[{"account_name":"Checking","amount":-120},
{"account_name":"Groceries","amount":90,"memo":"food"},
{"account_name":"Household","amount":30}]'
# A simple two-line transaction with an explicit type. The category line
# gets the opposite amount (+50).
banktivity-cli transactions create --account-name "Checking" --date 2026-10-02 \
--title "Cafe" --amount -50 --category-name "Dining" --transaction-type withdrawal
# Full-text search across payees and memos, as one-line JSON
banktivity-cli transactions search --format compact --query "Amazon" --limit 20
# Uncategorized transactions in one account, including transfers
banktivity-cli uncategorized list --account-id 3 --limit 50 --no-exclude-transfers
# Which commands write, so an agent can stick to reads
banktivity-cli capabilities --format compact
# Open the vault read-only (see Read-only mode for what this does not cover)
BANKTIVITY_STORE_READ_ONLY=1 banktivity-cli accounts list
transactions create options:
| Option | Meaning |
|---|---|
--account-id / --account-name | Account for the first line item (simple mode) |
--date | Transaction date, YYYY-MM-DD (required) |
--title | Payee or title (required) |
--amount | Amount on the account line; required unless --line-items is given |
--category-id / --category-name | Category for the second line, which gets -amount |
--note | Optional note |
--transaction-type | check, deposit, transfer or withdrawal; inferred if omitted |
--line-items | JSON array of {"account_id" or "account_name", "amount", "memo"?}; replaces the account, amount and category options |
accounts update renames an account, changes its type, or hides it:
banktivity-cli accounts update --account-name "Old Checking" --name "Joint Checking"
banktivity-cli accounts update --account-id 12 --type savings # checking to savings: fine
banktivity-cli accounts update --account-id 12 --hidden # --no-hidden shows it again
A new type has to stay on the same side of the investment line. Checking can become savings or a credit card. A 529 can become a 401k. But a checking account can't become a brokerage account, because Banktivity keeps securities only in investment accounts:
$ banktivity-cli accounts update --account-id 12 --type investment
Error: [validation_failed] Account 12 cannot move between investment and non-investment types (class 1001 to 2000); create a new account instead
Changing between an asset and a liability type (checking to credit card) is
allowed, and it moves the balance to the other side of net worth.
accounts update --help lists every type name; accounts create --type
accepts the same names. Categories are changed with the category commands
instead.
line-items source shows the raw record behind an imported transaction, before
Banktivity renamed the payee or applied import rules:
$ banktivity-cli line-items source 4821
[
{
"amount" : -4.5,
"date" : "2026-10-01",
"details" : "SQ *BLUE BOTTLE COFFEE 0123",
"matched" : true,
"sourceIdentifier" : "pl_8Vd45zonEXAMPLE",
"sourceTime" : "2026-10-02T09:53:14Z",
"sourceType" : "plaid"
}
]
A transaction you entered by hand returns [].
transactions create used to give every new transaction whichever type the
database happened to return first, often "Return Of Capital". Now it works the type out
from the bank and card lines:
| Lines | Type |
|---|---|
| two or more different bank or card accounts | Transfer |
| one account, money going out | Withdrawal |
| one account, money coming in | Deposit |
$ banktivity-cli transactions create --date 2026-10-02 --title "Move to savings" \
--line-items '[{"account_id":6,"amount":-500},{"account_id":7,"amount":500}]'
{ "id" : 23122, "title" : "Move to savings", "transactionType" : "Transfer", ... }
To choose the type yourself, pass --transaction-type with check,
deposit, transfer or withdrawal. Investment rows such as buys and
dividends need a security, so create them with securities create-trade and
securities create-income. transactions update --transaction-type can still
set any type on an existing transaction.
The command groups below are the complete CLI surface. Use a group's
--help output for required arguments, defaults, and write confirmations.
accounts: list, balance, net-worth, spending, income, summary, create, updatetransactions: list, search, get, create, repair-forex, update, delete, sync-infocategories: list, get, tree, audit-entities, createtags: list, create, tag-transaction, get-by-tag, bulk-taguncategorized: list, suggest, review, payee-summary, recategorize, bulk-recategorizeline-items: get, source, add, update, deletetemplates: list, get, create, update, deleteimport-rules: list, get, match, create, update, deletescheduled: list, get, create, update, deletestatements: list, status, get, inspect-membership, inspect-sync-record, visible-row-correction-plan, create, update, delete, reconcile, unreconcile, unreconciledsecurities: list, create, rename, delete, prices, import-prices, delete-prices, reset-price-range, fix-prices, holdings, trades, realized-gains, income, create-trade, create-income, link-income-category, adjust, update-tradereconciliation: execute-bundle runs a reviewed JSON plan of repairs, checked against its SHA-256 digestexport: turtleschema: dump the Core Data schemacapabilities: list every command and tool, whether it writes, and what confirmation it needsImportant behavior:
--account-id generally also accept --account-name.transactions create --line-items takes a JSON array for split
transactions. See Transaction types on create
for how the type is chosen.statements inspect-membership and statements inspect-sync-record only
read. They show which lines belong to a statement and the statement's sync
state, and never create a missing record.reconciliation execute-bundle checks the plan's digest, the vault, the
order of operations and each command before it runs anything.capabilities lists, as JSON, every command and tool: whether it writes,
which confirmation flags it needs, and whether it has a dry run.Use --format compact when a script needs one-line JSON; the default is
pretty-printed JSON for human inspection.
0 success, 64 usage error, 65 validation failed (for example a zero
share price or an unbalanced repair), 66 not found, 70 store failure, 77
write blocked (Banktivity has the vault open). Errors go to stderr as
Error: [category] message.
ArgumentParser provides shell completion scripts automatically:
banktivity-cli --generate-completion-script bash # Bash completions
banktivity-cli --generate-completion-script zsh # Zsh completions
banktivity-cli --generate-completion-script fish # Fish completions
For example, to install Zsh completions:
banktivity-cli --generate-completion-script zsh > ~/.zfunc/_banktivity-cli
A /banktivity skill is available for Claude Code. It lets Claude use the CLI directly to answer natural-language questions about your finances — "What did I spend on groceries last month?", "Show me uncategorized transactions in Checking", etc.
To install, copy the skill directory into your global Claude Code config:
mkdir -p ~/.claude/skills
cp -r skills/banktivity ~/.claude/skills/banktivity
The skills/banktivity/ directory contains a SKILL.md file that teaches Claude how to invoke banktivity-cli with the correct environment variable and arguments. You'll need to edit the BANKTIVITY_FILE_PATH in SKILL.md to point to your own vault.
Once installed, type /banktivity in any Claude Code session to activate it, or Claude will activate it automatically when you ask about transactions, accounts, spending, or categories.
lsof). If it does, writes are blocked to prevent corruption.NSManagedObjectContext instances with performAndWait for data integrity.banktivity-mcp keeps the vault open for as long as it runs; banktivity-cli only while one command runs. Neither locks the file. See CLI or MCP server.Banktivity's .bank8 bundle is a folder holding Banktivity's compiled data model (the .momd files) and a SQLite database (StoreContent/core.sql). This tool:
.momd model bundles from the vault, in filename orderNSPersistentContainer (no history tracking, no migration)BANKTIVITY_HTTP_PORT is setvalue(forKey:)) to access entities since we load Banktivity's own compiled models at runtimeRules read from Banktivity's own frameworks:
pModificationDate is newer than the last sync, and keeps each record's stored sync copy as the base of a three-way merge, so the tool never rewrites that copy: doing so would let a remote copy silently undo an edit. Every write marks the owning transaction or security as modified.holdingsValue.accounts recalc-balances repairs balances that are already stale.securities audit-prices finds existing ones.Can Claude (or Cursor, or another AI agent) read my Banktivity data?
Yes. Point an MCP client at banktivity-mcp (Configuration),
or let a shell-capable agent run banktivity-cli (CLI).
Is it safe with iCloud / CloudKit sync? Writes go through Core Data, as Banktivity's do, so sync sees them (CloudKit sync safety). Don't run it while Banktivity has the same vault open, and back up first.
The extension fails with "macOS blocked access to Banktivity's library".
macOS needs your permission first: add the banktivity-mcp program itself to
Full Disk Access (Granting access on macOS).
Can a running MCP server cause trouble when I open Banktivity? It can: the server keeps the vault open. Quit it before opening Banktivity, or use the CLI (CLI or MCP server).
Does it work with Banktivity 10 and .bank8 files?
Yes. It reads Banktivity's own data model from inside the .bank8 bundle
(How It Works).
Can I give an AI read-only access?
Set BANKTIVITY_STORE_READ_ONLY=1 (Read-only mode), and use
banktivity-cli capabilities to see which commands write. This is a safety
layer, not a sandbox: an agent that can run shell commands can unset the
variable, so give it a copy of the vault if it must not write.
This fork includes work by Peter Baker, Roberto Michelena, producethis, muxadil, Richard Jeans, Howy Perrin and Martijn Riemers, on top of Steve Flinter's original. ACKNOWLEDGEMENTS.md lists each contribution, where it came from, and how it was taken.
This is a maintained fork that I build and fix in my spare time. If it saves you time, sponsoring on GitHub helps pay for ongoing work. Bug reports and pull requests are just as welcome. Commercial use of the PolyForm-licensed parts needs a commercial licence; see the License section below.
Two licenses; LICENSE explains which applies where.
9bcd5d2 (just after v0.17.2), including every
release through v0.17.2, Steve Flinter's original and all credited
contributions (LICENSES/MIT.txt).Commercial use of the PolyForm-licensed parts needs a commercial license from david00769 (davidsiroky@me.com).