SB

sflinter/banktivity-swift-mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

20 stars 12 forks 품질 75 트렌드 14MIT

Banktivity 개인 금융 파일을위한 MCP 서버 - CloudKit-safe 읽기 / 쓰기 액세스를위한 Swift / Core Data rewrite

개요

Swift 라이브러리, MCP 서버 및 Banktivity 개인 금융 파일에 대한 CLI. .bank8 vaults에 전체 읽기 / 쓰기 액세스를 제공합니다 - 계정, 거래, 카테고리, 태그, 템플릿, 수입 규칙, 일정한 거래, 성명, 증권 및 RDF 수출. - — 핵심 데이터 저장소 및 RDF 수출, 서버 종속성이없는 순수 도메인 라이브러리 - - MCP 서버는 Claude와 같은 AI 조수에 대한 64 도구를 exposing, - 스크립트 및 자동화를위한 독립 CLI Banktivity-mcp (TypeScript/Node.js)에 영감을 얻은 이 배경은 Swift에서 다시 쓰기입니다. Core Data의 SQLite 저장소를 직접 읽고 쓰는 Original use better-sqlite3. 읽을 수 있지만 직접 SQL 쓰기는 CloudKit sync에 보이지 않습니다. Banktivity는 데이터가 변경되지 않으며 vault는 손상되거나 동기화되지 않습니다.

개요(AI 번역)

Swift 라이브러리, MCP 서버 및 Banktivity 개인 금융 파일에 대한 CLI. 전체 읽기 / 쓰기 액세스 제공 .bank8 vaults - 계정, 거래, 카테고리, 태그, 템플릿, 수입 규칙, 예정된 거래, 문, 증권, RDF 수출.

  • BanktivityLib - 핵심 데이터 저장소 및 RDF 수출을 가진 순수한 도메인 라이브러리, 서버 의존성 없음
  • ** banktivity-mcp** - MCP 서버는 Claude와 같은 AI 조수에 64 도구를 폭발 -banktivity-cli - 스크립트 및 자동화를 위한 독립 CLI

Banktivity-mcp (TypeScript/Node.js)에 영감을 얻은 이 배경은 Swift에서 다시 쓰기입니다. 원래는 better-sqlite3를 사용하여 Core Data의 SQLite 저장소를 직접 작성하고, Core Data의 내부 변경 추적을 우회합니다. 읽을 수 있지만 직접 SQL 쓰기는 CloudKit sync에 보이지 않습니다. Banktivity는 데이터가 변경되지 않으며 vault는 손상되거나 동기화되지 않습니다. 이 Swift 버전은 NSPersistentContainer]를 사용하므로 모든 mutations는 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 every banktivity-mcp and banktivity-cli process 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
GitHub에서 전체 README 보기

설치

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" } } } }