Skip to main content
Glama
YNAB Budget MCP

YNAB Budget MCP

YNAB Budget MCP

npm version

A local Model Context Protocol server that gives AI assistants a focused, guarded way to work with YNAB budget data.

For AI-assistant users

Use this when you want an MCP-capable assistant to help you understand your YNAB budget without giving it unrestricted control. It can inspect plans, budget snapshots, accounts, categories, transactions, scheduled transactions, and payees. It is not financial advice and does not replace your own review of your budget.

Examples of useful requests include:

  • “Which categories are overspent this month?”

  • “Show my uncategorized transactions from the last two weeks.”

  • “What scheduled transactions are due in the next 30 days?”

  • “Preview assigning $100 to Groceries, but do not apply it.”

  • “Preview creating a category named Pet Care in my Household group in my 2026 plan, but do not apply it.”

You stay in control

All reads and previews are read-only. Two narrow, experimental workflows can write to YNAB: category assignments and category creation. Both follow the same approval gate:

  1. Your assistant creates a preview of the exact operation. Assignment previews include before/after Ready to Assign, remaining uncovered categories, and relevant cross-month effects. Category-creation previews require an explicit plan ID, confirm the selected plan and group, and check for an existing category with the same name.

  2. You review and explicitly approve that exact preview.

  3. Applying it additionally requires YNAB_ENABLE_WRITES=true, a fresh single-use token, and an unchanged YNAB state. Category creation also verifies the resulting category and avoids retrying when the API response is ambiguous.

An assignment preview can intentionally leave categories overspent or a month with negative Ready to Assign. Those states are never treated as available money: the preview reports them as warnings and lists each remaining uncovered category and amount. This allows a deliberate partial assignment (for example, protecting an imminent bill) or a future-month reallocation while keeping the risk visible for approval.

The server runs locally, sends requests directly to YNAB, and has no telemetry or persistent storage.

Connect it to your assistant

You need Node.js 22.9+ and a YNAB Personal Access Token from YNAB developer settings.

Ask your agent to install it

If your AI assistant supports local stdio MCP servers, copy and paste this prompt into it. The linked README is the source of truth; the agent should use the instructions for its own client.

Please install YNAB Budget MCP for me, following the canonical instructions at https://github.com/Orlando-Villanueva/ynab-budget-mcp#connect-it-to-your-assistant.

Use the published npm package, not a repository clone or local source checkout. Follow the generic terminal setup unless this is Codex, in which case use the Codex CLI or Codex app instructions. When the MCP configuration requires my YNAB token, stop and tell me to enter it myself in this client's MCP server Environment variables or Secrets field, using the exact key `YNAB_ACCESS_TOKEN`. Do not ask me to paste the token into chat, a command, a project file, or any shared configuration. Leave `YNAB_ENABLE_WRITES` unset. When setup is complete, tell me how to verify the MCP connected successfully.

Generic terminal setup

Install the published package:

npm install -g ynab-budget-mcp@beta

Then add a local stdio MCP server in your assistant's settings with:

Field

Value

Command

ynab-mcp

Environment variable or secret

YNAB_ACCESS_TOKEN = your YNAB Personal Access Token

Working directory

Leave blank

Enter the token in the assistant's MCP Environment variables or Secrets field—not in a repository .env file, an issue, a screenshot, or a chat message. Every MCP client labels this screen differently, but the variable name is always YNAB_ACCESS_TOKEN.

If your MCP client uses JSON configuration, this is the generic server definition:

{
  "command": "ynab-mcp",
  "env": {
    "YNAB_ACCESS_TOKEN": "your-token"
  }
}

Codex CLI

In Terminal, run the following. It uses a hidden token prompt, then saves a local Codex MCP configuration without requiring a repository checkout:

read -s "YNAB_ACCESS_TOKEN?Paste your YNAB access token: "
echo
codex mcp add ynab \
  --env "YNAB_ACCESS_TOKEN=$YNAB_ACCESS_TOKEN" \
  -- npx -y ynab-budget-mcp@beta
unset YNAB_ACCESS_TOKEN

Restart Codex, then run codex mcp get ynab to confirm the server is configured.

Codex app

In Codex, open Plugins, choose Add → MCP server, and create a stdio server with these values:

Field

Value

Command

npx

Arguments

-y, ynab-budget-mcp@beta

Environment variable

YNAB_ACCESS_TOKEN = your YNAB Personal Access Token

Working directory

Leave blank

Save the server and restart Codex. This downloads the published package when needed; no repository clone, local .env, or global installation is required.

Other MCP clients

If you prefer not to install globally, configure your client to run npx -y ynab-budget-mcp@beta instead. The following JSON is one generic example; it is not a Codex configuration file:

{
  "command": "npx",
  "args": ["-y", "ynab-budget-mcp@beta"],
  "env": {
    "YNAB_ACCESS_TOKEN": "your-token"
  }
}

Keep the token private. It grants access to the YNAB data available to it; never add it to a repository, issue, screenshot, or shared configuration file.

Related MCP server: YNAB MCP Server

For developers and maintainers

