monarch-money-mcp-server

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Monarch Money MCP Server

Monarch Money MCP Server

Skill by ara.so — MCP Skills collection
ara.so开发的Skill — MCP Skills合集

Overview

概述

The Monarch Money MCP Server provides seamless integration with the Monarch Money personal finance platform through the Model Context Protocol. It enables Claude Desktop and Claude Code to access your financial accounts, transactions, budgets, analytics, and more through a comprehensive set of tools.
Built on the MonarchMoneyCommunity Python library with full MFA support.
Monarch Money MCP Server通过Model Context Protocol实现与Monarch Money个人理财平台的无缝集成。它使Claude Desktop和Claude Code能够通过一套全面的工具访问你的金融账户、交易记录、预算、分析数据等内容。
基于MonarchMoneyCommunity Python库构建,支持完整的MFA功能。

Installation

安装

1. Clone and Install Dependencies

1. 克隆项目并安装依赖

bash
git clone https://github.com/robcerda/monarch-mcp-server.git
cd monarch-mcp-server
bash
git clone https://github.com/robcerda/monarch-mcp-server.git
cd monarch-mcp-server

Using pip

使用pip

pip install -r requirements.txt pip install -e .
pip install -r requirements.txt pip install -e .

OR using uv

或使用uv

uv sync
undefined
uv sync
undefined

2. Configure Claude Desktop

2. 配置Claude Desktop

Add to
~/Library/Application Support/Claude/claude_desktop_config.json
(macOS) or
%APPDATA%\Claude\claude_desktop_config.json
(Windows):
json
{
  "mcpServers": {
    "Monarch Money": {
      "command": "/opt/homebrew/bin/uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with-editable",
        "/absolute/path/to/monarch-mcp-server",
        "mcp",
        "run",
        "/absolute/path/to/monarch-mcp-server/src/monarch_mcp_server/server.py"
      ]
    }
  }
}
If using pip instead of uv:
json
{
  "mcpServers": {
    "Monarch Money": {
      "command": "python",
      "args": ["/absolute/path/to/monarch-mcp-server/src/monarch_mcp_server/server.py"]
    }
  }
}
添加至
~/Library/Application Support/Claude/claude_desktop_config.json
(macOS系统)或
%APPDATA%\Claude\claude_desktop_config.json
(Windows系统):
json
{
  "mcpServers": {
    "Monarch Money": {
      "command": "/opt/homebrew/bin/uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with-editable",
        "/absolute/path/to/monarch-mcp-server",
        "mcp",
        "run",
        "/absolute/path/to/monarch-mcp-server/src/monarch_mcp_server/server.py"
      ]
    }
  }
}
如果使用pip而非uv:
json
{
  "mcpServers": {
    "Monarch Money": {
      "command": "python",
      "args": ["/absolute/path/to/monarch-mcp-server/src/monarch_mcp_server/server.py"]
    }
  }
}

3. Configure Claude Code (CLI)

3. 配置Claude Code(CLI)

Global config (
~/.claude.json
or
%USERPROFILE%\.claude.json
):
json
{
  "mcpServers": {
    "Monarch Money": {
      "command": "/opt/homebrew/bin/uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with-editable",
        "/absolute/path/to/monarch-mcp-server",
        "mcp",
        "run",
        "/absolute/path/to/monarch-mcp-server/src/monarch_mcp_server/server.py"
      ]
    }
  }
}
Project-level config (
.mcp.json
in project directory):
json
{
  "Monarch Money": {
    "command": "/opt/homebrew/bin/uv",
    "args": [
      "run",
      "--with",
      "mcp[cli]",
      "--with-editable",
      "/absolute/path/to/monarch-mcp-server",
      "mcp",
      "run",
      "/absolute/path/to/monarch-mcp-server/src/monarch_mcp_server/server.py"
    ]
  }
}
全局配置
~/.claude.json
%USERPROFILE%\.claude.json
):
json
{
  "mcpServers": {
    "Monarch Money": {
      "command": "/opt/homebrew/bin/uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with-editable",
        "/absolute/path/to/monarch-mcp-server",
        "mcp",
        "run",
        "/absolute/path/to/monarch-mcp-server/src/monarch_mcp_server/server.py"
      ]
    }
  }
}
项目级配置(项目目录下的
.mcp.json
):
json
{
  "Monarch Money": {
    "command": "/opt/homebrew/bin/uv",
    "args": [
      "run",
      "--with",
      "mcp[cli]",
      "--with-editable",
      "/absolute/path/to/monarch-mcp-server",
      "mcp",
      "run",
      "/absolute/path/to/monarch-mcp-server/src/monarch_mcp_server/server.py"
    ]
  }
}

