
Mcp For Ynab
io.github.walensis-labs由 GitHub 账号 walensis-labs 发布v0.2.0更新于 Oct 24, 2026
YNAB budget access for AI assistants: safe gated writes, month-close sessions, float attribution.
概览
本地 MCP 服务器,让 AI 助手读取 YNAB 预算,并提供需手动开启、带确认且部分可撤销的写入工具。
- 可以做什么
- 列出预算、账户、月份、分类和收款方,并按筛选与分页读取或汇总交易及计划交易。在开启写入后,创建、编辑和删除交易、计划交易、分类、收款方和账户,分配或移动预算金额,并触发关联账户导入。运行服务端计算的 analytics:支出汇总、预算健康度、周期性扣款、收入与支出对比、净资产历史、分类历史和信用卡浮动。生成月末结账报告和补足超支的移动建议,并在本地保存往期月末结账的余额结转记录。撤销通过该服务器进行的最近一次可撤销写入。
- 适用场景
- 适合让助手回答 YNAB 预算相关问题、汇总支出或净资产,或协助每月预算补账与月末结账复盘。只有在希望助手修改交易或预算金额,并接受确认机制与撤销限制时,才值得开启写入。
- 运行要求
- 通过 npx 以 stdio 在本地运行,需要 Node.js,一次只能连接一个客户端;仅限桌面客户端,移动端无法访问。需要 YNAB 个人访问令牌,放在 YNAB_ACCESS_TOKEN 中,或用 YNAB_ACCESS_TOKEN_FILE 指定令牌文件路径。除非将 YNAB_ALLOW_WRITES 设为 1,否则写入关闭。需要访问 YNAB API 的网络,该 API 每个令牌每小时限 200 次请求。
安装
在 SourceWeft 中
- 打开 控制台中的 Mcp For Ynab,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
MCP for YNAB
A fast, safe MCP server for YNAB — full budget access for Claude and other AI assistants, read-only by default.
35 tools covering budgets, transactions, categories, payees, accounts, scheduled transactions, and server-computed analytics (spending summaries, budget health, recurring charges, income vs. expense, net worth, month-close coverage, category and credit-card float history). Writes are off unless you explicitly turn them on, risky writes require confirmation, and writes that edit or delete existing data can be undone.
Install
There are two ways to run Cove for YNAB: local (the npm package, one client at a time) or remote (one URL + token, works from Desktop, Code, and mobile identically).
Install (local)
Runs on your machine via npx. Works with Claude Code and Claude Desktop. Not reachable from
mobile — mobile clients need the remote path below.
Claude Code:
Claude Desktop — add this to your config (claude_desktop_config.json):
Replace xxx with your personal access token (see Getting a token below). By
default the server is read-only; add "YNAB_ALLOW_WRITES": "1" to env (or export it in Claude
Code's -e) once you want the write tools — see Read-only by default.
Any other client that speaks MCP over stdio can run the server the same way:
with YNAB_ACCESS_TOKEN set in its environment.
Install (remote)
One URL and a token, and it works identically from Claude Desktop, Claude Code, and claude.ai on
mobile — no local process to keep running. This is apps/worker, a single-tenant Cloudflare
Worker you deploy on your own account, with your own YNAB token: apps/worker/README.md
has the full deploy runbook and how to point each kind of client at it.
The model, in short: everything in this repo — the engine, the stdio server, and this remote endpoint — is open source and free, and it's a Tool: stateless, answers when asked, does nothing on its own. Anything autonomous or metered — always-on float monitoring, digests, LLM-written narratives, the browser extension — is a Product, and lives in a separate hosted offering we run and charge for. Self-hosting this worker gets you the Tool half for free, forever; it does not include the always-on half. If you'd rather build that yourself on top of the same open engine, see docs/build-your-own-monitoring.md.
Getting a token
- Go to app.ynab.com and sign in.
- Open Account Settings → Developer Settings.
- Under Personal Access Tokens, click New Token, confirm your password, and copy the token.
- Use that value as
YNAB_ACCESS_TOKEN. Treat it like a password — anyone with it has full access to your budget for as long as it's valid.
If you'd rather not put the token directly in your MCP client config, set YNAB_ACCESS_TOKEN_FILE to the path of a file containing just the token instead.
Read-only by default, writes are opt-in
By default this server only exposes read tools — nothing it does can change your budget. To enable the write tools (creating/editing/deleting transactions, assigning money, etc.), set:
in the server's environment and restart it. With writes enabled:
- Confirmation gates: destructive or bulk operations (deleting a transaction, deleting a scheduled transaction, bulk-updating more than 5 transactions) require an explicit
confirm: true— and bulk updates also requireexpected_countto match the number of rows — so the assistant has to show you what it's about to do before it does it. - Undo: writes that change existing data — transaction edits/deletes, category edits, budget assignments/moves, scheduled transaction edits/deletes, payee renames — are journaled locally, and the
undo_lasttool reverses the most recent one (up to 50 writes of history, stored in~/.cove/undo.json). Writes that create something (create_category,create_payee,create_account) andimport_transactionsare not reversible — YNAB's API has no delete for categories, payees, or accounts, and no way to undo an import. Those are still journaled (so undo history stays in order), butundo_lastwill tell you a given entry can't be undone and move on to the write before it. See PRIVACY.md for details on that file.
Rate limits
The underlying API allows 200 requests/hour per token, shared across every app using that same token (this server, the mobile and web apps for YNAB, other integrations, etc.). This server tracks its own usage client-side and stops itself at 190 requests/hour to leave headroom for the rest of your apps, and prefers small, server-computed responses (aggregates, summaries) over dumping raw rows where it can.
Tools
The month-close session
A guided monthly catch-up flow (Balance → Plan) built on top of the tools above: it works
through blockers until the coverage gap is trusted, attributes credit-card float changes to
their cause, proposes donor-first coverage moves, and — once you approve them — writes a
balance-forward record via record_month_close so next month's session has a baseline to
compare against (get_month_close_ledger). On the very first run, the ledger is empty — the
session runs backfill_ledger for each card first and leads with what it finds (e.g.
"carrying $865.75 since 2024-08") before attributing anything further.
- Claude Code: use the
/month-closeskill. - Claude Desktop and other MCP clients: the server exposes the same flow as the
month-close-sessionMCP prompt. - Full walkthrough: docs/playbooks/month-close.md.
Remote MCP endpoint (self-host)
The remote worker (see Install (remote) above) exposes the same 35 tools over a token-authenticated remote MCP endpoint — a bearer-header route for header-capable clients, plus a token-in-path route so claude.ai's URL-only custom connectors can reach your budget directly — built on the same library entrypoint this package exports for embedding:
It does not include always-on monitoring — that's a separate, hosted product. See docs/build-your-own-monitoring.md if you want to build that yourself on top of the same open attribution engine.
Full deploy runbook: apps/worker/README.md.
Development
This is a pnpm monorepo: packages/core (@walensis/cove-core, the API client for YNAB and domain logic) and apps/mcp (@walensis/cove-mcp, the MCP server that wraps it).
Naming: Cove is the product; @walensis/cove-core is the engine, @walensis/cove-mcp is the MCP surface, and the MCP registry entry keeps its descriptive mcp-for-ynab name for discoverability.
To smoke-test against a real budget (read-only — it never writes):
To validate credit_card_float_history against known-good fixture values (read-only):
Disclaimer
We are not affiliated, associated, or in any way officially connected with YNAB, or any of its subsidiaries or its affiliates.
License
MIT © walensis-labs
来源:README.md,提交 abb9689
工具
0版本历史
1- v0.2.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分