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.

概覽

AI 產生的概覽

本機 MCP 伺服器,讓 AI 助理讀取 YNAB 預算,並提供需手動開啟、附確認且部分可復原的寫入工具。

可以做什麼
列出預算、帳戶、月份、分類和收款對象,並依篩選與分頁讀取或彙總交易及排程交易。開啟寫入後,建立、編輯和刪除交易、排程交易、分類、收款對象和帳戶,分配或移動預算金額,並觸發連結帳戶匯入。執行伺服器端計算的分析:支出彙總、預算健康度、週期性扣款、收入與支出對比、淨資產歷史、分類歷史和信用卡浮動。產生月末結帳報告和補足超支的移轉建議,並在本機保存歷次月末結帳的餘額結轉紀錄。復原透過此伺服器進行的最近一次可復原寫入。
適用情境
適合讓助理回答 YNAB 預算相關問題、彙總支出或淨資產,或協助每月預算補帳與月末結帳檢視。只有在希望助理修改交易或預算金額,並接受確認機制與復原限制時,才值得開啟寫入。
執行需求
透過 npx 以 stdio 在本機執行,需要 Node.js,一次只能連接一個用戶端;僅限桌面用戶端,行動裝置無法存取。需要 YNAB 個人存取權杖,放在 YNAB_ACCESS_TOKEN 中,或以 YNAB_ACCESS_TOKEN_FILE 指定權杖檔案路徑。除非將 YNAB_ALLOW_WRITES 設為 1,否則寫入關閉。需要連線至 YNAB API 的網路,該 API 每個權杖每小時限 200 次請求。
安裝前請注意
YNAB_ACCESS_TOKEN 在有效期內擁有預算的完整存取權,應像密碼一樣保管。開啟寫入後,助理可建立、編輯和刪除交易、排程交易、分類、收款對象和帳戶,移動預算金額並觸發匯入;破壞性與批次操作需要明確確認。建立分類、收款對象或帳戶以及匯入交易無法復原。復原歷史和月末結帳帳本保存在使用者主目錄下以 ~ 開頭的本機檔案中。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mcp For Ynab,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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 mcp add ynab -e YNAB_ACCESS_TOKEN=xxx -- npx -y @walensis/cove-mcp

Claude Desktop — add this to your config (claude_desktop_config.json):

json
{  "mcpServers": {    "cove": {      "command": "npx",      "args": ["-y", "@walensis/cove-mcp"],      "env": {        "YNAB_ACCESS_TOKEN": "xxx"      }    }  }}

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:

npx -y @walensis/cove-mcp

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

  1. Go to app.ynab.com and sign in.
  2. Open Account Settings → Developer Settings.
  3. Under Personal Access Tokens, click New Token, confirm your password, and copy the token.
  4. 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:

YNAB_ALLOW_WRITES=1

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 require expected_count to 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_last tool 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) and import_transactions are 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), but undo_last will 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

ToolTypeDescription
list_plansreadList all budgets (plans): id, name, currency, last modified.
get_plan_overviewreadOrient in one call: accounts, current-month Ready to Assign, age of money, category totals.
get_monthreadFull detail for one month: Ready to Assign, age of money, every category's status.
list_transactionsreadList or aggregate transactions with filters, pagination, and field selection.
get_transactionreadFull detail for one transaction, including split subtransactions.
create_transactionswriteCreate one or more transactions in bulk, with splits and import dedup.
update_transactionswriteBulk edit transactions: categorize, approve, set cleared, edit fields.
delete_transactionwriteDelete one transaction. Requires confirmation.
import_transactionswriteTrigger import of linked-account transactions.
list_scheduled_transactionsreadAll scheduled (upcoming/recurring) transactions.
create_scheduled_transactionwriteCreate a scheduled transaction (upcoming bill or recurring income).
update_scheduled_transactionwriteUpdate a scheduled transaction.
delete_scheduled_transactionwriteDelete a scheduled transaction. Requires confirmation.
list_categoriesreadAll visible categories with balances and target status.
create_categorywriteCreate a category (and its group, if needed).
update_categorywriteRename or hide a category, or set its target.
assign_budgetwriteSet a category's assigned amount for a month.
move_moneywriteMove assigned money between two categories in a month, atomically.
list_payeesreadAll payees (id, name, transfer flag).
rename_payeewriteRename a payee across all its transactions.
create_payeewriteCreate a payee.
create_accountwriteCreate an account, with a starting balance.
spending_summaryreadServer-computed spending by category or payee, with optional period comparison.
budget_healthreadCurrent-month health check: overspending, underfunded targets, credit-card float.
detect_recurring_chargesreadFind recurring charges (subscriptions/bills) from about 13 months of history.
income_vs_expensereadMonthly income/expense/net series.
net_worth_historyreadMonthly net-worth series computed from full transaction history.
month_closereadMonth-close report for a cutoff date: credit-card coverage, blockers, overspent categories, ranked donors.
propose_coveragereadOrdered move proposals to bring every overspent category to zero for the cutoff month.
get_category_historyreadOne category's monthly series (assigned/activity/available) across a month range.
credit_card_float_historyreadPer-month credit-card float analysis over a range: owed vs. payment-category available, gap, changed flag.
backfill_ledgerlocal writeBackfill the local balance-forward ledger from history: one record per card per fully-elapsed month, with causes and the discovery summary ("carrying $X since "). Local file only (~/.cove/ledger.json) — never touches YNAB.
record_month_closelocal writePersist a month-close balance-forward record (per-card gaps, blockers, causes, applied moves). Local file only (~/.cove/ledger.json) — never touches YNAB.
get_month_close_ledgerreadRead past balance-forward records (newest first), optionally filtered by cutoff.
undo_lastwriteUndo the most recent write made through this server.

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-close skill.
  • Claude Desktop and other MCP clients: the server exposes the same flow as the month-close-session MCP 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:

ts
import { tools, buildServer } from '@walensis/cove-mcp'

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.

pnpm installpnpm buildpnpm testpnpm typecheck

To smoke-test against a real budget (read-only — it never writes):

YNAB_ACCESS_TOKEN=xxx pnpm smoke

To validate credit_card_float_history against known-good fixture values (read-only):

YNAB_ACCESS_TOKEN=xxx pnpm validate:fixtures

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
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分