4. One-Time Authentication

4. 一次性认证

Run the authentication setup script outside of Claude:
bash
cd /absolute/path/to/monarch-mcp-server
在Claude外部运行认证设置脚本:
bash
cd /absolute/path/to/monarch-mcp-server

Using python

使用python

python login_setup.py
python login_setup.py

OR using uv

或使用uv

uv run python login_setup.py

Follow prompts to enter:
- Monarch Money email and password
- 2FA code (if MFA is enabled)

Session tokens are stored securely and persist for weeks/months.

**For SSO/Google sign-in users:**
Use the `monarch_login_with_token` function to paste a session token from your browser.
uv run python login_setup.py

按照提示输入:
- Monarch Money邮箱和密码
- 2FA验证码(若启用MFA)

会话令牌将被安全存储,有效期可达数周/数月。

**对于SSO/谷歌登录用户:**
使用`monarch_login_with_token`函数粘贴浏览器中的会话令牌。

Core Tools

核心工具

Account Management

账户管理

get_accounts

get_accounts

Retrieve all linked financial accounts with balances and institution info.
python
undefined
获取所有关联金融账户的余额和机构信息。
python
undefined

Returns all accounts with: id, displayName, currentBalance, accountType, institution

返回所有账户信息:id、displayName、currentBalance、accountType、institution

get_accounts()

**Example prompt:**
Show me all my financial accounts
undefined
get_accounts()

**示例提示:**
展示我所有的金融账户
undefined

get_account_holdings

get_account_holdings

View securities and investments in investment accounts.
python
get_account_holdings(account_id="acc_123456")
Example prompt:
What holdings do I have in my investment account acc_123456?
查看投资账户中的证券和投资产品。
python
get_account_holdings(account_id="acc_123456")
示例提示:
我的投资账户acc_123456中有哪些持仓?

refresh_accounts

refresh_accounts

Request real-time data refresh from financial institutions.
python
refresh_accounts()
Example prompt:
Refresh all my account balances from the banks
请求从金融机构获取实时数据刷新。
python
refresh_accounts()
示例提示:
刷新我所有银行账户的余额

Transaction Access

交易访问

get_transactions

get_transactions

Fetch transactions with filtering, pagination, and reconciliation fields.
python
undefined
获取交易记录,支持过滤、分页和对账字段。
python
undefined

Basic usage - last 50 transactions

基础用法 - 最近50条交易记录

get_transactions(limit=50)
get_transactions(limit=50)

Filtered by date range

按日期范围过滤

get_transactions( start_date="2024-01-01", end_date="2024-01-31", limit=100 )
get_transactions( start_date="2024-01-01", end_date="2024-01-31", limit=100 )

Filter by account and category

按账户和分类过滤

get_transactions( account_id="acc_123", category_ids=["cat_456", "cat_789"], limit=50, offset=0 )
get_transactions( account_id="acc_123", category_ids=["cat_456", "cat_789"], limit=50, offset=0 )

Search transactions

搜索交易记录

get_transactions( search="Amazon", wide_search=True, limit=25 )
get_transactions( search="Amazon", wide_search=True, limit=25 )

Filter by flags

按标记过滤

get_transactions( has_notes=False, is_split=False, limit=100 )

**Example prompts:**
Show me my last 100 transactions Get all Amazon transactions from January 2024 Show me uncategorized transactions with no notes
undefined
get_transactions( has_notes=False, is_split=False, limit=100 )

**示例提示:**
展示我最近100条交易记录 获取2024年1月所有亚马逊交易记录 展示所有未分类且无备注的交易记录
undefined

create_transaction

create_transaction