This section is for working on the MCP itself rather than simply using it with an assistant.

Run from source

Clone the repository, install its development dependencies, and create a local token file:

git clone https://github.com/Orlando-Villanueva/ynab-budget-mcp.git
cd ynab-budget-mcp
npm ci
cp .env.example .env

Set YNAB_ACCESS_TOKEN in your uncommitted .env. To permit a real, explicitly approved assignment or category-creation apply during a local session, also set YNAB_ENABLE_WRITES=true; leave it unset for normal development and testing.

Start the local stdio server with:

npm run start

For an MCP client to use your source checkout directly, configure it with a portable path and working directory:

{
  "command": "node",
  "args": [
    "--env-file-if-exists=.env",
    "--experimental-transform-types",
    "src/index.ts"
  ],
  "cwd": "/absolute/path/to/ynab-budget-mcp"
}

This local-development configuration is separate from the published-package setup above. You can keep using an installed release while developing changes in another checkout.

Verify changes

npm test
npm run check

npm run check builds the package and runs the test suite. The project intentionally has no runtime dependencies; TypeScript build tools are development-only.

Security, privacy, and support

See SECURITY.md for security and privacy expectations, and SUPPORT.md for support expectations.

This project is not affiliated with, endorsed by, or sponsored by YNAB. YNAB is a trademark of its respective owner.

Available Tools

10 tools
ynab_apply_assignment_previewApply Approved YNAB Assignment PreviewA

Apply a short-lived assignment preview token only after the user explicitly approves the exact preview.

Inputs: preview_token (required).

ynab_get_budget_snapshotGet Budget SnapshotA
Read-onlyIdempotent

Get a high-level snapshot of a YNAB plan for a given month, including month details, account totals, and category highlights.

Inputs: month, plan_id, refresh.

ynab_get_month_categoryGet YNAB Month CategoryB
Read-onlyIdempotent

Get one exact category for one exact YNAB plan month.

Inputs: month (required), category_id (required), plan_id, refresh.

ynab_list_accountsList AccountsB
Read-onlyIdempotent

List accounts for a YNAB plan.

Inputs: plan_id, refresh, include_closed.

ynab_list_categoriesList CategoriesA
Read-onlyIdempotent

List category groups and categories for a YNAB plan, with optional month context.

Inputs: month, plan_id, refresh.

ynab_list_payeesList PayeesA
Read-onlyIdempotent

List payees for a YNAB plan.

Inputs: plan_id, refresh.

ynab_list_plansList YNAB PlansA
Read-onlyIdempotent

List the YNAB plans available to the configured token.

Inputs: refresh.

ynab_list_scheduled_transactionsList Scheduled YNAB TransactionsA
Read-onlyIdempotent

List and project scheduled YNAB transaction occurrences through a bounded date horizon.

Inputs: from_date (required), through_date (required), plan_id, refresh, +3 more.

ynab_list_transactionsList TransactionsA
Read-onlyIdempotent

List transactions for a YNAB plan with optional date, month, account, category, payee, and limit filters.

Inputs: type, limit, month, offset, +10 more.

ynab_preview_assignmentsPreview YNAB AssignmentsA
Read-onlyIdempotent

Freshly validate exact category assignment deltas and create a short-lived preview token without changing YNAB.

Inputs: month (required), assignments (required), plan_id, guard_month.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool targets a distinct resource or action: plans, budget snapshots, accounts, categories, transactions, scheduled transactions, payees, and assignment preview/apply. Even the category-related tools are clearly separated by scope (list vs single snapshot vs exact month detail).

    Naming Consistency5/5

    All tools follow a consistent ynab_verb_noun pattern, e.g., ynab_list_transactions, ynab_get_month_category, ynab_preview_assignments. The minor variation between 'preview_assignments' and 'apply_assignment_preview' still fits the verb_noun structure with compound nouns.

    Tool Count5/5

    10 tools is well within the ideal range for a domain-specific MCP server. Each tool covers a meaningful atomic operation without unnecessary bloat, making the surface easy to navigate.

    Completeness3/5

    The read surface is strong, covering plans, accounts, categories, transactions, scheduled transactions, and payees, plus a write path for assignment preview/apply. However, there are notable gaps: no create/update/delete for transactions or accounts, and no way to modify categories other than via assignments. Agents needing full budget management would encounter dead ends.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables interaction with You Need A Budget (YNAB) through their API, allowing users to manage budgets, accounts, categories, transactions, payees, and scheduled transactions through natural language.
      12
      19 npm
      2
      GPL 3.0
    • A
      license
      B
      quality
      A
      maintenance
      Enables AI assistants to interact with YNAB budgets, performing read-only queries by default and optional write operations like creating transactions and managing categories through natural language.
      45
      950 npm
      53
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables reading and writing YNAB budget data, such as listing budgets, accounts, categories, transactions, and creating or updating transactions, through natural language commands.
      8
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI assistants to connect to YNAB budgets, providing tools for accounts, transactions, categories, payees, and analytics, including search, bulk operations, and delta sync.
      47
      AGPL 3.0