banktivity-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@banktivity-mcplist my accounts and their balances"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Banktivity SDK & MCP Server
A TypeScript SDK and MCP (Model Context Protocol) server for accessing Banktivity personal finance data.
Packages
This monorepo contains two packages:
@mhriemers/banktivity-sdk- A standalone TypeScript SDK for interacting with Banktivity databases@mhriemers/banktivity-mcp- An MCP server built on top of the SDK for use with Claude Desktop and Claude Code
Related MCP server: LunchMoney MCP Server
Quick Start
Installation from npm
npm install -g @mhriemers/banktivity-mcpUsage with Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"banktivity": {
"command": "npx",
"args": ["@mhriemers/banktivity-mcp"],
"env": {
"BANKTIVITY_FILE_PATH": "/path/to/your/Personal.bank8"
}
}
}
}Usage with Claude Code
Add the MCP server using the Claude Code CLI:
claude mcp add banktivity -- npx @mhriemers/banktivity-mcpThen set the environment variable:
export BANKTIVITY_FILE_PATH="/path/to/your/Personal.bank8"Development Setup
If you want to run from source:
git clone https://github.com/mhriemers/banktivity-mcp.git
cd banktivity-mcp
npm install
npm run buildSDK Usage
The SDK can be used independently in any TypeScript/JavaScript project:
import { BanktivityClient } from "@mhriemers/banktivity-sdk";
const client = new BanktivityClient({ filePath: "/path/to/file.bank8" });
// List accounts
const accounts = client.accounts.list();
console.log(accounts);
// Get account balance
const balance = client.accounts.getBalance(accountId);
// Create a transaction
const result = client.transactions.create({
title: "Coffee Shop",
date: "2024-01-15",
lineItems: [
{ accountId: 1, amount: -5.50 },
{ accountId: 42, amount: 5.50 }
]
});
// Search transactions
const transactions = client.transactions.search("grocery");
// Close connection when done
client.close();SDK API Reference
Accounts
client.accounts.list({ includeHidden?: boolean }): Account[]
client.accounts.get(id: number): Account | null
client.accounts.findByName(name: string): Account | null
client.accounts.getBalance(id: number): number
client.accounts.create(input: CreateAccountInput): number
client.accounts.getNetWorth(): NetWorth
client.accounts.getCategoryAnalysis(type: "income" | "expense", filter?): CategorySpending[]Transactions
client.transactions.list(filter?: TransactionFilter): Transaction[]
client.transactions.get(id: number): Transaction | null
client.transactions.search(query: string, limit?: number): Transaction[]
client.transactions.count(): number
client.transactions.create(input: CreateTransactionInput): { transactionId, lineItemIds }
client.transactions.update(id: number, input: UpdateTransactionInput): boolean
client.transactions.delete(id: number): boolean
client.transactions.reconcile(ids: number[], cleared?: boolean): numberLine Items
client.lineItems.get(id: number): LineItem | null
client.lineItems.getForTransaction(transactionId: number): LineItem[]
client.lineItems.create(transactionId, accountId, amount, memo?): number
client.lineItems.update(id: number, input: UpdateLineItemInput): boolean
client.lineItems.delete(id: number): booleanTags
client.tags.list(): Tag[]
client.tags.get(id: number): Tag | null
client.tags.getByName(name: string): Tag | null
client.tags.create(name: string): number
client.tags.tagTransaction(transactionId, tagId): number
client.tags.untagTransaction(transactionId, tagId): numberTemplates
client.templates.list(): TransactionTemplate[]
client.templates.get(id: number): TransactionTemplate | null
client.templates.create(input: CreateTransactionTemplateInput): number
client.templates.update(id: number, input: UpdateTransactionTemplateInput): boolean
client.templates.delete(id: number): booleanImport Rules
client.importRules.list(): ImportRule[]
client.importRules.get(id: number): ImportRule | null
client.importRules.create(input: CreateImportRuleInput): number
client.importRules.update(id: number, input: UpdateImportRuleInput): boolean
client.importRules.delete(id: number): boolean
client.importRules.match(description: string): ImportRule[]Scheduled Transactions
client.scheduledTransactions.list(): ScheduledTransaction[]
client.scheduledTransactions.get(id: number): ScheduledTransaction | null
client.scheduledTransactions.create(input: CreateScheduledTransactionInput): number
client.scheduledTransactions.update(id: number, input: UpdateScheduledTransactionInput): boolean
client.scheduledTransactions.delete(id: number): booleanMCP Tools
The MCP server provides 35 tools for interacting with Banktivity:
Account Tools
Tool | Description |
| List all accounts with types and balances |
| Get balance for a specific account |
| Create a new account |
| Get spending breakdown by expense category |
| Get income breakdown by income category |
| Calculate net worth |
| Get database summary |
Transaction Tools
Tool | Description |
| Get transactions with optional filtering |
| Search transactions by payee or notes |
| Create a new transaction with line items |
| Update transaction details |
| Delete a transaction |
| Mark transactions as cleared |
Line Item Tools
Tool | Description |
| Get a specific line item |
| Update a line item |
| Delete a line item |
| Add a line item to a transaction |
Tag Tools
Tool | Description |
| List all tags |
| Create a new tag |
| Add or remove a tag from a transaction |
Template Tools
Tool | Description |
| List all templates |
| Get a specific template |
| Create a new template |
| Update a template |
| Delete a template |
Import Rule Tools
Tool | Description |
| List all import rules |
| Get a specific import rule |
| Create a new import rule |
| Update an import rule |
| Delete an import rule |
| Test which rules match a description |
Scheduled Transaction Tools
Tool | Description |
| List all scheduled transactions |
| Get a specific scheduled transaction |
| Create a new scheduled transaction |
| Update a scheduled transaction |
| Delete a scheduled transaction |
Project Structure
banktivity-mcp/
├── package.json # Root workspace config
├── tsconfig.base.json # Shared TypeScript config
├── packages/
│ ├── sdk/ # @mhriemers/banktivity-sdk package
│ │ ├── src/
│ │ │ ├── index.ts # Main exports
│ │ │ ├── client.ts # BanktivityClient class
│ │ │ ├── types.ts # TypeScript interfaces
│ │ │ ├── constants.ts # Database constants
│ │ │ ├── errors.ts # Custom error classes
│ │ │ ├── connection.ts # Database connection
│ │ │ ├── utils/ # Utility functions
│ │ │ └── repositories/ # Data access layer
│ │ └── package.json
│ │
│ └── mcp/ # @mhriemers/banktivity-mcp package
│ ├── src/
│ │ ├── index.ts # MCP server entry point
│ │ └── tools/ # Tool implementations
│ └── package.jsonSecurity
This server provides both read and write access to your Banktivity data. Write operations will modify your database directly. Always ensure you have backups before using write operations.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mhriemers/banktivity-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server