Add a new transaction to an account.
python
create_transaction(
    account_id="acc_123",
    amount=-45.99,
    description="Coffee shop",
    date="2024-01-15",
    category_id="cat_dining",
    merchant_name="Local Cafe"
)
Example prompt:
Create a transaction for $45.99 at Local Cafe on January 15th in my checking account
向账户添加新交易记录。
python
create_transaction(
    account_id="acc_123",
    amount=-45.99,
    description="咖啡店",
    date="2024-01-15",
    category_id="cat_dining",
    merchant_name="本地咖啡馆"
)
示例提示:
在我的支票账户中创建一条2024年1月15日在本地咖啡馆消费45.99美元的交易记录

update_transaction

update_transaction

Modify existing transaction details.
python
update_transaction(
    transaction_id="txn_789",
    amount=-52.00,
    description="Grocery store shopping",
    category_id="cat_groceries",
    date="2024-01-16"
)
Example prompt:
Update transaction txn_789 to $52 and change the category to groceries
修改现有交易记录的详情。
python
update_transaction(
    transaction_id="txn_789",
    amount=-52.00,
    description="杂货店购物",
    category_id="cat_groceries",
    date="2024-01-16"
)
示例提示:
将交易txn_789的金额更新为52美元,并将分类改为杂货

Budget Management

预算管理

get_budgets

get_budgets

Access budget information with spending analysis.
python
undefined
访问预算信息及支出分析。
python
undefined

Current month budgets

当前月份预算

get_budgets()
get_budgets()

Specific date range

指定日期范围

get_budgets( start_date="2024-01-01", end_date="2024-12-31" )

**Example prompt:**
Show me my budgets for 2024
undefined
get_budgets( start_date="2024-01-01", end_date="2024-12-31" )

**示例提示:**
展示我2024年的预算
undefined

set_budget_amount

set_budget_amount

Create or modify budget amounts.
python
undefined
创建或修改预算金额。
python
undefined

Set budget for a category

设置分类预算

set_budget_amount( amount=500.00, category_id="cat_dining", start_date="2024-02-01", apply_to_future=True )
set_budget_amount( amount=500.00, category_id="cat_dining", start_date="2024-02-01", apply_to_future=True )

Set budget for a category group

设置分类组预算

set_budget_amount( amount=2000.00, category_group_id="grp_housing", start_date="2024-02-01", apply_to_future=False )

**Example prompt:**
Set my dining budget to $500 per month starting in February
undefined
set_budget_amount( amount=2000.00, category_group_id="grp_housing", start_date="2024-02-01", apply_to_future=False )

**示例提示:**
从2月开始,将我的餐饮预算设置为每月500美元
undefined

Category Management

分类管理

get_categories

get_categories

List all transaction categories with groups and metadata.
python
get_categories()
列出所有交易分类及其分组和元数据。
python
get_categories()

Returns: id, name, group, icon, systemCategory, isSystemCategory, isDisabled

返回:id、name、group、icon、systemCategory、isSystemCategory、isDisabled


**Example prompt:**
List all my transaction categories
undefined

**示例提示:**
列出我所有的交易分类
undefined

get_category_groups

get_category_groups

View category groups with their associated categories.
python
get_category_groups()
Example prompt:
Show me all category groups
查看分类组及其关联的分类。
python
get_category_groups()
示例提示:
展示所有分类组

set_transaction_category

set_transaction_category

Assign a category to a transaction.
python
set_transaction_category(
    transaction_id="txn_123",
    category_id="cat_groceries",
    mark_reviewed=True
)
Example prompt:
Categorize transaction txn_123 as groceries and mark it reviewed
为交易记录分配分类。
python
set_transaction_category(
    transaction_id="txn_123",
    category_id="cat_groceries",
    mark_reviewed=True
)
示例提示:
将交易txn_123分类为杂货,并标记已审核

bulk_categorize_transactions

bulk_categorize_transactions

Apply a category to multiple transactions at once.
python
bulk_categorize_transactions(
    transaction_ids=["txn_1", "txn_2", "txn_3"],
    category_id="cat_dining"
)
Example prompt:
Categorize all these Amazon transactions as shopping: txn_1, txn_2, txn_3
一次性为多条交易记录应用分类。
python
bulk_categorize_transactions(
    transaction_ids=["txn_1", "txn_2", "txn_3"],
    category_id="cat_dining"
)
示例提示:
将这些亚马逊交易记录分类为购物:txn_1、txn_2、txn_3

