Skip to main content

MCP server for YNAB API

Project description

ynab-mcp

pipeline status coverage report PyPI version Python 3.12+

MCP server exposing YNAB budget data to Claude.

Status

Maintained on a best-effort basis for the YNAB API v1. It is feature-complete for its scope (the tools listed below); there is no roadmap for broader coverage. Bug reports and merge requests are welcome and reviewed as time allows, but timely responses are not guaranteed. Breaking changes are released under a new major version and recorded in CHANGELOG.md. To report a security issue, see SECURITY.md.

Tools

Tool Description
list_budgets List all budgets
list_accounts List accounts for a budget
get_month_summary Current month budgeted vs spent by category group
list_transactions Recent transactions (filterable by account/date)
list_categories Categories with budgeted and activity amounts
create_transaction Add a new transaction (idempotent — identical retries are deduplicated, not duplicated)

Requirements

  • Python >= 3.12 (managed by uv/uvx)
  • A YNAB Personal Access Token (YNAB → Settings → Developer Settings)
  • Any OS: the token is read from the YNAB_TOKEN environment variable; on macOS the Keychain is supported as the recommended storage

Setup

1. Provide the YNAB token

Cross-platform (environment variable):

export YNAB_TOKEN="<your-token>"

macOS (Keychain, recommended — no token in shell profiles):

security add-generic-password -s "ynab-mcp" -a "ynab-token" -w "<your-token>"

The env var takes precedence when both are set.

2. Add to Claude Code (~/.claude/settings.json)

Installed from PyPI (recommended):

"mcpServers": {
  "ynab": {
    "type": "stdio",
    "command": "uvx",
    "args": ["rogo-ynab-mcp"]
  }
}

Or from a source checkout: uv sync, then use "command": "uv", "args": ["run", "--project", "/path/to/ynab-mcp", "rogo-ynab-mcp"].

Client compatibility

This is a standard stdio MCP server launched with uvx rogo-ynab-mcp, so any MCP client that supports the stdio transport should work. Only the Claude Code setup is documented and exercised here; the others use the same command and are expected to work but are not separately verified.

Client Status Notes
Claude Code Documented / used Config shown in Setup (~/.claude/settings.json).
Claude Desktop Expected to work Add the same mcpServers block to claude_desktop_config.json.
Cursor Expected to work Register as an MCP server (stdio): command uvx, args ["rogo-ynab-mcp"].
Antigravity Expected to work Register as an MCP server (stdio): command uvx, args ["rogo-ynab-mcp"].
Generic MCP clients Expected to work Any client speaking the MCP stdio transport; point it at uvx rogo-ynab-mcp.

Usage

Once the server is registered, ask your MCP client in natural language — it picks the right tool and fills in the arguments. Example prompts:

  • "Which YNAB budgets can you see?" → list_budgets
  • "What's the balance on my checking account?" → list_accounts
  • "How am I doing against my budget this month?" → get_month_summary
  • "How much did I spend on groceries this month?" → list_categories
  • "Show my transactions since the start of the month." → list_transactions
  • "Add a 45.90 expense at Sample Coffee to checking, dated today." → create_transaction

Sample tool output

Amounts are returned as plain numbers in the budget's currency (YNAB milliunits are converted for you). Values below are illustrative fakes.

list_transactions:

[
  {
    "id": "b1f2c3d4-5678-49ab-9cde-1234567890ab",
    "date": "2026-07-03",
    "amount": -45.9,
    "payee": "Sample Coffee",
    "category": "Dining Out",
    "account": "Everyday Checking",
    "memo": null,
    "approved": true
  }
]

create_transaction (retries are idempotent — an identical call returns a duplicate marker instead of creating a second transaction):

{
  "duplicate": false,
  "id": "9c3d5e7f-1a2b-4c8d-8e9f-abcdef012345",
  "date": "2026-07-06",
  "amount": -45.9,
  "payee": "Sample Coffee"
}

Development

uv run pytest                         # run tests with coverage
uv run pytest --cov-report=html       # HTML coverage report

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rogo_ynab_mcp-0.7.0.tar.gz (85.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rogo_ynab_mcp-0.7.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file rogo_ynab_mcp-0.7.0.tar.gz.

File metadata

  • Download URL: rogo_ynab_mcp-0.7.0.tar.gz
  • Upload date:
  • Size: 85.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for rogo_ynab_mcp-0.7.0.tar.gz
Algorithm Hash digest
SHA256 9812260ee675c97a84eb01f0b7f3d34d3a4b3d8ed6c2757a5a1400df3fe44a54
MD5 d39dd97ac3902d32d32aad15468a850a
BLAKE2b-256 083320b84d09066687803c4419c766141117216caa775fd907662cdf9dd91ec3

See more details on using hashes here.

File details

Details for the file rogo_ynab_mcp-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: rogo_ynab_mcp-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for rogo_ynab_mcp-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2cb270110737d7c00917404882f699d6c8c83cb60976f9b91c4fe710abaa9f39
MD5 7f4b6675821e8f50e6fd56524e2a75a3
BLAKE2b-256 75c4bedc0a32781f24243279639dcbbba93cca20126ac7fedd113501520a32d1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page