Skip to main content
Glama
ynab-mcp-server

ynab-mcp-server

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

get_user

create_account

list_plans, get_plan, get_plan_settings

create_category, update_category

get_budget

modify_budget

list_accounts, get_account

create_category_group, update_category_group

list_category_groups, get_category_group

create_payee, update_payee

get_transactions

modify_transactions

list_payees

modify_scheduled_transactions

list_payee_locations, get_payee_location

Related MCP server: YNAB MCP Server

Quick start (local, stdio)

Requires Node.js 20+. Grab a YNAB personal access token first.

npx ynab-mcp-server

Point 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

YNAB_ACCESS_TOKEN

yes

--

Your YNAB personal access token. Never logged, never echoed in tool output.

YNAB_READ_ONLY

no

false

When true, every mutation tool is hidden from tools/list entirely. Recommended for any instance you don't fully trust the client of.

YNAB_API_BASE_URL

no

https://api.ynab.com/v1

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.

  1. Install flyctl and fly auth login.

  2. fly launch --no-deploy from this directory (it will read fly.toml; rename the app there first if you want a specific subdomain).

  3. 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-password
  4. Edit fly.toml's PUBLIC_URL to match your actual *.fly.dev hostname (or custom domain), then:

    fly deploy
  5. In 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 -- enter MCP_HTTP_PASSWORD to approve the connection.

Notes:

  • Single shared-cpu-1x machine, 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 tsup

See docs/architecture.md for the repo layout and request-flow details.

License

MIT -- see LICENSE.

Available Tools

23 tools
create_accountCreate an accountA
Destructive

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 categoryA
Destructive

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 groupB
Destructive

Creates a new category group. Covers POST /plans/{plan_id}/category_groups.

Inputs: name (required), plan_id (required).

create_payeeCreate a payeeC
Destructive

Creates a new payee. Covers POST /plans/{plan_id}/payees.

Inputs: name (required), plan_id (required).

get_accountGet an accountB
Read-only

Returns a single account. Covers GET /plans/{plan_id}/accounts/{account_id}.

Inputs: plan_id (required), account_id (required).

get_budgetGet budget dataA
Read-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 groupB
Read-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 locationC
Read-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 planA
Read-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 settingsA
Read-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 transactionsA
Read-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 userA
Read-only

Returns the id of the user that owns the configured YNAB access token. Covers GET /user.

Inputs: no named parameters.

list_accountsList accountsB
Read-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 groupsA
Read-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 locationsA
Read-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 payeeA
Read-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 plansA
Read-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 goalA
Destructive

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 transactionA
Destructive

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 transactionsA
Destructive

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 categoryB
Destructive

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 groupC
Destructive

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 payeeC
Destructive

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

    B3.3/5.0

    Scored across 23 tools

    Disambiguation3/5

    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.

    Naming Consistency4/5

    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.

    Tool Count3/5

    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.

    Completeness4/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables 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.
      -
    • A
      license
      C
      quality
      C
      maintenance
      Exposes YNAB API endpoints as MCP tools, allowing AI assistants to manage budgets, accounts, transactions, and more through natural language.
      41
      77 PyPI
      101
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Connects AI assistants to YNAB budgets, providing over 30 tools for managing budgets, accounts, transactions, categories, and analytics with delta sync and caching.
      47
      110 PyPI
      49
      AGPL 3.0
    • A
      license
      A
      quality
      D
      maintenance
      Enables users to interact with YNAB budgets, accounts, transactions, and more through a comprehensive set of tools with batch operations, deterministic analysis, and undo support.
      26
      104 npm
      6
      MIT