Transaction Review Workflow

交易审核流程

get_transactions_needing_review

get_transactions_needing_review

Find transactions requiring attention.
python
undefined
查找需要关注的交易记录。
python
undefined

All transactions needing review

所有需要审核的交易记录

get_transactions_needing_review(needs_review=True)
get_transactions_needing_review(needs_review=True)

Uncategorized transactions only

仅未分类交易记录

get_transactions_needing_review(uncategorized=True)
get_transactions_needing_review(uncategorized=True)

Transactions without notes

无备注的交易记录

get_transactions_needing_review(no_notes=True)
get_transactions_needing_review(no_notes=True)

Last N days

最近N天的记录

get_transactions_needing_review( needs_review=True, days=30 )

**Example prompt:**
Show me all uncategorized transactions from the last 30 days
undefined
get_transactions_needing_review( needs_review=True, days=30 )

**示例提示:**
展示我最近30天所有未分类的交易记录
undefined

update_transaction_notes

update_transaction_notes

Add or update notes on transactions.
python
update_transaction_notes(
    transaction_id="txn_456",
    notes="Receipt: https://example.com/receipt.pdf"
)
Example prompt:
Add a note to transaction txn_456 with the receipt link
为交易记录添加或更新备注。
python
update_transaction_notes(
    transaction_id="txn_456",
    notes="收据链接:https://example.com/receipt.pdf"
)
示例提示:
为交易txn_456添加备注,包含收据链接

mark_transaction_reviewed

mark_transaction_reviewed

Clear the needs_review flag.
python
mark_transaction_reviewed(transaction_id="txn_789")
Example prompt:
Mark transaction txn_789 as reviewed
清除needs_review标记。
python
mark_transaction_reviewed(transaction_id="txn_789")
示例提示:
将交易txn_789标记为已审核

Tag Management

标签管理

get_tags

get_tags

List all available tags with colors and usage counts.
python
get_tags()
Example prompt:
Show me all my transaction tags
列出所有可用标签及其颜色和使用次数。
python
get_tags()
示例提示:
展示我所有的交易标签

set_transaction_tags

set_transaction_tags

Apply tags to a transaction.
python
set_transaction_tags(
    transaction_id="txn_123",
    tag_ids=["tag_business", "tag_reimbursable"]
)
Example prompt:
Tag transaction txn_123 as business and reimbursable
为交易记录应用标签。
python
set_transaction_tags(
    transaction_id="txn_123",
    tag_ids=["tag_business", "tag_reimbursable"]
)
示例提示:
为交易txn_123添加商务和可报销标签

create_tag

create_tag

Create a new tag with custom name and color.
python
create_tag(
    name="Travel",
    color="#FF5733"
)
Example prompt:
Create a new tag called Travel with color red
创建自定义名称和颜色的新标签。
python
create_tag(
    name="Travel",
    color="#FF5733"
)
示例提示:
创建一个名为Travel的红色标签

Advanced Search

高级搜索

search_transactions

search_transactions

Comprehensive search with multiple filters.
python
search_transactions(
    search="Starbucks",
    category_ids=["cat_dining"],
    account_ids=["acc_checking"],
    tag_ids=["tag_business"],
    start_date="2024-01-01",
    end_date="2024-01-31",
    min_amount=5.00,
    max_amount=50.00
)
Example prompt:
Find all Starbucks transactions tagged as business between $5 and $50 in January
多条件综合搜索。
python
search_transactions(
    search="Starbucks",
    category_ids=["cat_dining"],
    account_ids=["acc_checking"],
    tag_ids=["tag_business"],
    start_date="2024-01-01",
    end_date="2024-01-31",
    min_amount=5.00,
    max_amount=50.00
)
示例提示:
查找2024年1月所有金额在5-50美元之间、标记为商务的星巴克交易记录

get_transaction_details

get_transaction_details

Retrieve complete details for a single transaction.
python
get_transaction_details(transaction_id="txn_456")
Example prompt:
Get full details for transaction txn_456
获取单条交易记录的完整详情。
python
get_transaction_details(transaction_id="txn_456")
示例提示:
获取交易txn_456的完整详情

delete_transaction

delete_transaction

