
Monarch Money
com.pulsemcp由 pulsemcp.com 发布v0.0.13更新于 Oct 24, 2026
MCP server for Monarch Money — account, transaction, and budget management.
概览
本地 MCP 服务器,让助手读取并修改你自己 Monarch Money 账户中的账户、交易、预算和净资产数据。
- 可以做什么
- 列出账户及余额和持仓、查询余额历史、触发机构同步
- 查看净资产历史或按账户类型的当前构成
- 以列表、汇总、现金流、按分类和周期性视图查询交易,并查看单笔交易明细
- 创建、修改、批量重分类、拆分和删除交易
- 列出、创建和删除分类与标签
- 列出、创建、修改和删除自动分类规则,读取或设置预算金额
- 适用场景
- 适合让助手基于 Monarch Money 数据回答个人财务问题,或执行批量操作,例如重分类交易、打标签、调整预算、编写交易规则。若只想做分析,可以只启用只读模式。
- 运行要求
- 通过 npx 在本地运行(需要 Node.js)。需要 Monarch Money 账户和身份验证:会话令牌(MONARCH_SESSION_TOKEN,推荐)或邮箱与密码(MONARCH_EMAIL、MONARCH_PASSWORD),启用两步验证时还需 MONARCH_TOTP,新安装首次登录还需 MONARCH_EMAIL_OTP。需要访问 Monarch 的 GraphQL API 的网络。可选 MONARCH_STATE_DIR 和 MONARCH_SESSION_PASSPHRASE 控制加密会话文件。
安装
在 SourceWeft 中
- 打开 控制台中的 Monarch Money,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Monarch Money MCP Server
MCP server for Monarch Money — a personal finance app that aggregates accounts, transactions, budgets, and net worth across institutions. This server gives an AI assistant read and write access to the same data the Monarch web/mobile app shows you, scoped to your own account.
Highlights
- 23 consolidated tools across two groups (
readonly,manage) covering accounts, balances, net worth, cashflow, transactions, categories, tags, transaction rules, and budgets - Encrypted on-disk session at
~/.monarch-money-mcp/session.enc— the server never accepts a Monarch password through a tool input - Tool group filtering via env vars — run the server in a strict read-only mode, or hand-pick the exact tools you want exposed to the agent
- Custom thin GraphQL transport targeting
api.monarch.com/graphql— no third-party Monarch client dependency
Why a custom GraphQL client?
The tools in this server span accounts, transactions, budgets, rules, categories, and net worth. We evaluated existing TypeScript Monarch clients and didn't find one that covered the surface we needed and was actively maintained. Rather than wrap a partial third-party client and patch around its gaps, this server ships a small in-house transport (shared/src/monarch-client/graphql-transport.ts) that is deliberately minimal: build the request, surface auth/network errors with typed exceptions, return the typed data payload. Operations live as named GraphQL strings in shared/src/monarch-client/operations.ts so the surface is grep-able and easy to extend.
Authentication
Monarch's /auth/login/ endpoint gates first-time logins from an unfamiliar device behind an email OTP Monarch sends to your inbox, plus per-IP throttling and a Cloudflare bot challenge. That makes a fully unattended email + password flow impossible on a fresh install — the user has to read the code from email at least once. After that one-time pairing, the same install can log in with credentials alone.
Because of that, the recommended path is to paste a session token rather than ship credentials in the env. The server supports four ways to authenticate, in priority order:
1. Env-var session token (recommended)
Paste a token once into the launcher's environment. Headless, autonomous, no OTP gate.
MONARCH_SESSION_TOKEN=<your-token>
Where to get a token:
- Run
npm run login(option 3) once and copy it out of~/.monarch-money-mcp/session.enc(after decrypting), OR - Open the Monarch web app DevTools → Network → any
/graphqlrequest → copy the value of theAuthorization: Token <…>header.
The token is resolved at startup, validated, and persisted to disk so the env var becomes optional after the first run.
2. Tool-based token paste
If you can't set env vars (e.g., a UI that doesn't expose the launcher's env), call the monarch_login_with_token tool with the token as input. The server validates it via Monarch's me endpoint before saving.
3. Env-var email + password (best-effort)
Set credentials in the env and let the server log in:
MONARCH_EMAIL=<email>
MONARCH_PASSWORD=<password>
MONARCH_TOTP=<code> # only if your account has 2FA enabled
MONARCH_EMAIL_OTP=<code> # only on the first launch from a new install
On the first launch from a fresh install Monarch sends an OTP to your email. The server logs a clear stderr message explaining what to do; set MONARCH_EMAIL_OTP=<code> and restart. Subsequent launches reuse the persisted device-uuid and skip the OTP gate.
4. Interactive CLI
cd servers/monarch-money/local
npm run login
Prompts for email, password, optional TOTP, and (if challenged) the email OTP. Writes the encrypted token to ~/.monarch-money-mcp/session.enc.
Session encryption
The token is encrypted at rest with AES-256-GCM. The encryption key is derived via scrypt from a passphrase:
- If
MONARCH_SESSION_PASSPHRASEis set, that's the passphrase. - Otherwise, the passphrase is derived from the machine's hostname (
os.hostname()) and the current user (os.userInfo().username) — making the encrypted file machine-bound by default.
This isn't a defense against a local attacker who already controls your shell, but it does prevent accidental cross-host disclosure (e.g., the file ending up in a backup that gets restored on another machine).
Tool Groups
Tools are tagged with one or more groups. The default exposes everything; setting MONARCH_ENABLED_TOOL_GROUPS (or MONARCH_ENABLED_TOOLS / MONARCH_DISABLED_TOOLS) narrows the surface.
| Group | Includes |
|---|---|
readonly | Lookups only — accounts, transactions, balances, net worth, categories, budgets, rules. |
manage | Everything in readonly plus mutations — create/update/delete transactions, tags, rules, budgets; refresh accounts. |
Filter precedence: MONARCH_ENABLED_TOOLS (whitelist, exact names) > MONARCH_ENABLED_TOOL_GROUPS (group filter) > MONARCH_DISABLED_TOOLS (blacklist, exact names).
# Strict read-only deployment
MONARCH_ENABLED_TOOL_GROUPS=readonly
# Deny one specific tool
MONARCH_DISABLED_TOOLS=delete_transaction
# Whitelist exactly two tools
MONARCH_ENABLED_TOOLS=get_transactions,get_accounts
Tools
Authentication / session
| Tool | Groups | Description |
|---|---|---|
check_authentication | readonly, manage | Verify the on-disk session is valid (calls Monarch's me); returns setup instructions if not authenticated. |
monarch_login_with_token | manage | Persist a pre-obtained session token to encrypted disk storage. |
Accounts
| Tool | Groups | Description |
|---|---|---|
get_accounts | readonly, manage | List every connected account with balances and metadata. Pass includeHoldings: true to attach investment holdings to each account. |
get_account_balance_history | readonly, manage | Daily balance snapshots for one account over a date range. |
set_account_balance_history | manage | Set recorded daily balance snapshots for a manual account — range mode (start/end/balance) or explicit { date, balance } list. Per-date upsert via Monarch's balance-history importer. |
refresh_accounts | manage | Trigger an upstream institution sync. |
Net worth
| Tool | Groups | Description |
|---|---|---|
get_net_worth | readonly, manage | Net worth view. view: "history" (default) returns a time series; view: "by_type" returns a current breakdown by account type. |
Transactions (read)
| Tool | Groups | Description |
|---|---|---|
get_transactions | readonly, manage | Query transactions in five shapes via view: list (default, paged with filters), summary (aggregate totals), cashflow (income/expense/savings), by_category (totals per category), recurring (forecasted occurrences). |
get_transaction_details | readonly, manage | Full detail for a single transaction, including its splits. |
Transactions (write)
| Tool | Groups | Description |
|---|---|---|
create_transaction | manage | Create a manual transaction. |
update_transaction | manage | Patch a transaction. Supports amount / date / merchantId / categoryId / notes / hideFromReports / reviewed / tagIds in any combination. Pass bulkTransactionIds + categoryId to bulk-recategorize many transactions in one call. |
delete_transaction | manage | Permanently delete a transaction. |
split_transaction | manage | Split a transaction into multiple categorized parts. |
Categories & tags
| Tool | Groups | Description |
|---|---|---|
get_categories | readonly, manage | List all categories. Pass includeGroups: true to also return the top-level category groups. |
get_tags | readonly, manage | List all tags. |
create_tag | manage | Create a tag. Requires name and a hex color (e.g. #19d2a5); order is server-assigned. |
delete_tag | manage | Delete a tag by id. Returns { deleted, errors }; deleted is confirmed by re-reading. |
Transaction rules (auto-classification)
| Tool | Groups | Description |
|---|---|---|
get_transaction_rules | readonly, manage | List configured auto-classify rules, including each rule's criteria and actions. |
create_transaction_rule | manage | Create a rule from one or more criteria (merchant / amount / category / account) plus one or more match actions. |
update_transaction_rule | manage | Update a rule by id. Full replace — re-supply the rule's complete criteria and actions (≥1 of each); any field you omit is cleared from the rule. |
delete_transaction_rule | manage | Permanently delete a rule by id. |
Budgets
| Tool | Groups | Description |
|---|---|---|
get_budgets | readonly, manage | List configured budgets. |
set_budget_amount | manage | Set the budget amount for a category. |
Quick Start
Install
npx monarch-money-mcp-server
Authenticate
# Clone the repo, cd into this server, then:
cd local
npm run login
# Prompts for email, password, TOTP — writes encrypted token to ~/.monarch-money-mcp/session.enc
Claude Desktop configuration
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"monarch-money": {
"command": "npx",
"args": ["-y", "monarch-money-mcp-server"]
}
}
}
Restart Claude Desktop and you should be ready. The server reads the encrypted session file from disk — no env vars are required for normal use.
Environment Variables
| Variable | Required | Description | Default |
|---|---|---|---|
MONARCH_SESSION_TOKEN | No | Pre-obtained session token; resolved at startup and persisted to disk on first run. | (none) |
MONARCH_EMAIL | No | Email address for env-var login (paired with MONARCH_PASSWORD). | (none) |
MONARCH_PASSWORD | No | Password for env-var login. | (none) |
MONARCH_TOTP | No | TOTP code (only if 2FA is enabled). | (none) |
MONARCH_EMAIL_OTP | No | Email OTP code (only on first login from a new install). | (none) |
MONARCH_SESSION_PASSPHRASE | No | Override the encryption passphrase used for the on-disk session file. | monarch-mcp:${HOSTNAME}:${USER} |
MONARCH_STATE_DIR | No | Override the directory where session.enc lives. | ~/.monarch-money-mcp |
MONARCH_ENABLED_TOOL_GROUPS | No | Comma-separated list of groups to expose (readonly, manage). Defaults to all groups. | (all) |
MONARCH_ENABLED_TOOLS | No | Comma-separated whitelist of tool names. When set, takes precedence over groups and the disabled list. | (none) |
MONARCH_DISABLED_TOOLS | No | Comma-separated blacklist of tool names. Removes specific tools after group filtering is applied. | (none) |
Security Considerations
- No password through MCP tools. Authentication happens via the CLI login script or env vars, never through a tool input. Tool inputs may end up in transcripts and prompt caches; passwords don't belong there.
- Session file is encrypted at rest with AES-256-GCM. The default passphrase (host + user) ties the file to the machine that wrote it.
- Tool group filtering is the primary write-protection mechanism. Set
MONARCH_ENABLED_TOOL_GROUPS=readonlyfor a strict read-only deployment. - Read tools are not gated. Reading account/transaction data is unrestricted once the session is unlocked. If you need read-side approval, run the server behind a client that wraps tool calls in its own confirmation flow.
Development
Project Structure
monarch-money/
├── local/ # Stdio entry point
│ └── src/
│ ├── index.ts # Production entry
│ └── index.integration-with-mock.ts # Integration test entry
├── shared/ # Business logic
│ └── src/
│ ├── server.ts # MCP server factory
│ ├── tools.ts # Tool registration glue + group filtering
│ ├── tools/ # One file per tool group
│ ├── monarch-client/ # GraphQL transport + session store
│ └── types.ts
├── scripts/
│ └── login.ts # Email/password/TOTP CLI flow
└── tests/
├── functional/ # Unit tests with mocked client
├── integration/ # Full MCP protocol with mocked Monarch
└── e2e/ # Hits the real Monarch GraphQL API
Running Tests
# From this directory:
npm test # Functional tests
npm run test:integration # Integration tests (builds first)
npm run test:e2e # E2E tests (requires MONARCH_SESSION_TOKEN)
License
MIT
来源:experimental/monarch-money/README.md,提交 0ed34de
工具
0版本历史
1- v0.0.13最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分