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 how much did I spend on groceries this month?"
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
A complete, open-source single tenant MCP server for the full YNAB v1 API. Every endpoint in YNAB's OpenAPI spec is reachable through one of the tools below -- including payee locations, category groups, user info, plan settings, and account creation, which most other YNAB MCP servers skip.
Runs two ways:
Locally over stdio -- for Claude Desktop / Claude Code, zero hosting required.
Remotely over HTTP -- for claude.ai / Cowork connectors, deployable to Fly.io with the included Dockerfile.
View the full product and technical design here.
Tools
23 tools cover all 30 YNAB endpoint paths (several endpoints are consolidated behind one tool via a view/action parameter to avoid near-duplicate tools). Full list with exact endpoint coverage: docs/tools.md.
Read | Write |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Related MCP server: YNAB MCP Server
Quick start (local, stdio)
Requires Node.js 20+. Grab a YNAB personal access token first.
npx ynab-mcp-serverPoint your MCP client (Claude Desktop, Claude Code, etc.) at it. For Claude Desktop, add to claude_desktop_config.json:
{
"mcpServers": {
"ynab": {
"command": "npx",
"args": ["ynab-mcp-server"],
"env": {
"YNAB_ACCESS_TOKEN": "your-token-here",
"YNAB_READ_ONLY": "false"
}
}
}
}Configuration
Env var | Required | Default | Description |
| yes | -- | Your YNAB personal access token. Never logged, never echoed in tool output. |
| no |
| When |
| no |
| Override for testing against a mock server. |
HTTP mode (below) needs three more: PORT, PUBLIC_URL, MCP_HTTP_PASSWORD. See .env.example for all of them with descriptions.
Remote (HTTP) deployment on Fly.io
The HTTP transport is gated by OAuth (required for claude.ai/Cowork connector approval). This is single-tenant OAuth: there's no concept of separate user accounts, it just gates access to your instance behind one shared password. See docs/architecture.md for why and how.
Install flyctl and
fly auth login.fly launch --no-deployfrom this directory (it will readfly.toml; rename theappthere first if you want a specific subdomain).Set secrets (never put these in
fly.toml, which is committed to git):fly secrets set YNAB_ACCESS_TOKEN=your-token-here fly secrets set MCP_HTTP_PASSWORD=choose-a-strong-passwordEdit
fly.toml'sPUBLIC_URLto match your actual*.fly.devhostname (or custom domain), then:fly deployIn claude.ai / Cowork, add a custom connector pointing at
https://<your-app>.fly.dev/mcp. You'll be redirected to a login page on your own instance -- enterMCP_HTTP_PASSWORDto approve the connection.
Notes:
Single
shared-cpu-1xmachine, no volume. OAuth session state (registered clients, tokens) lives in memory and is lost on redeploy or restart -- you'll just need to reconnect the connector afterwards. Acceptable trade-off for a low-traffic personal instance; see the TDD.fly.toml's[http_service]is configured to stay always-on (not scaled to zero) for exactly that reason -- a stop/start cycle would otherwise force reconnection too.
Development
npm install
npm run dev:stdio # run src/stdio.ts directly with tsx
npm run dev:http # run src/http.ts directly with tsx
npm run typecheck
npm run lint # biome check
npm run lint:fix
npm test
npm run build # bundles dist/stdio.js and dist/http.js with tsupSee docs/architecture.md for the repo layout and request-flow details.
License
MIT -- see LICENSE.
Available Tools
23 toolscreate_accountCreate an accountADestructive
Creates a new account in a plan. There is no update/delete endpoint for accounts in the YNAB API -- once created, an account's name/type/balance can only be changed from the YNAB app itself. Amounts are in milliunits: 1000 = one unit of currency (e.g. $1.00 is 1000, -$12.34 is -12340). Covers POST /plans/{plan_id}/accounts.
Inputs: name (required), type (required), balance (required), plan_id (required).
create_categoryCreate a categoryADestructive
Creates a new category within an existing category group. To also set a goal at creation time, pass goal_target (and optionally goal_target_date / goal_frequency / goal_needs_whole_amount). Amounts are in milliunits: 1000 = one unit of currency (e.g. $1.00 is 1000, -$12.34 is -12340). Covers POST /plans/{plan_id}/categories.
Inputs: name (required), plan_id (required), category_group_id (required), note, +4 more.
create_category_groupCreate a category groupBDestructive
Creates a new category group. Covers POST /plans/{plan_id}/category_groups.
Inputs: name (required), plan_id (required).
create_payeeCreate a payeeCDestructive
Creates a new payee. Covers POST /plans/{plan_id}/payees.
Inputs: name (required), plan_id (required).
get_accountGet an accountBRead-only
Returns a single account. Covers GET /plans/{plan_id}/accounts/{account_id}.
Inputs: plan_id (required), account_id (required).
get_budgetGet budget dataARead-only
Consolidated read access to plan-month budgeting data. Select a "view":
overview: all plan months (summary amounts only). Covers GET /plans/{plan_id}/months.
month: a single month's categories with assigned/activity/available amounts. Requires "month" (defaults to "current"). Covers GET /plans/{plan_id}/months/{month}.
category: category groups and categories. If "category_id" is given (with "month"), returns that one category's amounts for that month (GET /plans/{plan_id}/months/{month}/categories/{category_id}); otherwise returns all category groups with categories at current-month amounts (GET /plans/{plan_id}/categories).
scheduled: scheduled (future/recurring) transactions. If "scheduled_transaction_id" is given, returns that one (GET .../scheduled_transactions/{id}); otherwise returns all (GET .../scheduled_transactions).
money_movements: individual money movements between categories / Ready to Assign. If "month" is given, scoped to that month; otherwise all.
money_movement_groups: money movement groups (movements performed together). If "month" is given, scoped to that month; otherwise all.
Inputs: view (required), plan_id (required), month, category_id, +2 more.
get_category_groupGet a category groupBRead-only
Returns a single category group with its categories. Derived from GET /plans/{plan_id}/categories (there is no single-group GET endpoint).
Inputs: plan_id (required), category_group_id (required).
get_payee_locationGet a payee locationCRead-only
Returns a single payee location. Covers GET /plans/{plan_id}/payee_locations/{payee_location_id}.
Inputs: plan_id (required), payee_location_id (required).
get_planGet a planARead-only
Returns a single plan with every related entity (accounts, categories, payees, transactions, etc.) -- effectively a full plan export. This is a large response; prefer the more targeted tools (list_accounts, get_budget, get_transactions, etc.) unless you specifically need a full export. Covers GET /plans/{plan_id}.
Inputs: plan_id (required), last_knowledge_of_server.
get_plan_settingsGet plan settingsARead-only
Returns date format and currency format settings for a plan. Read-only -- YNAB does not expose a way to change these via the API. Covers GET /plans/{plan_id}/settings.
Inputs: plan_id (required).
get_transactionsGet transactionsARead-only
Consolidated read access to transactions, excluding pending ones. Provide at most one scope filter -- checked in this priority order: transaction_id > account_id > category_id > payee_id > month. With no scope filter, returns all plan transactions. Covers GET /plans/{plan_id}/transactions, /accounts/{account_id}/transactions, /categories/{category_id}/transactions, /payees/{payee_id}/transactions, /months/{month}/transactions, and /transactions/{transaction_id}.
Inputs: plan_id (required), type, month, payee_id, +6 more.
get_userGet authenticated userARead-only
Returns the id of the user that owns the configured YNAB access token. Covers GET /user.
Inputs: no named parameters.
list_accountsList accountsBRead-only
Returns every account for a plan. Covers GET /plans/{plan_id}/accounts.
Inputs: plan_id (required), last_knowledge_of_server.
list_category_groupsList category groupsARead-only
Returns all category groups for a plan (without their categories). YNAB has no dedicated list endpoint for groups; this is derived from GET /plans/{plan_id}/categories.
Inputs: plan_id (required).
list_payee_locationsList payee locationsARead-only
Returns payee locations (GPS coordinates captured from the mobile apps). Not all payees have locations. Scope with payee_id to get only that payee's locations. Covers GET /plans/{plan_id}/payee_locations and GET /plans/{plan_id}/payees/{payee_id}/payee_locations.
Inputs: plan_id (required), payee_id.
list_payeesList payees / get a payeeARead-only
Returns all payees for a plan, or a single payee if payee_id is given. Covers GET /plans/{plan_id}/payees and GET /plans/{plan_id}/payees/{payee_id}.
Inputs: plan_id (required), payee_id, last_knowledge_of_server.
list_plansList plansARead-only
Returns summary information for every plan (formerly "budget") accessible to this token. Covers GET /plans.
Inputs: include_accounts.
modify_budgetModify a month's budgeted amount or a category's goalADestructive
Two actions:
set_amount: sets the assigned (budgeted) amount for a category in a specific month. Requires month, category_id, amount. Covers PATCH /plans/{plan_id}/months/{month}/categories/{category_id}.
set_goal: sets or clears a category's goal (goal_target / goal_target_date / goal_frequency / goal_needs_whole_amount). Requires category_id. Covers PATCH /plans/{plan_id}/categories/{category_id}. Amounts are in milliunits: 1000 = one unit of currency (e.g. $1.00 is 1000, -$12.34 is -12340).
Inputs: action (required), plan_id (required), category_id (required), month, +5 more.
modify_scheduled_transactionsCreate, update, or delete a scheduled transactionADestructive
Manages scheduled (future/recurring) transactions. Read access is via get_budget with view="scheduled". Three actions:
create: requires "fields" with at least account_id and date. Covers POST /plans/{plan_id}/scheduled_transactions.
update: requires "scheduled_transaction_id" and "fields" (only the fields to change). Covers PUT /plans/{plan_id}/scheduled_transactions/{scheduled_transaction_id}.
delete: requires "scheduled_transaction_id". Covers DELETE /plans/{plan_id}/scheduled_transactions/{scheduled_transaction_id}. Splitting a scheduled transaction is not supported by the YNAB API.
Inputs: action (required), plan_id (required), fields, scheduled_transaction_id.
modify_transactionsCreate, update, delete, or import transactionsADestructive
Four actions:
create: creates one or more new transactions. Requires "transactions" (each needs account_id, date, amount).
update: updates transaction(s). For a single transaction via PUT, provide "transaction_id" and "transaction". For bulk update via PATCH, provide "transactions" (each item needs "id" or "import_id" to identify the target, plus the fields to change).
delete: deletes a single transaction. Requires "transaction_id".
import: triggers YNAB to import any pending transactions on linked accounts for this plan. No other fields needed. Amounts are in milliunits: 1000 = one unit of currency (e.g. $1.00 is 1000, -$12.34 is -12340).
Inputs: action (required), plan_id (required), transaction, transactions, +1 more.
update_categoryUpdate a categoryBDestructive
Updates a category's name, note, or goal fields. Passing null for goal_target removes any existing goal. Amounts are in milliunits: 1000 = one unit of currency (e.g. $1.00 is 1000, -$12.34 is -12340). Covers PATCH /plans/{plan_id}/categories/{category_id}.
Inputs: plan_id (required), category_id (required), name, note, +4 more.
update_category_groupUpdate a category groupCDestructive
Renames a category group. Covers PATCH /plans/{plan_id}/category_groups/{category_group_id}.
Inputs: name (required), plan_id (required), category_group_id (required).
update_payeeUpdate a payeeCDestructive
Renames a payee. Covers PATCH /plans/{plan_id}/payees/{payee_id}.
Inputs: name (required), plan_id (required), payee_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 23 tools
Several tools overlap meaningfully: get_budget's 'category' and 'scheduled' views duplicate what list_category_groups/get_category_group and the read side of modify_scheduled_transactions do, and modify_budget's set_goal duplicates update_category's goal fields. The descriptions are thorough and the priority-ordered scope rules in get_transactions help, but an agent still faces real choices about which tool to pick for category, scheduled, and goal reads/writes.
Most names follow a clean verb_noun snake_case pattern (get_plan, list_accounts, create_category, update_category_group), which is consistent and readable. The deviations are the multi-action dispatchers (modify_budget, modify_transactions, modify_scheduled_transactions) and list_payees silently doubling as a get-by-id, which slightly break the list/get convention.
At 23 tools this sits in the heavy range for a single-domain server, partly because CRUD for each entity is split into separate create_/update_ tools while transactions and scheduled transactions are collapsed into polymorphic modify_ tools. The surface roughly matches the YNAB API breadth, but some consolidation (or conversely consistent splitting) would make the count feel less bloated.
Coverage is broad: plans, accounts, categories/groups, payees, locations, transactions, scheduled transactions, months, and settings all have read paths, and most entities have create/update plus transaction delete and import. Gaps are modest—money movements and money movement groups are read-only (no create/delete despite the API supporting POST), and account mutation is limited by the upstream API—so agents can still complete core workflows.
Maintenance
Related MCP Connectors
Every Canopy public API operation as a tool, run as you after a browser sign-in or on an API key.
Track expenses, budgets, balances, transfers, and multi-currency reports with OAuth-secured tools.
Work with transactions, budgets, forecasts and insights from the PocketSmith personal finance tool.
A tool for each Pachca API method: messages, chats, threads, reminders, users and more
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.-
- AlicenseCqualityCmaintenanceExposes YNAB API endpoints as MCP tools, allowing AI assistants to manage budgets, accounts, transactions, and more through natural language.4177 PyPI101MIT
- AlicenseAqualityCmaintenanceConnects AI assistants to YNAB budgets, providing over 30 tools for managing budgets, accounts, transactions, categories, and analytics with delta sync and caching.47110 PyPI49AGPL 3.0
- AlicenseAqualityDmaintenanceEnables users to interact with YNAB budgets, accounts, transactions, and more through a comprehensive set of tools with batch operations, deterministic analysis, and undo support.26104 npm6MIT