Remove a transaction.
python
delete_transaction(transaction_id="txn_789")
Example prompt:
Delete transaction txn_789
删除交易记录。
python
delete_transaction(transaction_id="txn_789")
示例提示:
删除交易txn_789

get_recurring_transactions

get_recurring_transactions

View upcoming recurring transactions.
python
get_recurring_transactions()
Example prompt:
Show me all my recurring transactions
查看即将到来的定期交易记录。
python
get_recurring_transactions()
示例提示:
展示我所有的定期交易记录

Transaction Rules (Auto-Categorization)

交易规则(自动分类)

get_transaction_rules

get_transaction_rules

List all auto-categorization rules.
python
get_transaction_rules()
Example prompt:
Show me all my transaction rules
列出所有自动分类规则。
python
get_transaction_rules()
示例提示:
展示我所有的交易规则

create_transaction_rule

create_transaction_rule

Create rules with merchant/amount conditions.
python
create_transaction_rule(
    merchant_criteria_operator="contains",
    merchant_criteria_value="Spotify",
    set_category_id="cat_subscriptions",
    add_tag_ids=["tag_recurring"]
)
创建包含商家/金额条件的规则。
python
create_transaction_rule(
    merchant_criteria_operator="contains",
    merchant_criteria_value="Spotify",
    set_category_id="cat_subscriptions",
    add_tag_ids=["tag_recurring"]
)

Rule with amount criteria

包含金额条件的规则

create_transaction_rule( merchant_criteria_operator="contains", merchant_criteria_value="Gas", set_category_id="cat_transportation", amount_operator="greater_than", amount_value=20.00 )

**Example prompt:**
Create a rule to categorize all Spotify transactions as subscriptions
undefined
create_transaction_rule( merchant_criteria_operator="contains", merchant_criteria_value="Gas", set_category_id="cat_transportation", amount_operator="greater_than", amount_value=20.00 )

**示例提示:**
创建规则,将所有Spotify交易记录自动分类为订阅
undefined

update_transaction_rule

update_transaction_rule

Modify existing rules.
python
update_transaction_rule(
    rule_id="rule_123",
    merchant_criteria_operator="equals",
    merchant_criteria_value="Netflix",
    set_category_id="cat_entertainment"
)
Example prompt:
Update rule rule_123 to use exact match for Netflix
修改现有规则。
python
update_transaction_rule(
    rule_id="rule_123",
    merchant_criteria_operator="equals",
    merchant_criteria_value="Netflix",
    set_category_id="cat_entertainment"
)
示例提示:
更新规则rule_123,使其对Netflix进行精确匹配

delete_transaction_rule

delete_transaction_rule

Remove a rule.
python
delete_transaction_rule(rule_id="rule_456")
Example prompt:
Delete transaction rule rule_456
删除规则。
python
delete_transaction_rule(rule_id="rule_456")
示例提示:
删除交易规则rule_456

Transaction Splits

交易拆分

get_transaction_splits

get_transaction_splits

View how a transaction has been split.
python
get_transaction_splits(transaction_id="txn_789")
Example prompt:
Show me the splits for transaction txn_789
查看交易记录的拆分情况。
python
get_transaction_splits(transaction_id="txn_789")
示例提示:
展示交易txn_789的拆分详情

split_transaction

split_transaction

Divide a transaction into multiple parts.
python
split_transaction(
    transaction_id="txn_123",
    splits=[
        {
            "amount": -30.00,
            "category_id": "cat_groceries",
            "merchant_name": "Target - Groceries"
        },
        {
            "amount": -20.00,
            "category_id": "cat_household",
            "merchant_name": "Target - Household"
        }
    ]
)
Example prompt:
Split transaction txn_123: $30 for groceries and $20 for household items
将交易记录拆分为多个部分。
python
split_transaction(
    transaction_id="txn_123",
    splits=[
        {
            "amount": -30.00,
            "category_id": "cat_groceries",
            "merchant_name": "Target - 杂货"
        },
        {
            "amount": -20.00,
            "category_id": "cat_household",
            "merchant_name": "Target - 家居"
        }
    ]
)
示例提示:
拆分交易txn_123:30美元为杂货,20美元为家居用品

Financial Analysis

财务分析

get_cashflow

get_cashflow

