avenir-mcp
# avenir-mcp β an unofficial MCP server for YNAB
<!-- mcp-name: io.github.mathbeal/avenir-mcp -->
[](https://api.ynab.com/#works-with-ynab-third-party)
[](https://github.com/mathbeal/avenir-mcp/actions/workflows/ynab-terms.yml)
[](https://glama.ai/mcp/servers/mathbeal/avenir-mcp)
[](https://github.com/punkpeye/awesome-mcp-servers)
Self-checked on every change against YNAB's API terms of 2025-05-28 (naming, attribution,
YNAB's own image, a personal token for its owner only, the hourly limit); a weekly job
turns the badge red when YNAB changes its terms. Listed by YNAB in its
[Works with YNAB](https://api.ynab.com/#works-with-ynab-third-party) directory, among
third-party apps. Not endorsed by YNAB.
Built and tested against YNAB's API v1.87.0. A weekly [`YNAB API drift`](https://github.com/mathbeal/avenir-mcp/actions/workflows/api-drift.yml) check compares it with the live specification and fails when YNAB publishes a new version.
[](https://github.com/mathbeal/avenir-mcp/actions/workflows/quality.yml)
[](https://github.com/mathbeal/avenir-mcp/actions/workflows/inspector.yml)
[](https://github.com/mathbeal/avenir-mcp/actions/workflows/mutation.yml)
[](https://avenir-mcp.pages.dev/avenir-mcp/)
[](https://pypi.org/project/avenir-mcp/)
[](https://pypi.org/project/avenir-mcp/)
[](https://avenir-mcp.pages.dev/avenir-mcp/project/development/#the-checks)
[](https://avenir-mcp.pages.dev/avenir-mcp/project/development/#the-checks)
[](https://avenir-mcp.pages.dev/avenir-mcp/project/development/#the-checks)
[](https://avenir-mcp.pages.dev/avenir-mcp/project/development/#the-checks)
[](https://github.com/mathbeal/avenir-mcp/blob/main/LICENSE)
[](https://www.bestpractices.dev/projects/15139)
[](https://github.com/mathbeal/avenir-mcp/commits/main)
> π¬π§ **avenir-mcp** (*avenir* is French for *the future*) lets an AI agent read your YNAB plan
> and help you plan what comes next.
>
> π«π· **avenir-mcp** permet Γ un agent IA de lire votre plan YNAB et de vous aider
> Γ prΓ©parer la suite.
Ask Claude β or any [MCP](https://modelcontextprotocol.io) client β about your plan
in plain words: where the money went, what still needs a category, whether an account
matches the bank, when money would run out. Every change is previewed, confirmed by
you, and can be undone.
**π Documentation: <https://avenir-mcp.pages.dev/avenir-mcp/>**
[English](https://avenir-mcp.pages.dev/avenir-mcp/) Β· [FranΓ§ais](https://avenir-mcp.pages.dev/avenir-mcp/fr/) Β· [EspaΓ±ol](https://avenir-mcp.pages.dev/avenir-mcp/es/) Β· [Deutsch](https://avenir-mcp.pages.dev/avenir-mcp/de/) Β· [Nederlands](https://avenir-mcp.pages.dev/avenir-mcp/nl/)
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/mathbeal/avenir-mcp/main/.github/assets/demo-dark.svg">
<img alt="Thirty seconds, one write: move_money previews moving 30 from Tennis to Restaurants β Tennis 80.00 β 50.00, Restaurants 120.00 β 150.00 β and changes nothing; once agreed, the move is applied and journaled; undo_operation then puts both amounts back." src="https://raw.githubusercontent.com/mathbeal/avenir-mcp/main/.github/assets/demo-light.svg" width="720">
</picture>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/mathbeal/avenir-mcp/main/.github/assets/conversation-dark.svg">
<img alt="Asked how the budget is doing this month, the agent reads the month with two read-only tools and answers: one category over budget, Restaurants by 22.50, everything else on track." src="https://raw.githubusercontent.com/mathbeal/avenir-mcp/main/.github/assets/conversation-light.svg" width="720">
</picture>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/mathbeal/avenir-mcp/main/.github/assets/networth-dark.svg">
<img alt="get_net_worth_trend on the demo plan: over the last 18 months the debts shrink from 27,198 to 19,041 despite the car loan's interest, the assets grow, and the net worth rises from β24,038 to +1,230, with a dip for a car repair and another at Christmas." src="https://raw.githubusercontent.com/mathbeal/avenir-mcp/main/.github/assets/networth-light.svg" width="720">
</picture>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/mathbeal/avenir-mcp/main/.github/assets/forecast-dark.svg">
<img alt="forecast_balance on the demo plan: the month-end balance rises from this month to three months ahead, with each month's lowest day and a yearly insurance payment scheduled next month." src="https://raw.githubusercontent.com/mathbeal/avenir-mcp/main/.github/assets/forecast-light.svg" width="720">
</picture>
All four come from the invented demo plan: the write above is replayed by `python -m docsgen`,
so every line of it is what avenir-mcp answers today; then a real reply of Claude Sonnet, and
the net worth and the forecast the documentation shows. The demo plays for thirty seconds and
holds its last frame, which tells the whole story on its own: a reader whose system asks for
less motion, or a viewer that does not animate, sees that frame instead.
> **Unofficial project.** We are not affiliated, associated, or in any way officially
> connected with YNAB or any of its subsidiaries or affiliates. The official YNAB website
> can be found at https://www.ynab.com. The names YNAB and You Need A Budget, as well as
> related names, tradenames, marks, trademarks, emblems, and images are registered
> trademarks of YNAB. They are named here only to say which service avenir-mcp works with.
>
> avenir-mcp is for **personal use on your own machine, with your own YNAB token**. Running it
> as a public or shared server is not supported. It is provided as is, without warranty,
> and is not financial advice: you remain responsible for the changes you confirm. See the
> [legal notice](https://avenir-mcp.pages.dev/avenir-mcp/project/legal/).
## Why avenir-mcp
- **Tools for tasks, not endpoints.** Classify a month of transactions, reconcile an
account, forecast your balance: one tool each, not a wrapper of YNAB's API.
- **Read-only by default.** Tools that change your plan exist only when you enable
them.
- **Preview, confirm, undo.** Every write shows what will change and waits for your
yes; `undo_operation` reverts it.
- **Answers an agent can read.** Currency units, short typed answers, pagination,
errors that say what to fix, bank text treated as untrusted.
- **Verified.** 100 % line and branch coverage, and an evaluation where a real agent
works on an invented plan: 25/25 tasks.
## Install
You need [uv](https://docs.astral.sh/uv/) and a YNAB personal access token
(YNAB β Account Settings β Developer Settings β New Token).
[](https://insiders.vscode.dev/redirect/mcp/install?name=avenir-mcp&inputs=%5B%7B%22id%22%3A%22ynab_token%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22YNAB%20personal%20access%20token%22%2C%22password%22%3Atrue%7D%5D&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22avenir-mcp%22%5D%2C%22env%22%3A%7B%22YNAB_API_KEY%22%3A%22%24%7Binput%3Aynab_token%7D%22%7D%7D)
[](https://cursor.com/en/install-mcp?name=avenir-mcp&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyJhdmVuaXItbWNwIl0sImVudiI6eyJZTkFCX0FQSV9LRVkiOiJ5b3VyLXRva2VuIn19)
One click installs avenir-mcp **read-only**: VS Code asks for your token in a password box and keeps it in its secret
storage; in Cursor, replace `your-token` in the server's settings. Add `AVENIR_MCP_WRITE=1` to allow changes.
Or by hand:
```bash
# Claude Code
claude mcp add avenir-mcp --env YNAB_API_KEY=your-token --env AVENIR_MCP_WRITE=1 -- uvx avenir-mcp
```
```jsonc
// Claude Desktop, Cursor: the mcpServers block of the client's configuration
{
"mcpServers": {
"avenir-mcp": {
"command": "uvx",
"args": ["avenir-mcp"],
"env": { "YNAB_API_KEY": "your-token", "AVENIR_MCP_WRITE": "1" }
}
}
}
```
Drop `AVENIR_MCP_WRITE` to stay read-only. Other clients and every option:
[Install](https://avenir-mcp.pages.dev/avenir-mcp/getting-started/install/) Β·
[Configuration](https://avenir-mcp.pages.dev/avenir-mcp/reference/configuration/).
## What you can ask
| You ask | avenir-mcp |
|---|---|
| "Which category is overspent this month?" | `get_monthly_summary` β totals and overspent categories |
| "Categorise what is pending." | `suggest_categories`, then `apply_categories` after your yes |
| "Split this receipt: 81.15 groceries, 5.25 household." | `split_transaction` β one transaction across categories, after your yes |
| "Which transaction is my 86.40 receipt from the 12th?" | `find_transactions` β by dates, exact amount and account, categorised or not |
| "My bank shows 3,440.80. Does YNAB agree?" | `reconcile_account` β explains the gap, changes nothing until it matches |
| "Will I go below zero before December?" | `forecast_balance` β month by month, with its assumptions |
| "Am I paying off my debts?" | `get_net_worth_trend` β assets, debts and net worth at each month end |
| "If I lost my income, how long could I last?" | `get_runway` β months the money in the budget covers the usual spending |
| "How much of my income do I keep?" | `get_savings_rate` β income, spending, saved and rate, month by month |
| "Which targets are behind this month?" | `get_underfunded_targets` β what each still needs, most urgent first, against Ready to Assign |
| "When will my debts be paid off if I put 500 a month on them?" | `get_debt_payoff_plan` β avalanche or snowball, the month each debt is paid off and the interest |
| "How old is my money?" | `get_age_of_money` β YNAB's Age of Money month by month, and its trend |
| "Move 30 from Tennis to Restaurants." | `set_category_budget`, previewed and undoable |
| "Undo that." | `undo_operation` |
Walk-throughs with real answers: [Use cases](https://avenir-mcp.pages.dev/avenir-mcp/guides/classify/).
Every tool, resource and prompt: [Reference](https://avenir-mcp.pages.dev/avenir-mcp/reference/tools/).
## Development
```bash
git clone https://github.com/mathbeal/avenir-mcp && cd avenir-mcp
uv sync
just check # lint, types, tests at 100 % coverage, vocabulary, lockfile
just docs-serve # the documentation, live
just evaluate # a real agent on the demo plan (uses your Claude plan)
```
Read [AGENTS.md](AGENTS.md) and [CONTRIBUTING.md](CONTRIBUTING.md) before opening a
pull request. Security reports: [SECURITY.md](SECURITY.md). Also:
[ARCHITECTURE.md](ARCHITECTURE.md), [ROADMAP.md](ROADMAP.md),
[GOVERNANCE.md](GOVERNANCE.md) and the [code of conduct](CODE_OF_CONDUCT.md).
## Licence
MIT.
TDQS
Scored across 19 tools
Each of the 19 tools targets a distinct analytical question (savings rate, runway, net worth, age of money, debt payoff, targets, etc.), and the descriptions explicitly cross-reference siblings ('for the share of each budget consumed use get_budget_vs_actual'). The only real overlap is the cluster get_category_balances / get_budget_vs_actual / get_spending_trends / get_monthly_summary, which all report category money for a month, though the descriptions do draw clear lines between them.
Every tool follows a strict snake_case verb_noun pattern: list_*, get_*, find_*, suggest_*, forecast_*. No mixing of conventions, no vague bare verbs.
19 tools is on the heavy side, but each maps to a genuinely different financial analysis (forecasting, runway, recurring charges, targets, debt strategy) rather than redundant wrappers. It fits a rich personal-finance domain without feeling padded.
For a read-only analytics server the surface is broad: net worth, runway, savings rate, age of money, spending trends, targets, debt payoff, recurring charges, scheduled bills and forecasting. Write operations are deliberately excluded (changes happen in YNAB itself), so the main gap is a lack of any mutation tools, which the descriptions openly frame as out of scope rather than a hidden dead end.