YNAB MCP Server
Click on "Deploy 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., "@YNAB MCP Server Show my budget summary"
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.
YNAB MCP Server
An MCP server for YNAB with batch operations, deterministic analysis tools, and robust undo support.
AI Disclosure: This project was built with Claude Code and Cursor. It works and is tested, but the code is largely clanker-made.
Highlights
26 tools covering budgets, accounts, transactions, categories, targets, scheduled transactions, and spending analysis
Deterministic analysis — spending aggregation, trends, income vs expense, recurring-charge and anomaly detection, and a one-call budget health snapshot. Judgment calls (forecasting, reallocation, prioritization) are deliberately left to the calling agent, which has the exact data and more context
Batch operations — create, update, and delete multiple transactions in a single call, with per-item API costs documented where the YNAB API has no bulk endpoint
Undo support — every write operation is recorded and reversible
Smart categorization — transaction category suggestions from payee history and scheduled-transaction matching, with confidence gating so only high-confidence suggestions land in the ready-to-apply actions
Built-in knowledge base — YNAB methodology docs (credit cards, targets, overspending, reconciliation) served as MCP resources
5 workflow prompts — monthly reviews, spending reports, unapproved triage, budget optimization, and subscription audits
Read-only mode — write tools are not even registered, so clients only see tools they can use
Efficient caching — delta sync with YNAB's server knowledge system, configurable TTLs, and client-side rate-limit tracking
Related MCP server: YNAB MCP Server
Setup
Prerequisites
Node.js >= 20
A YNAB personal access token
Usage
Run directly with npx:
YNAB_API_TOKEN=your-token npx @maro-org/ynab-mcpOr install globally:
npm install -g @maro-org/ynab-mcp
YNAB_API_TOKEN=your-token ynab-mcpMCP Client Configuration
Add the server to your MCP client config. For example, in Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"ynab": {
"command": "npx",
"args": ["-y", "@maro-org/ynab-mcp"],
"env": {
"YNAB_API_TOKEN": "your-token"
}
}
}
}For Cursor, add the same structure to .cursor/mcp.json in your project or ~/.cursor/mcp.json globally.
Configuration
All configuration is done through environment variables.
Variable | Description | Default |
| YNAB personal access token | required |
| Override the YNAB API base URL | YNAB default |
| Directory for undo history storage |
|
| Hide and disable all write operations ( |
|
| Cache TTL in seconds for live data |
|
| Cache TTL in seconds for completed past months |
|
| Undo entries kept per budget (oldest are dropped beyond this) |
|
Tools
Budgets
Tool | Description |
| List all budgets with metadata |
| Force-refresh cached data from YNAB |
Accounts
Tool | Description |
| List accounts with balances, filterable by type and on/off budget |
Transactions
Tool | Description |
| Search with filters (dates, amounts, accounts, categories, payees, flags, cleared status) — supports multiple queries in one call |
| Batch create transactions with optional splits (one bulk API call) |
| Batch update existing transactions (one bulk API call; split changes are replaced via delete+recreate) |
| Batch delete transactions (one API call per transaction) |
Categories
Tool | Description |
| Category group hierarchy with IDs and names |
| Target details: type, amounts, underfunded, percent complete, cadence, and deadlines |
| Month-level budgeted/activity/balance per category |
| Batch set budgeted amounts (up to two API calls per category/month pair, max 50) |
| Set or clear a category's target amount and date (the API does not expose target type) |
Spending Analysis & Diagnostics
Tool | Description |
| Spending aggregates by category/payee with top-N ranking; optional |
| Multi-month time series by category, payee, or group; the partial current month is marked and excluded from trends |
| Income vs expense totals with savings rate; partial current month excluded from averages |
| Single-call snapshot: net worth, month totals, overspending, target gaps, credit card payment gaps, RTA, issues |
| Subscription and recurring charge detection from transaction history |
| Flag unusual transactions with leave-one-out statistical baselines |
| Audit feed of budget moves between categories or Ready to Assign, including moves made in the YNAB apps |
All analysis tools are deterministic — no LLM sampling involved. They report facts and clearly-labeled statistical estimates; forecasting and reallocation decisions are left to the calling agent (the workflow prompts walk it through that reasoning using get_targets, get_monthly_budget, and get_scheduled_transactions).
Scheduled Transactions
Tool | Description |
| List scheduled transactions with optional filters |
| Batch create with any of the 13 YNAB frequencies (one API call per item) |
| Batch update scheduled transactions (one API call per item) |
| Batch delete scheduled transactions (one API call per item) |
Smart Tools
Tool | Description |
| Suggest categories for uncategorized transactions based on payee history and patterns |
Suggestions carry confidence levels; only those at or above action_confidence (default high) are included in the ready-to-apply update_actions, and approval is opt-in.
Undo
Tool | Description |
| List recorded undo entries |
| Undo one or more previous write operations by ID |
Resources
Knowledge base resources for YNAB methodology. Workflow prompts reference these automatically.
URI | Topic |
| Core YNAB concepts and terminology |
| Credit card handling |
| Target types and behavior |
| Overspending mechanics |
| Reconciliation workflow |
| API quirks and limitations |
Prompts
Prompt | Description |
| Guided monthly budget review |
| Spending report for a date range |
| Batch review and approve unapproved transactions |
| Analyze budget for optimization opportunities |
| Review recurring charges and manage subscriptions |
Key Concepts
Currency units — All monetary amounts in tool inputs and outputs use standard currency units (e.g., 12.50), not YNAB's native milliunits. Most tools also echo a top-level currency ISO code; get_spending_analysis additionally reports raw *_milliunits totals alongside them.
budget_id — Most tools accept an optional budget_id. Omit it or pass "last-used" to target the most recently accessed budget.
Undo — Every write operation records an undo entry. Use list_undo_history and undo_operations to review or revert changes. The most recent 2000 entries per budget are kept (tunable via YNAB_UNDO_HISTORY_LIMIT).
Read-only mode — Set YNAB_READ_ONLY=true to hide and block all write operations. Useful for exploring your budget safely or restricting an MCP client to read-only access.
Rate limiting — The YNAB API allows 200 requests per rolling hour. The server tracks usage locally and reports when capacity frees up if the limit is reached. (The API used to expose an X-Rate-Limit header the tracker reconciled against; the live API no longer sends it, so the local tracker is the sole signal until a 429 confirms exhaustion.) Tools that cost one API call per item say so in their descriptions.
Development
npm install
npm run dev # run with tsx watch
npm run build # compile TypeScript
npm test # run tests (vitest)
npm run typecheck # type-check without emitting
npm run lint # lint with Biome
npm run ci # typecheck + lint + testLicense
Available Tools
26 toolscreate_scheduled_transactionsCreate Scheduled TransactionsA
Create one or more scheduled transactions. Each successful creation is undoable and costs one YNAB API call (no bulk endpoint exists).
Inputs: transactions (required), budget_id.
create_transactionsCreate TransactionsA
Create one or more transactions in a single call. Each successful creation is undoable.
Inputs: transactions (required), budget_id.
delete_scheduled_transactionsDelete Scheduled TransactionsADestructiveIdempotent
Delete one or more scheduled transactions. Each deletion is undoable and costs one YNAB API call (no bulk endpoint exists).
Inputs: scheduled_transaction_ids (required), budget_id.
delete_transactionsDelete TransactionsADestructiveIdempotent
Delete one or more transactions. Each deletion is undoable by re-creating the transaction. Costs one YNAB API call per transaction against the 200/hour rate limit.
Inputs: transaction_ids (required), budget_id.
detect_anomaliesDetect AnomaliesARead-onlyIdempotent
Find unusual transactions: abnormal amounts for known payees, large charges from new payees, and potential duplicates. Compares each transaction against a baseline built from that payee's other transactions (the transaction itself is excluded). For payees whose history is near-constant the comparison scale is floored, in which case scale_basis is "floor" and scale_multiple is a multiple of that floor rather than a standard deviation.
Inputs: budget_id, since_date, sensitivity, history_months.
detect_recurring_chargesDetect Recurring ChargesARead-onlyIdempotent
Identify subscriptions and recurring charges from transaction patterns. Analyzes transaction history to detect regular outflows, estimates frequency, flags price changes, and cross-references with scheduled transactions. Returns create_scheduled_actions for unmatched recurring charges (suggestions only).
Inputs: budget_id, history_months, include_matched, min_occurrences.
get_accountsGet AccountsARead-onlyIdempotent
Get accounts with optional filtering by type, on-budget flag, and closed state.
Inputs: type, budget_id, on_budget, include_closed.
get_budget_healthGet Budget HealthARead-onlyIdempotent
Single-call budget snapshot and diagnostic. Surfaces net worth, account totals by type, month totals, overspent categories, underfunded targets, credit card payment gaps, uncategorized/unapproved transaction counts, and Ready to Assign status with severity-rated issues. Note: the YNAB API does not expose whether overspending happened on cash or credit; judge that from the credit card payment gaps and the transactions themselves.
Inputs: month, budget_id.
get_income_expense_summaryGet Income vs Expense SummaryARead-onlyIdempotent
Monthly income vs expense breakdown with savings rate calculation and trend detection across months. The in-progress current month is listed marked partial, and months predating the budget are listed marked no_data; both are excluded from averages and the trend. trend is null when fewer than two complete months are available (e.g. months=2 mid-month, or a budget younger than the window) rather than reporting a fabricated flat rate.
Inputs: months, budget_id.
get_money_movementsGet Money MovementsARead-onlyIdempotent
Audit feed of money moved between categories or to/from Ready to Assign, including moves made in the YNAB apps — the only place the history behind each category's budgeted amount is visible. Use it to explain why a budgeted amount changed, or to see which moves were already made this month before proposing new ones. Movements performed together as one action share a group with its own note.
Inputs: limit, month, budget_id.
get_monthly_budgetGet Monthly BudgetARead-onlyIdempotent
Get a month overview with income/budgeted/activity totals and per-category budget figures (budgeted, activity, balance) with overspending flags. Returns all visible categories by default — set include_hidden=true to include hidden ones. Categories with no activity show zeroes. No target data.
Inputs: month, budget_id, include_hidden.
get_scheduled_transactionsGet Scheduled TransactionsBRead-onlyIdempotent
Get scheduled transactions with optional account/category filtering.
Inputs: budget_id, due_after, account_id, due_before, +1 more.
get_spending_analysisGet Spending AnalysisBRead-onlyIdempotent
Aggregate spending over a date range and rank by category/payee for quick insights. Optionally set time_granularity to also bucket the same spending over time (daily, weekly, day-of-week, week-of-month) to see when money is spent.
Inputs: since_date (required), top_n, group_by, budget_id, +5 more.
get_spending_trendsGet Spending TrendsARead-onlyIdempotent
Multi-month spending time series with trend detection. Groups spending by category, payee, or category group and identifies increasing/decreasing patterns. The in-progress current month is included in the series marked partial, but excluded from trend labels, monthly averages, and moving averages. Trend fields are null when fewer than two complete months are available rather than reporting a fabricated flat trend.
Inputs: top_n, months, group_by, budget_id, +1 more.
get_targetsGet Category TargetsARead-onlyIdempotent
Get categories with target progress details only: target type, amount, date, underfunded amount, months remaining, and percentage complete. Use this when you need target-specific guidance rather than monthly budget balances. Categories without targets return null target fields rather than being omitted.
Inputs: month, group_id, budget_id, include_hidden.
list_budgetsList BudgetsBRead-onlyIdempotent
List available YNAB budgets with key metadata.
Inputs: no named parameters.
list_categoriesList CategoriesARead-onlyIdempotent
Get all categories with their group hierarchy, IDs, and names. No budget figures or target data — lightweight and fast. Use this to resolve category names to IDs before write operations.
Inputs: group_id, budget_id, include_hidden.
list_undo_historyList Undo HistoryBRead-onlyIdempotent
List undoable operations for a budget.
Inputs: limit, offset, budget_id, include_undone.
search_transactionsSearch TransactionsARead-onlyIdempotent
Run one or more transaction searches in a single call with rich filters and sorted results.
Inputs: queries (required), budget_id.
set_category_budgetsSet Category BudgetsAIdempotent
Set budgeted amounts for one or more category/month pairs in a single request. Costs up to two YNAB API calls per pair against the 200/hour rate limit (the prior amount is read before it is written, and the read may be served from cache) — keep batches small.
Inputs: assignments (required), budget_id.
set_category_targetsSet Category TargetsAIdempotent
Create or update targets on one or more categories. Returns previous state for each category.
Inputs: targets (required), budget_id.
suggest_transaction_categoriesSuggest Transaction CategoriesARead-onlyIdempotent
Analyze uncategorized (and optionally unapproved) transactions using payee history, amount patterns, and scheduled transaction matching. Returns categorization suggestions with confidence levels — does NOT apply changes. update_actions (for update_transactions) contains only suggestions at or above action_confidence (default high); review lower-confidence suggestions manually before applying them.
Inputs: limit, approve, budget_id, since_date, +5 more.
sync_budget_dataSync Budget DataARead-onlyIdempotent
Force a fresh sync of all cached budget data (accounts, categories, payees, transactions, scheduled transactions) from the YNAB API. Use this when you suspect external changes (e.g., bank imports, mobile app edits) that may not be reflected yet. Costs up to 6 API requests against the 200/hour rate limit.
Inputs: budget_id.
undo_operationsUndo OperationsADestructive
Undo one or more prior operations with conflict detection. Use force=true to override conflicts.
Inputs: undo_history_ids (required), force.
update_scheduled_transactionsUpdate Scheduled TransactionsAIdempotent
Update one or more scheduled transactions. Each successful update is undoable and costs one YNAB API call (no bulk endpoint exists).
Inputs: transactions (required), budget_id.
update_transactionsUpdate TransactionsAIdempotent
Update one or more existing transactions in a single call. Each successful update is undoable.
Inputs: transactions (required), budget_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 26 tools
Each tool targets a distinct area (budgets, accounts, transactions, categories, scheduled transactions, analysis, etc.). Even similar-sounding tools like get_spending_analysis, get_spending_trends, and get_income_expense_summary are clearly differentiated by their descriptions and scope.
Most tools follow a verb_noun pattern (list_, get_, create_, update_, delete_, set_, etc.). However, there are minor inconsistencies: 'list_categories' vs 'get_targets', 'search_transactions' deviates, and 'undo_operations' vs 'list_undo_history' use different prefixes.
With 26 tools, the count is above the typical 3-15 range, but given the complexity of the YNAB domain (budgets, accounts, transactions, scheduled transactions, categories, targets, analysis, anomaly detection), each tool earns its place. It is slightly heavy but not excessive.
The tool surface covers most core YNAB operations: budgets, accounts, transactions, scheduled transactions, categories, targets, undo, sync, and multiple analysis tools. Minor gaps exist (e.g., no create_category or delete_category), but these are likely API limitations, and the set is comprehensive for typical usage.
Maintenance
Related MCP Connectors
Multi-currency budgeting: read and update your accounts, transactions, categories and budgets.
Read your accounts, budgets and net worth, and draft changes you confirm.
Work with transactions, budgets, forecasts and insights from the PocketSmith personal finance tool.
Track expenses, budgets, balances, transfers, and multi-currency reports with OAuth-secured tools.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with YNAB budgets through natural language. Supports managing accounts, categories, transactions, and budget months with 21 tools for comprehensive budget operations.-
- AlicenseAqualityCmaintenanceConnects AI assistants to YNAB budgets, providing over 30 tools for managing budgets, accounts, transactions, categories, and analytics with delta sync and caching.47128 PyPI49AGPL 3.0
- AlicenseAqualityCmaintenanceEnables reading and writing YNAB budget data, such as listing budgets, accounts, categories, transactions, and creating or updating transactions, through natural language commands.8MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to connect to YNAB budgets, providing tools for accounts, transactions, categories, payees, and analytics, including search, bulk operations, and delta sync.47AGPL 3.0