Analyze income and expenses over time.
python
get_cashflow(
    start_date="2024-01-01",
    end_date="2024-12-31"
)
Example prompt:
Show me my cashflow for 2024
分析一段时间内的收支情况。
python
get_cashflow(
    start_date="2024-01-01",
    end_date="2024-12-31"
)
示例提示:
展示我2024年的现金流情况

get_net_worth

get_net_worth

Track net worth with daily snapshots and trends.
python
undefined
跟踪净值变化,包含每日快照和趋势。
python
undefined

All accounts

所有账户

get_net_worth( start_date="2023-01-01", end_date="2024-12-31" )
get_net_worth( start_date="2023-01-01", end_date="2024-12-31" )

Specific account type

指定账户类型

get_net_worth( start_date="2024-01-01", end_date="2024-12-31", account_type="investment" )

**Example prompt:**
Show me my net worth trend for 2024
undefined
get_net_worth( start_date="2024-01-01", end_date="2024-12-31", account_type="investment" )

**示例提示:**
展示我2024年的净值趋势
undefined

get_account_balance_history

get_account_balance_history

View historical balance data for an account.
python
get_account_balance_history(account_id="acc_checking_123")
Example prompt:
Show me the balance history for my checking account
查看账户的历史余额数据。
python
get_account_balance_history(account_id="acc_checking_123")
示例提示:
展示我支票账户的余额历史

get_net_worth_by_account_type

get_net_worth_by_account_type

Net worth breakdown across account types.
python
get_net_worth_by_account_type(
    start_date="2024-01-01",
    timeframe="monthly"
)
Example prompt:
Break down my net worth by account type for 2024
按账户类型拆分的净值详情。
python
get_net_worth_by_account_type(
    start_date="2024-01-01",
    timeframe="monthly"
)
示例提示:
按账户类型拆分展示我2024年的净值

get_transactions_summary

get_transactions_summary

Quick high-level statistics about transactions.
python
get_transactions_summary()
Example prompt:
Give me a summary of my transactions
交易记录的快速高级统计。
python
get_transactions_summary()
示例提示:
给我一份交易记录汇总

get_spending_summary

get_spending_summary

Spending breakdown by category.
python
get_spending_summary(
    start_date="2024-01-01",
    end_date="2024-01-31",
    limit=10
)
Example prompt:
Show me my top 10 spending categories for January
按分类拆分的支出详情。
python
get_spending_summary(
    start_date="2024-01-01",
    end_date="2024-01-31",
    limit=10
)
示例提示:
展示我1月份支出最多的10个分类

Common Patterns

常见模式

Monthly Budget Review

月度预算审核

python
undefined
python
undefined

1. Get current month budgets

1. 获取当前月份预算

budgets = get_budgets()
budgets = get_budgets()

2. Check spending summary

2. 查看支出汇总

summary = get_spending_summary( start_date="2024-01-01", end_date="2024-01-31", limit=20 )
summary = get_spending_summary( start_date="2024-01-01", end_date="2024-01-31", limit=20 )

3. Review over-budget categories

3. 审核超预算分类

Identify categories where spent > budgeted

找出支出超过预算的分类

4. Adjust next month's budgets

4. 调整下个月的预算

set_budget_amount( amount=600.00, category_id="cat_groceries", start_date="2024-02-01", apply_to_future=True )
undefined
set_budget_amount( amount=600.00, category_id="cat_groceries", start_date="2024-02-01", apply_to_future=True )
undefined

Transaction Cleanup Workflow

交易记录清理流程

python
undefined
python
undefined

1. Find transactions needing review

1. 查找需要审核的交易记录

needs_review = get_transactions_needing_review( uncategorized=True, days=30 )
needs_review = get_transactions_needing_review( uncategorized=True, days=30 )

2. Categorize similar transactions in bulk

2. 批量分类相似交易记录

bulk_categorize_transactions( transaction_ids=["txn_1", "txn_2", "txn_3"], category_id="cat_groceries" )
bulk_categorize_transactions( transaction_ids=["txn_1", "txn_2", "txn_3"], category_id="cat_groceries" )

3. Add notes where needed

3. 为需要的记录添加备注

update_transaction_notes( transaction_id="txn_4", notes="Reimbursable expense" )
update_transaction_notes( transaction_id="txn_4", notes="可报销费用" )

