@iflow-mcp/philippjbauer-actual-budget-mcp-server
v1.0.0
Published
MCP server for Actual Budget API - enables AI agents to review and categorize transactions
Downloads
20
Readme
Actual Budget MCP Server
A Model Context Protocol (MCP) server that provides AI agents with access to the Actual Budget API. This server enables intelligent transaction review, automatic categorization, and budget management through conversational AI interfaces.
Features
- Transaction Management: Get, update, and bulk-update transactions
- Smart Categorization: Tools for AI-powered transaction categorization based on notes and patterns
- Payee Management: Search, create, and manage payees with fuzzy matching
- Category Management: Search, create, and manage categories and category groups
- Account Operations: View accounts and check balances
- Intelligent Matching: Find or create payees and categories automatically
Use Cases
This MCP server is designed for AI agents to:
- Review Uncategorized Transactions: Automatically find transactions that need categorization
- Smart Categorization: Parse transaction notes to identify appropriate payees and categories
- Match or Create Entities: Intelligently match existing payees/categories or create new ones
- Batch Operations: Update multiple transactions at once
- Budget Analysis: Query account balances and transaction patterns
Prerequisites
- Node.js 18.0.0 or higher
- An Actual Budget server instance
- Your budget's Sync ID (found in Settings → Show advanced settings → Sync ID)
Installation
Clone this repository or download the source code
Install dependencies:
npm installCreate a
.envfile based on.env.example:cp .env.example .envConfigure your
.envfile:ACTUAL_SERVER_URL=http://localhost:5006 ACTUAL_SERVER_PASSWORD=your-server-password ACTUAL_BUDGET_ID=your-budget-sync-id ACTUAL_BUDGET_PASSWORD=your-encryption-password-if-enabled ACTUAL_DATA_DIR=./data
Building
Compile the TypeScript source:
npm run buildRunning
Standalone Mode
Run directly with stdio transport (for use with MCP clients):
npm startDevelopment Mode
Build and run in one command:
npm run devConfiguration
Environment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| ACTUAL_SERVER_URL | Yes | URL of your Actual Budget server |
| ACTUAL_SERVER_PASSWORD | Yes | Server login password |
| ACTUAL_BUDGET_ID | Yes | Sync ID of your budget |
| ACTUAL_BUDGET_PASSWORD | No | Encryption password if E2EE is enabled |
| ACTUAL_DATA_DIR | No | Directory for local cache (default: ./data) |
Finding Your Budget Sync ID
- Open Actual Budget in your browser
- Go to Settings
- Click "Show advanced settings"
- Copy the "Sync ID"
Available Tools
Health Check
health: Check server and Actual Budget connection status
Transactions
get-transactions: Get transactions for an account within a date rangeget-uncategorized-transactions: Find all transactions without categoriesupdate-transaction: Update transaction fields (payee, category, notes)bulk-update-transactions: Update multiple transactions at oncesmart-categorize-transaction: AI-powered categorization based on notes
Payees
get-payees: List all payeesfind-matching-payee: Search payees with fuzzy matchingcreate-payee: Create a new payeeupdate-payee: Update payee detailsget-or-create-payee: Find existing or create new payee (recommended)
Categories
get-categories: List all categoriesget-category-groups: List category groupsfind-matching-category: Search categories with fuzzy matchingcreate-category: Create a new categoryget-or-create-category: Find existing or create new category (recommended)
Accounts
get-accounts: List all accountsget-account-balance: Get account balance (optionally as of a date)find-account-by-name: Search for accounts by name
Usage Example Workflow
Here's how an AI agent might use these tools to automatically categorize transactions:
- Get accounts:
get-accountsto find available accounts - Get uncategorized:
get-uncategorized-transactionsfor a specific account - For each transaction:
- Parse the
notesfield to extract payee and category hints - Use
find-matching-payeeto search for existing payees - If not found, use
create-payeeorget-or-create-payee - Use
find-matching-categoryto search for categories - If not found, use
create-categoryorget-or-create-category - Use
update-transactionto assign the payee and category
- Parse the
- Batch updates: Use
bulk-update-transactionsfor multiple similar transactions
Integration with AI Assistants
Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"actual-budget": {
"command": "node",
"args": ["/path/to/actual-mcp/dist/index.js"],
"env": {
"ACTUAL_SERVER_URL": "http://localhost:5006",
"ACTUAL_SERVER_PASSWORD": "your-password",
"ACTUAL_BUDGET_ID": "your-budget-id"
}
}
}
}Other MCP Clients
Any MCP-compatible client can use this server by spawning it as a subprocess with stdio transport.
Data Format Notes
Amounts
Actual Budget stores amounts as integers without decimal places. For example:
$120.30is stored as12030- Use
utils.amountToInteger()andutils.integerToAmount()for conversions
Dates
Dates are in ISO format:
- Transactions:
YYYY-MM-DD(e.g.,2024-03-15) - Months:
YYYY-MM(e.g.,2024-03)
Transaction Fields
payee_id: Reference to payee (use in get requests)payee: Payee ID (use in create/update requests)payee_name: Auto-creates/matches payee (only in create requests)category: Category IDnotes: Free-form text field for notesimported_payee: Original payee name from import
Development
Project Structure
actual-mcp/
├── src/
│ ├── index.ts # Main server entry point
│ └── tools/
│ ├── transactions.ts # Transaction tools
│ ├── payees.ts # Payee tools
│ ├── categories.ts # Category tools
│ └── accounts.ts # Account tools
├── package.json
├── tsconfig.json
└── README.mdAdding New Tools
- Create or edit a tool file in
src/tools/ - Register the tool using
server.registerTool() - Import and call the registration function in
src/index.ts
TypeScript Configuration
The project uses strict TypeScript settings. All code is compiled to ES2022 modules.
Troubleshooting
Connection Issues
- Verify your Actual Budget server is running
- Check that
ACTUAL_SERVER_URLis correct - Ensure
ACTUAL_SERVER_PASSWORDmatches your server password
Budget Not Loading
- Verify
ACTUAL_BUDGET_IDis correct (get from Settings → Advanced) - If using encryption, ensure
ACTUAL_BUDGET_PASSWORDis set - Check the
datadirectory has write permissions
Tool Errors
- Run
healthtool to check connection status - Check console output for detailed error messages
- Ensure Actual Budget API version is compatible (requires
@actual-app/api^7.0.0)
API Reference
For detailed information about the Actual Budget API:
License
This project uses the Actual Budget API which is open source. Please refer to the Actual Budget project for licensing information.
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Support
For issues related to:
- This MCP server: Open an issue in this repository
- Actual Budget API: Visit Actual Budget GitHub
- Model Context Protocol: Visit MCP Documentation
Acknowledgments
- Actual Budget - The fantastic open-source budgeting app
- Model Context Protocol - The standard for AI-application integration
- Anthropic - For Claude and MCP
Version History
1.0.0 (Initial Release)
- Complete transaction management tools
- Payee search and creation
- Category management
- Account operations
- Fuzzy matching for payees and categories
- Batch transaction updates
