Install
$ agentstack add mcp-sflinter-banktivity-swift-mcp ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ● Filesystem access Used
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
banktivity-swift-mcp
A Swift library, MCP server, and CLI for Banktivity personal finance files. Provides full read/write access to .bank8 vaults — accounts, transactions, categories, tags, templates, import rules, scheduled transactions, statements, securities, and RDF export.
- BanktivityLib — pure domain library with Core Data repositories and RDF export, no server dependencies
- banktivity-mcp — MCP server exposing 64 tools over stdio, for AI assistants like Claude
- banktivity-cli — standalone CLI for scripting and automation
Inspired by banktivity-mcp (TypeScript/Node.js), this is a ground-up rewrite in Swift. The original uses better-sqlite3 to read and write Core Data's SQLite store directly, bypassing Core Data's internal change tracking. This works for reads, but direct SQL writes are invisible to CloudKit sync — Banktivity doesn't know the data changed, and the vault can become corrupted or fail to sync. This Swift version uses NSPersistentContainer so all mutations go through Core Data's API, ensuring proper change tracking and CloudKit compatibility.
> WARNING: This server can modify your Banktivity data. Write tools (create, update, delete) make real changes to your .bank8 vault. While the server uses Core Data for proper change tracking and includes a write guard that blocks mutations when Banktivity is open, AI assistants can and will make mistakes. Back up your vault regularly and consider working on a copy until you're confident in your workflow. The authors are not responsible for any data loss or corruption.
Requirements
- macOS 14+
- A Banktivity
.bank8vault file
Installation
Homebrew (recommended)
brew install sflinter/tap/banktivity-swift-mcp
This installs both banktivity-mcp and banktivity-cli as universal binaries (Apple Silicon + Intel).
Download binary
Download the universal binary from GitHub Releases, extract, and move to your PATH:
tar xzf banktivity-swift-mcp-v0.8.0-macos-universal.tar.gz
mv banktivity-mcp banktivity-cli ~/.local/bin/
Build from source
Requires Xcode 16+ (needed for Swift Testing and universal binary builds):
git clone https://github.com/sflinter/banktivity-swift-mcp.git
cd banktivity-swift-mcp
make install # Build universal binary and install to ~/.local/bin
Other Makefile targets:
make build # Debug build
make test # Run all tests
make release # Universal release build (arm64 + x86_64)
make package # Build release tarball with SHA256
make clean # Remove build artifacts
Configuration
Claude Code
Add to your MCP settings (~/.claude/settings.json or project .mcp.json):
{
"mcpServers": {
"banktivity": {
"command": "/Users/you/.local/bin/banktivity-mcp",
"env": {
"BANKTIVITY_FILE_PATH": "/Users/you/Documents/Banktivity/My Accounts.bank8"
}
}
}
}
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"banktivity": {
"command": "/Users/you/.local/bin/banktivity-mcp",
"env": {
"BANKTIVITY_FILE_PATH": "/Users/you/Documents/Banktivity/My Accounts.bank8"
}
}
}
}
Available Tools
Accounts
list_accounts— List all accounts with balancesget_account_balance— Get balance for a specific accountget_net_worth— Calculate total net worthget_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 summary
Transactions
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 transactionupdate_transaction— Update an existing transactiondelete_transaction— Delete a transaction
Line Items
get_line_item— Get a specific line itemadd_line_item— Add a line item to a transaction (for splits)update_line_item— Update a line itemdelete_line_item— Delete a line item
Categories
list_categories— List all income/expense categoriesget_category— Get a specific categoryget_category_tree— Get the full category hierarchycreate_category— Create a new category
Categorization
get_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 payee
Tags
get_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 once
Templates
list_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 template
Import Rules
list_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 rule
Scheduled Transactions
list_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 transaction
Statements (Reconciliation)
list_statements— List statements for an accountget_statement— Get a statement with reconciliation progresscreate_statement— Create a new statement with balance validationdelete_statement— Delete a statement and unreconcile its line itemsreconcile_line_items— Assign line items to a statementunreconcile_line_items— Remove line items from a statementget_unreconciled_line_items— List unreconciled line items for an account
Securities
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_income— Get investment income (dividends, interest, capital gains distributions)create_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)
Export
export_turtle— Export the entire vault as RDF/Turtle (.ttl), optionally to a file
Diagnostic
dump_schema— Inspect the Core Data model schema (entity names, attributes, relationships)
CLI
A standalone CLI (banktivity-cli) provides the same functionality without an MCP server. Set BANKTIVITY_FILE_PATH or pass --vault:
banktivity-cli --vault ~/Documents/Banktivity/My\ Accounts.bank8 accounts list
banktivity-cli accounts balance --account-name "Checking"
banktivity-cli transactions list --account-name "Checking" --start-date 2025-01-01 --limit 10
banktivity-cli transactions create --account-name "Checking" --date 2025-06-15 --title "Coffee" --amount -4.50 --category-name "Food"
banktivity-cli tags get-by-tag --tag-name "Vacation" --limit 20
banktivity-cli tags bulk-tag --transaction-ids "100,101,102" --tag-name "Vacation"
banktivity-cli export turtle --output vault.ttl
CLI Subcommands
accounts list,accounts balance,accounts net-worth,accounts spending,accounts income,accounts summarytransactions list,transactions search,transactions get,transactions create,transactions update,transactions deletecategories list,categories get,categories tree,categories createtags 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 deletetemplates 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 get,statements create,statements delete,statements reconcile,statements unreconcile,statements unreconciledsecurities list,securities create,securities prices,securities holdings,securities trades,securities income,securities adjust,securities import-prices,securities delete-pricesexport turtleschema
Most commands that accept --account-id also accept --account-name as an alternative. The transactions create command supports --line-items with a JSON array for multi-line-item (split) transactions.
Use --format compact for machine-readable single-line JSON output (default is pretty-printed).
Shell Completions
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
Claude Code Skill
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.
Safety Features
- Write guard: Before any mutation, the server checks if Banktivity.app has the vault open (via
lsof). If it does, writes are blocked to prevent corruption. - No persistent history tracking: Banktivity uses its own sync mechanism. Core Data's built-in history tracking would add unrecognized metadata that corrupts the vault.
- Background contexts: All writes use background
NSManagedObjectContextinstances withperformAndWaitfor data integrity.
How It Works
Banktivity's .bank8 bundle is a directory containing compiled Core Data models (.momd files) and a SQLite database (StoreContent/core.sql). This server:
- Loads and merges all
.momdmodel bundles from the vault - Opens the SQLite store via
NSPersistentContainer(no history tracking) - Exposes 64 MCP tools over stdio transport
- Uses KVC (
value(forKey:)) to access entities since we load Banktivity's own compiled models at runtime
License
[MIT](LICENSE)
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: sflinter
- Source: sflinter/banktivity-swift-mcp
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.