
Monarchmoney
io.github.hakimelek由 GitHub 帳號 hakimelek 發布v0.3.1更新於 Oct 24, 2026
Monarch Money API client with 30 MCP tools for accounts, transactions, budgets, and cashflow.
概覽
非官方的 Monarch Money MCP 伺服器,提供 30 個工具,讓助理讀取與修改個人帳戶、交易、預算與現金流資料。
- 可以做什麼
- 讀取帳戶、機構、餘額、快照與券商持股
- 查詢交易、明細、分類、標籤、彙總與定期交易
- 檢視預算、依分類或商家的現金流以及訂閱狀態
- 建立、更新或刪除交易、帳戶、分類與標籤
- 設定預算金額並觸發帳戶重新整理
- 適用情境
- 適合讓 AI 助理回答關於自己 Monarch Money 財務資料的問題,或批次修改標籤、分類與預算,而不必開啟網頁應用程式。
- 執行需求
- 透過 npx 在本機執行,需要 Node.js 18 或更新版本。需在 MONARCH_TOKEN 環境變數中提供 Monarch Money 驗證權杖,該權杖須先用此程式庫登入(電子郵件、密碼以及郵件驗證碼或 TOTP 多因素驗證)並儲存取得。需要連線至 Monarch API 的網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Monarchmoney,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Monarch Money (Node.js)
Node.js/TypeScript library for accessing Monarch Money data.
Disclaimer: This project is unofficial and not affiliated with Monarch Money.
Installation
Requires Node.js 18+ (uses native fetch and AbortSignal.timeout).
Quick Start
Authentication
Monarch's API requires email verification (OTP) for new devices/sessions, even when MFA is disabled. The library handles this with distinct exception types so your app can respond appropriately.
Login with email OTP handling
With MFA secret key (automatic TOTP)
The MFA secret is the "Two-factor text code" from Settings > Security > Enable MFA in Monarch Money.
Session persistence & token reuse
After a successful login (including email OTP), you can save the token to avoid re-authenticating on every run:
Interactive CLI
API
All methods return typed responses. Hover over any method in your editor for full JSDoc and type information.
Read Methods
Write Methods
Error Handling
Configuration
Retry automatically handles transient failures (429 Too Many Requests, 500, 502, 503, 504) with exponential backoff and jitter. The Retry-After header is respected on 429 responses.
Auto-Pagination
getTransactions() returns a single page. For large datasets, use the auto-pagination helpers:
Both methods accept the same filter options as getTransactions() (date range, category, account, tags, etc.).
Refresh Progress
Track account refresh progress with the onProgress callback:
MCP Server (AI Agent Integration)
This package includes a built-in Model Context Protocol server with 30 tools, making your Monarch Money data accessible to AI assistants like Claude Desktop, Cursor, and any MCP-compatible client.
Setup
-
Get your Monarch Money auth token by logging in with the library (see Authentication) and saving
mm.token. -
Add to your MCP client config (e.g. Claude Desktop
claude_desktop_config.json):
Or run it directly:
Available Tools
Read (18 tools): get_accounts, get_account_holdings, get_account_history, get_account_type_options, get_recent_account_balances, get_aggregate_snapshots, get_institutions, get_budgets, get_subscription_details, get_transactions, get_transactions_summary, get_transaction_details, get_transaction_categories, get_transaction_category_groups, get_transaction_tags, get_cashflow, get_cashflow_summary, get_recurring_transactions
Write (12 tools): create_transaction, update_transaction, delete_transaction, create_manual_account, update_account, delete_account, refresh_accounts, is_refresh_complete, set_budget_amount, create_transaction_tag, set_transaction_tags, create_transaction_category
Every tool has typed parameters with descriptions, so AI agents know exactly what arguments to pass.
Project Structure
Testing
Tests use Vitest and do not require real API credentials (fetch is mocked where needed).
Test the API connection (against the live api.monarch.com):
Set these in a .env file for convenience (see .env.example).
FAQ
How do I use this if I login to Monarch via Google?
Set a password on your Monarch account at Settings > Security, then use that password with this library.
Why does Monarch ask for an email code every time I login?
Monarch requires email verification for new/unrecognized devices. After login, save the session token with mm.saveSession() or store mm.token — subsequent runs will reuse it without re-authenticating.
How This Library Compares
There are several unofficial Monarch Money integrations. Here's how @hakimelek/monarchmoney stacks up.
Landscape
Where this library wins
Minimal footprint. One runtime dependency vs 5-7 in the JS/TS alternatives. Native fetch means zero HTTP polyfills on Node 18+.
Email OTP support. Monarch now requires email verification for unrecognized devices, even when MFA is off. This is the only Node.js library that handles the full EmailOtpRequiredException → submitEmailOtp() flow. Without it, automated scripts break on first login from a new environment.
Typed everything. Every API response has a dedicated TypeScript interface — 50+ exported types covering accounts, transactions, holdings, cashflow, budgets, recurring items, and mutations. The monarch-money-api package has no types at all.
Structured error handling. Four distinct exception classes (LoginFailedException, RequireMFAException, EmailOtpRequiredException, RequestFailedException) with error codes and status codes. Competitors throw generic errors or strings.
Broader write coverage. Includes updateTransaction(), setBudgetAmount(), uploadAccountBalanceHistory(), getCashflow(), getCashflowSummary(), and getRecurringTransactions() — all missing from monarch-money-api.
Clean, flat API. One class, direct methods, no sub-objects or verbosity levels to learn. Import MonarchMoney, call methods, get typed results.
Contributing
Contributions welcome. Please ensure TypeScript compiles cleanly (npm run build) and tests pass (npm test).
License
MIT
來源:README.md,提交 fd125b6
工具
0版本歷史
1- v0.3.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分