4. Mark reviewed

4. 标记为已审核

mark_transaction_reviewed(transaction_id="txn_4")
undefined
mark_transaction_reviewed(transaction_id="txn_4")
undefined

Auto-Categorization Setup

自动分类设置

python
undefined
python
undefined

1. Review common merchants

1. 查看常见商家

transactions = search_transactions( search="Spotify", limit=10 )
transactions = search_transactions( search="Spotify", limit=10 )

2. Create rule for automatic categorization

2. 创建自动分类规则

create_transaction_rule( merchant_criteria_operator="contains", merchant_criteria_value="Spotify", set_category_id="cat_subscriptions", add_tag_ids=["tag_recurring", "tag_entertainment"] )
create_transaction_rule( merchant_criteria_operator="contains", merchant_criteria_value="Spotify", set_category_id="cat_subscriptions", add_tag_ids=["tag_recurring", "tag_entertainment"] )

3. Verify rule is working

3. 验证规则是否生效

rules = get_transaction_rules()
undefined
rules = get_transaction_rules()
undefined

Investment Portfolio Review

投资组合审核

python
undefined
python
undefined

1. Get all investment accounts

1. 获取所有投资账户

accounts = get_accounts() investment_accounts = [a for a in accounts if a['accountType'] == 'investment']
accounts = get_accounts() investment_accounts = [a for a in accounts if a['accountType'] == 'investment']

2. Check holdings for each

2. 查看每个账户的持仓

for acc in investment_accounts: holdings = get_account_holdings(account_id=acc['id'])
for acc in investment_accounts: holdings = get_account_holdings(account_id=acc['id'])

3. Review balance history

3. 查看余额历史

history = get_account_balance_history(account_id=acc['id'])
history = get_account_balance_history(account_id=acc['id'])

4. Check overall net worth trend

4. 查看整体净值趋势

net_worth = get_net_worth( start_date="2023-01-01", end_date="2024-12-31", account_type="investment" )
undefined
net_worth = get_net_worth( start_date="2023-01-01", end_date="2024-12-31", account_type="investment" )
undefined

Expense Tracking with Tags

标签化费用跟踪

python
undefined
python
undefined

1. Create project-specific tags

1. 创建项目专属标签

create_tag(name="Project Alpha", color="#3498db") create_tag(name="Reimbursable", color="#e74c3c")
create_tag(name="Project Alpha", color="#3498db") create_tag(name="Reimbursable", color="#e74c3c")

2. Tag relevant transactions

2. 为相关交易记录添加标签

set_transaction_tags( transaction_id="txn_123", tag_ids=["tag_project_alpha", "tag_reimbursable"] )
set_transaction_tags( transaction_id="txn_123", tag_ids=["tag_project_alpha", "tag_reimbursable"] )

3. Search for all project expenses

3. 搜索所有项目费用

project_expenses = search_transactions( tag_ids=["tag_project_alpha"], start_date="2024-01-01", end_date="2024-12-31" )
project_expenses = search_transactions( tag_ids=["tag_project_alpha"], start_date="2024-01-01", end_date="2024-12-31" )

4. Calculate total reimbursable amount

4. 计算总可报销金额

reimbursable = search_transactions( tag_ids=["tag_reimbursable"], start_date="2024-01-01", end_date="2024-01-31" )
undefined
reimbursable = search_transactions( tag_ids=["tag_reimbursable"], start_date="2024-01-01", end_date="2024-01-31" )
undefined

Authentication

认证

Check Authentication Status

检查认证状态

python
check_auth_status()
Example prompt:
Check if I'm authenticated with Monarch Money
python
check_auth_status()
示例提示:
检查我是否已通过Monarch Money认证

Get Setup Instructions

获取设置说明

python
setup_authentication()
Example prompt:
How do I set up authentication for Monarch Money?
python
setup_authentication()
示例提示:
如何设置Monarch Money的认证?

Troubleshooting

故障排除

Authentication Issues

认证问题

Problem: "Session not found" or authentication errors
Solution:
  1. Run
    python login_setup.py
    from the terminal
  2. Enter credentials and 2FA code if prompted
  3. Restart Claude Desktop or Claude Code
  4. Verify session file exists in
    ~/.monarch/session.pickle
