
sflinter/banktivity-swift-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
銀行の個人金融ファイル MCP サーバー — Swift/Core Data は、CloudKit の安全読み取り/書き込みアクセスのために書き直します
概要
Swift ライブラリ、MCP サーバー、および Banktivity パーソナル ファイナンス ファイル用の CLI です。 口座、取引、カテゴリ、タグ、テンプレート、インポートルール、スケジュールされた取引、ステートメント、有価証券、RDFエクスポートへの完全な読み取り/書き込みアクセスを提供します。 - — コアデータリポジトリとRDFエクスポートの純粋なドメインライブラリ、サーバー依存関係なし - — MCPサーバーは、ClaudeのようなAIアシスタントのために、ステレオ上で64ツールを公開 - - - スクリプトと自動化のためのスタンドアローンCLI banktivity-mcp (TypeScript/Node.js) でインスパイアされると、Swift でグラウンドアップリライトされます。 元は、Core Data の SQLite ストアを直接読み書きするために、Core Data の内部変更のトラッキングを迂回するために、より良い sqlite3 を使用します。 これは、読み書きのために機能しますが、直接SQL書き込みはCloudKitの同期に見えません。銀行の通信はデータが変更されず、vaultは破損または同期に失敗する可能性があります.
概要(AI 翻訳)
Swift ライブラリ、MCP サーバー、および Banktivity パーソナル ファイナンス ファイル用の CLI です。 [.bank8]の脆弱性、アカウント、トランザクション、カテゴリ、タグ、テンプレート、インポートルール、スケジュールされたトランザクション、ステートメント、有価証券、RDFエクスポートへの完全な読み取り/書き込みアクセスを提供します。
- BanktivityLib — コアデータリポジトリとRDFエクスポートの純粋なドメインライブラリ、サーバー依存関係なし
- banktivity-mcp — MCP サーバーは、Claude のような AI アシスタント向けに 64 ツールを公開
- banktivity-cli — スクリプトと自動化のためのスタンドアローンCLI
banktivity-mcp (TypeScript/Node.js) でインスパイアされると、Swift でグラウンドアップリライトされます。 元は、Core DataのSQLiteストアを直接読み書きするために[better-sqlite3を使用します。コアデータの内部変更トラッキングを迂回します。 これは、読み書きのために機能しますが、直接SQL書き込みはCloudKitの同期に見えません。銀行の通信はデータが変更されず、vaultは破損または同期に失敗する可能性があります。 このSwiftバージョンは[[T2]を使用します。そのため、すべてのミューテーションはCore DataのAPIを通過し、適切な変更トラッキングとCloudKitの互換性を保証します。
**WARNING:このサーバーは、銀行の通信データを変更できます.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
banktivity-swift-mcp
A Swift library, MCP server and CLI for Banktivity personal finance vaults (.bank8). It reads and writes accounts, transactions, categories, tags, statements, securities, templates, import rules and scheduled transactions, and exports the vault as RDF.
- banktivity-mcp: MCP server exposing 77 tools over stdio, for AI assistants such as Claude
- banktivity-cli: standalone CLI for scripting and automation, with JSON output
- BanktivityLib: the Core Data repositories both are built on
Every write goes through Core Data (NSPersistentContainer), never direct SQL. The rules it follows (how amounts are counted, how running balances are kept, how changes reach other devices) were checked against Banktivity’s own frameworks; see How it works with Banktivity.
Before you start
This tool modifies your financial records. Write commands make real changes to your vault, and AI assistants can and will make mistakes. Back up the vault before any write session, and consider working on a copy until you trust your workflow. The authors are not responsible for data loss or corruption.
- Quit Banktivity first. Writes are refused while Banktivity has the vault open (detected with
lsof). Close everybanktivity-mcpandbanktivity-cliprocess before opening the vault in Banktivity again. - One process per vault. Writes are serialized within a process, which covers concurrent MCP tool calls, but this is not a cross-process lock. Never run two servers or CLIs against the same vault at once.
- IDs are local to one store. The numeric IDs returned are Core Data row IDs for the SQLite file you opened. The same record has a different ID on another Mac syncing the vault, and IDs can change after a restore, import or migration. An ID replayed elsewhere points at a different real record. Resolve IDs in the same session on the machine you are writing to, and read a row back before changing it. The stable identifier is
pUniqueID.
Requirements
- macOS 14 or later
- Banktivity 10. Behaviour has been verified against Banktivity 10.2.2.
- A Banktivity vault (
.bank8)
Finding your vault
Banktivity 10 keeps synced vaults in its app-group library, not in ~/Documents:
~/Library/Group Containers/group.com.iggsoftware.banktivity.library/IGGFinance/production/Documents//1.bank8
library.txt in .../IGGFinance/production/ lists the local documents by UUID. A symlink with a friendlier name is convenient:
ln -s ~/Library/Group\ Containers/group.com.iggsoftware.banktivity.library/IGGFinance/production/Documents//1.bank8 \
~/Documents/Banktivity/My\ Accounts.bank8
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"banktivity": {
"command": "/Users/you/.local/bin/banktivity-mcp",
"env": { "BANKTIVITY_FILE_PATH": "/Users/you/Documents/Banktivity/My Accounts.bank8" }
}
}
}