monarch-money-mcp-server
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMonarch Money MCP Server
Monarch Money MCP Server
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-serverbash
git clone https://github.com/robcerda/monarch-mcp-server.git
cd monarch-mcp-serverUsing pip
使用pip
pip install -r requirements.txt
pip install -e .
pip install -r requirements.txt
pip install -e .
OR using uv
或使用uv
uv sync
undefineduv sync
undefined2. Configure Claude Desktop
2. 配置Claude Desktop
Add to (macOS) or (Windows):
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonjson
{
"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"]
}
}
}添加至(macOS系统)或(Windows系统):
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonjson
{
"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 ( or ):
~/.claude.json%USERPROFILE%\.claude.jsonjson
{
"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 ( in project directory):
.mcp.jsonjson
{
"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.jsonjson
{
"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.jsonjson
{
"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-serverUsing 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_accountsget_accounts
get_accountsRetrieve all linked financial accounts with balances and institution info.
python
undefined获取所有关联金融账户的余额和机构信息。
python
undefinedReturns all accounts with: id, displayName, currentBalance, accountType, institution
返回所有账户信息:id、displayName、currentBalance、accountType、institution
get_accounts()
**Example prompt:**Show me all my financial accounts
undefinedget_accounts()
**示例提示:**展示我所有的金融账户
undefinedget_account_holdings
get_account_holdingsget_account_holdings
get_account_holdingsView 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_accountsrefresh_accounts
refresh_accountsRequest 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_transactionsget_transactions
get_transactionsFetch transactions with filtering, pagination, and reconciliation fields.
python
undefined获取交易记录,支持过滤、分页和对账字段。
python
undefinedBasic 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
undefinedget_transactions(
has_notes=False,
is_split=False,
limit=100
)
**示例提示:**展示我最近100条交易记录
获取2024年1月所有亚马逊交易记录
展示所有未分类且无备注的交易记录
undefinedcreate_transaction
create_transactioncreate_transaction
create_transactionAdd 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_transactionupdate_transaction
update_transactionModify 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_budgetsget_budgets
get_budgetsAccess budget information with spending analysis.
python
undefined访问预算信息及支出分析。
python
undefinedCurrent 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
undefinedget_budgets(
start_date="2024-01-01",
end_date="2024-12-31"
)
**示例提示:**展示我2024年的预算
undefinedset_budget_amount
set_budget_amountset_budget_amount
set_budget_amountCreate or modify budget amounts.
python
undefined创建或修改预算金额。
python
undefinedSet 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
undefinedset_budget_amount(
amount=2000.00,
category_group_id="grp_housing",
start_date="2024-02-01",
apply_to_future=False
)
**示例提示:**从2月开始,将我的餐饮预算设置为每月500美元
undefinedCategory Management
分类管理
get_categories
get_categoriesget_categories
get_categoriesList 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
**示例提示:**列出我所有的交易分类
undefinedget_category_groups
get_category_groupsget_category_groups
get_category_groupsView 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_categoryset_transaction_category
set_transaction_categoryAssign 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_transactionsbulk_categorize_transactions
bulk_categorize_transactionsApply 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_3Transaction Review Workflow
交易审核流程
get_transactions_needing_review
get_transactions_needing_reviewget_transactions_needing_review
get_transactions_needing_reviewFind transactions requiring attention.
python
undefined查找需要关注的交易记录。
python
undefinedAll 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
undefinedget_transactions_needing_review(
needs_review=True,
days=30
)
**示例提示:**展示我最近30天所有未分类的交易记录
undefinedupdate_transaction_notes
update_transaction_notesupdate_transaction_notes
update_transaction_notesAdd 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_reviewedmark_transaction_reviewed
mark_transaction_reviewedClear 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_tagsget_tags
get_tagsList 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_tagsset_transaction_tags
set_transaction_tagsApply 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_tagcreate_tag
create_tagCreate 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_transactionssearch_transactions
search_transactionsComprehensive 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_detailsget_transaction_details
get_transaction_detailsRetrieve 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_transactiondelete_transaction
delete_transactionRemove a transaction.
python
delete_transaction(transaction_id="txn_789")Example prompt:
Delete transaction txn_789删除交易记录。
python
delete_transaction(transaction_id="txn_789")示例提示:
删除交易txn_789get_recurring_transactions
get_recurring_transactionsget_recurring_transactions
get_recurring_transactionsView 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_rulesget_transaction_rules
get_transaction_rulesList 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_rulecreate_transaction_rule
create_transaction_ruleCreate 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
undefinedcreate_transaction_rule(
merchant_criteria_operator="contains",
merchant_criteria_value="Gas",
set_category_id="cat_transportation",
amount_operator="greater_than",
amount_value=20.00
)
**示例提示:**创建规则,将所有Spotify交易记录自动分类为订阅
undefinedupdate_transaction_rule
update_transaction_ruleupdate_transaction_rule
update_transaction_ruleModify 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_ruledelete_transaction_rule
delete_transaction_ruleRemove 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_456Transaction Splits
交易拆分
get_transaction_splits
get_transaction_splitsget_transaction_splits
get_transaction_splitsView 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_transactionsplit_transaction
split_transactionDivide 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_cashflowget_cashflow
get_cashflowAnalyze 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_worthget_net_worth
get_net_worthTrack net worth with daily snapshots and trends.
python
undefined跟踪净值变化,包含每日快照和趋势。
python
undefinedAll 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
undefinedget_net_worth(
start_date="2024-01-01",
end_date="2024-12-31",
account_type="investment"
)
**示例提示:**展示我2024年的净值趋势
undefinedget_account_balance_history
get_account_balance_historyget_account_balance_history
get_account_balance_historyView 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_typeget_net_worth_by_account_type
get_net_worth_by_account_typeNet 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_summaryget_transactions_summary
get_transactions_summaryQuick 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_summaryget_spending_summary
get_spending_summarySpending 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
undefinedpython
undefined1. 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
)
undefinedset_budget_amount(
amount=600.00,
category_id="cat_groceries",
start_date="2024-02-01",
apply_to_future=True
)
undefinedTransaction Cleanup Workflow
交易记录清理流程
python
undefinedpython
undefined1. 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")
undefinedmark_transaction_reviewed(transaction_id="txn_4")
undefinedAuto-Categorization Setup
自动分类设置
python
undefinedpython
undefined1. 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()
undefinedrules = get_transaction_rules()
undefinedInvestment Portfolio Review
投资组合审核
python
undefinedpython
undefined1. 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"
)
undefinednet_worth = get_net_worth(
start_date="2023-01-01",
end_date="2024-12-31",
account_type="investment"
)
undefinedExpense Tracking with Tags
标签化费用跟踪
python
undefinedpython
undefined1. 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"
)
undefinedreimbursable = search_transactions(
tag_ids=["tag_reimbursable"],
start_date="2024-01-01",
end_date="2024-01-31"
)
undefinedAuthentication
认证
Check Authentication Status
检查认证状态
python
check_auth_status()Example prompt:
Check if I'm authenticated with Monarch Moneypython
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:
- Run from the terminal
python login_setup.py - Enter credentials and 2FA code if prompted
- Restart Claude Desktop or Claude Code
- Verify session file exists in
~/.monarch/session.pickle
问题: "会话未找到"或认证错误
解决方案:
- 在终端运行
python login_setup.py - 按提示输入凭据和2FA验证码
- 重启Claude Desktop或Claude Code
- 验证会话文件是否存在于
~/.monarch/session.pickle
Missing Transactions
交易记录缺失
Problem: Transactions don't appear or are outdated
Solution:
python
undefined问题: 交易记录未显示或已过时
解决方案:
python
undefinedForce a refresh from financial institutions
强制从金融机构刷新数据
refresh_accounts()
refresh_accounts()
Wait a few minutes, then check again
等待几分钟后再次查看
get_transactions(limit=50)
undefinedget_transactions(limit=50)
undefinedTool Not Found
工具未找到
Problem: MCP server not showing in Claude
Solution:
- Verify configuration file path (macOS: )
~/Library/Application Support/Claude/claude_desktop_config.json - Check absolute paths in config - no or relative paths
~ - Restart Claude Desktop completely (quit and reopen)
- Check Claude Desktop logs for errors
问题: MCP服务器未在Claude中显示
解决方案:
- 验证配置文件路径(macOS:)
~/Library/Application Support/Claude/claude_desktop_config.json - 检查配置中的绝对路径 - 不要使用或相对路径
~ - 完全重启Claude Desktop(退出并重新打开)
- 查看Claude Desktop日志中的错误信息
Performance with Large Result Sets
大数据集性能问题
Problem: Timeouts or slow responses with many transactions
Solution:
python
undefined问题: 大量交易记录导致超时或响应缓慢
解决方案:
python
undefinedUse 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"
)
undefinedsearch_transactions(
search="Amazon",
start_date="2024-01-01",
end_date="2024-01-31"
)
undefinedSplit Transaction Issues
交易拆分问题
Problem: Split amounts don't sum to original transaction
Solution:
python
undefined问题: 拆分金额总和与原交易记录不符
解决方案:
python
undefinedEnsure 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 ✓
undefinedundefinedBudget Not Updating
预算未更新
Problem: Budget changes not reflected
Solution:
python
undefined问题: 预算更改未生效
解决方案:
python
undefinedEnsure 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
)
undefinedset_budget_amount(
amount=500.00,
category_id="cat_dining",
start_date="2024-02-01",
apply_to_future=True # 应用于当前及未来月份
)
undefinedEnvironment 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