问题: "会话未找到"或认证错误
解决方案:
  1. 在终端运行
    python login_setup.py
  2. 按提示输入凭据和2FA验证码
  3. 重启Claude Desktop或Claude Code
  4. 验证会话文件是否存在于
    ~/.monarch/session.pickle

Missing Transactions

交易记录缺失

Problem: Transactions don't appear or are outdated
Solution:
python
undefined
问题: 交易记录未显示或已过时
解决方案:
python
undefined

Force a refresh from financial institutions

强制从金融机构刷新数据

refresh_accounts()
refresh_accounts()

Wait a few minutes, then check again

等待几分钟后再次查看

get_transactions(limit=50)
undefined
get_transactions(limit=50)
undefined

Tool Not Found

工具未找到

Problem: MCP server not showing in Claude
Solution:
  1. Verify configuration file path (macOS:
    ~/Library/Application Support/Claude/claude_desktop_config.json
    )
  2. Check absolute paths in config - no
    ~
    or relative paths
  3. Restart Claude Desktop completely (quit and reopen)
  4. Check Claude Desktop logs for errors
问题: MCP服务器未在Claude中显示
解决方案:
  1. 验证配置文件路径(macOS:
    ~/Library/Application Support/Claude/claude_desktop_config.json
  2. 检查配置中的绝对路径 - 不要使用
    ~
    或相对路径
  3. 完全重启Claude Desktop(退出并重新打开)
  4. 查看Claude Desktop日志中的错误信息

Performance with Large Result Sets

大数据集性能问题

Problem: Timeouts or slow responses with many transactions
Solution:
python
undefined
问题: 大量交易记录导致超时或响应缓慢
解决方案:
python
undefined

Use pagination for large datasets

对大数据集使用分页

get_transactions(limit=100, offset=0) get_transactions(limit=100, offset=100)
get_transactions(limit=100, offset=0) get_transactions(limit=100, offset=100)

Filter by date range

按日期范围过滤

get_transactions( start_date="2024-01-01", end_date="2024-01-31", limit=500 )
get_transactions( start_date="2024-01-01", end_date="2024-01-31", limit=500 )

Use search with specific criteria

使用特定条件搜索

search_transactions( search="Amazon", start_date="2024-01-01", end_date="2024-01-31" )
undefined
search_transactions( search="Amazon", start_date="2024-01-01", end_date="2024-01-31" )
undefined

Split Transaction Issues

交易拆分问题

Problem: Split amounts don't sum to original transaction
Solution:
python
undefined
问题: 拆分金额总和与原交易记录不符
解决方案:
python
undefined

Ensure split amounts sum exactly to transaction amount

确保拆分金额总和与原交易记录完全一致

Original transaction: -$100

原交易记录:-$100

split_transaction( transaction_id="txn_123", splits=[ {"amount": -60.00, "category_id": "cat_1"}, {"amount": -40.00, "category_id": "cat_2"} ] )
split_transaction( transaction_id="txn_123", splits=[ {"amount": -60.00, "category_id": "cat_1"}, {"amount": -40.00, "category_id": "cat_2"} ] )

Sum: -$100 ✓

总和:-$100 ✓

undefined
undefined

Budget Not Updating

预算未更新

Problem: Budget changes not reflected
Solution:
python
undefined
问题: 预算更改未生效
解决方案:
python
undefined

Ensure apply_to_future is set correctly

确保apply_to_future设置正确

set_budget_amount( amount=500.00, category_id="cat_dining", start_date="2024-02-01", apply_to_future=True # Apply to current and future months )
undefined
set_budget_amount( amount=500.00, category_id="cat_dining", start_date="2024-02-01", apply_to_future=True # 应用于当前及未来月份 )
undefined

Environment Variables

环境变量

The server uses secure session storage. No environment variables are required for normal operation.
Session storage location:
  • macOS/Linux:
    ~/.monarch/session.pickle
  • Windows:
    %USERPROFILE%\.monarch\session.pickle
服务器使用安全会话存储。正常运行无需环境变量。
会话存储位置:
  • macOS/Linux:
    ~/.monarch/session.pickle
  • Windows:
    %USERPROFILE%\.monarch\session.pickle

Additional Resources

额外资源