Money Lover MCP Server
Money Lover MCP 服务器
这是一个 Node.js 实现的模型上下文协议 (MCP) 服务器,封装了非官方的 Money Lover REST API。该服务器公开了 27 个 MCP 工具,涵盖身份验证、钱包、分类、交易、事件、债务和静态配置,使 AI 助手或兼容 MCP 的客户端能够查询和管理个人财务数据。
功能特性
通过
EMAIL/PASSWORD环境变量自动进行身份验证 — 大多数工具无需传递令牌。23 个读取工具,涵盖用户信息、钱包、分类、交易、事件、债务、图标、提供商和静态配置。
4 个写入工具:创建、更新和删除交易、钱包和分类。
大响应自动截断,以保持 LLM 上下文可控(可通过
limit参数配置)。基于 Stdio 的服务器,兼容 Claude Code、Claude Desktop、Cursor 以及任何 MCP 主机。
每个邮箱的令牌缓存位于
~/.moneylover-mcp/下,并在身份验证错误时自动刷新。
Related MCP server: Money Lover MCP Server
前置要求
Node.js 22 或更高版本。
Money Lover 账户凭据。
安装
npm install使用
通过 stdio 启动 MCP 服务器:
npm start项目级配置 (Claude Code)
在项目根目录添加 .mcp.json:
{
"mcpServers": {
"mcp-moneylover": {
"command": "node",
"args": ["/absolute/path/to/moneylover-mcp/src/server.js"],
"env": {
"EMAIL": "your@email.com",
"PASSWORD": "your-password"
}
}
}
}并在 .claude/settings.json 中启用它:
{ "enabledMcpjsonServers": ["mcp-moneylover"] }全局配置 (Claude Desktop / Cursor)
{
"mcpServers": {
"mcp-moneylover": {
"command": "npx",
"args": ["@ferdhika31/moneylover-mcp@latest"],
"env": {
"EMAIL": "your@email.com",
"PASSWORD": "your-password"
}
}
}
}可用工具
身份验证 (Auth)
工具 | 描述 | 参数 |
| 获取 JWT 令牌。 |
|
用户 (User)
工具 | 描述 | 参数 |
| 与会话关联的个人资料。 | — |
| 设备和活动会话。 | — |
| 扩展的个人资料数据。 | — |
钱包 (Wallets)
工具 | 描述 | 参数 |
| 列出所有钱包。 | — |
| 钱包余额摘要。 |
|
| 与其他用户共享的钱包。 | — |
| 待处理的共享邀请。 | — |
| 创建新钱包。 |
|
| 更新钱包名称、图标或货币。 |
|
| 永久删除钱包。 |
|
分类 (Categories)
工具 | 描述 | 参数 |
| 特定钱包的分类。 |
|
| 所有钱包中的所有分类。 | 可选 |
| 在钱包中创建分类。 |
|
| 重命名分类或更改其图标。 |
|
| 删除分类。 |
|
交易 (Transactions)
工具 | 描述 | 参数 |
| 日期范围内的交易。 |
|
| 创建交易。来自 |
|
| 更新交易。API 要求每次编辑都提供完整载荷 — 如果需要当前值,请先获取交易。 |
|
| 删除交易。 |
|
| 带有可选过滤器的自由格式搜索。 | 可选 |
| 标记为债务/贷款的交易。 | — |
| 按 ID 列表关联的交易。 |
|
| 按分类关联的交易。 |
|
| 按钱包关联的交易。 |
|
| 可用的搜索过滤选项。 | 可选 |
静态与配置 (Static & Config)
工具 | 描述 | 参数 |
| 钱包的储蓄目标/事件。 |
|
| 钱包中的未结债务。 |
|
| 图标包元数据。 | 可选 |
| 支持的银行提供商。 | — |
| 货币目录。 | 可选 |
| 基于美元的汇率快照。 | — |
| 其他运行时配置。 | — |
工具使用示例
每个工具的提示示例、必需与可选字段、注意事项以及常见的步骤模式:docs/examples.md。
库使用
import { MoneyloverClient } from './src/moneyloverClient.js';
const token = await MoneyloverClient.getToken(email, password);
const client = new MoneyloverClient(token);
const wallets = await client.getWallets();
const txns = await client.getTransactions(walletId, '2026-01-01', '2026-04-30');
await client.addTransaction({ walletId, categoryId, amount: '50000', date: '2026-04-18' });
await client.editTransaction('txn-id', { amount: '60000', note: 'updated' });
await client.deleteTransaction('txn-id');测试
单元测试
模拟单元测试 — 无需实时 API 调用:
npm test集成测试 (mcp-tester)
mcp-tester 是一个基于 ReAct 代理的 MCP 测试框架。它启动服务器,驱动 LLM 根据自然语言提示调用工具,并断言调用了正确的工具且参数正确。
安装
pipx install --index-url https://pypi.artifacts.furycloud.io/simple/ mcp-tester配置
tests/mcp-tester/mcps.json — 使用您的凭据指向本地服务器:
{
"mcp-moneylover": {
"command": "node",
"args": ["/absolute/path/to/src/server.js"],
"transport": "stdio",
"env": {
"EMAIL": "your@email.com",
"PASSWORD": "your-password"
}
}
}运行
mcp-tester run-tests \
--mcps tests/mcp-tester/mcps.json \
--model gpt-4o-mini \
--concurrent-runs 3 \
tests/mcp-tester/read-tools.yaml结果
tests/mcp-tester/read-tools.yaml 包含 25 个集成测试,涵盖了每个读取工具:
total 25, success 25, failures 0使测试稳定的关键决策:
读取工具上没有令牌参数 — 公开可选的
token字段会导致 LLM 将钱包 ID 注入其中。服务器通过环境变量自动进行身份验证。响应截断 — 多个端点会从共享的 MoneyLover 数据库返回数十万条记录。工具接受
limit参数(默认:20–100)以保持 LLM 上下文可控。字典包装 — 所有工具响应都返回一个 JSON 对象(从不返回纯数组),以便通过 MCP 框架验证。
写入工具测试 (mcp-tester)
另外三个 YAML 文件测试了钱包、分类和交易在三个连续阶段的完整 CRUD 生命周期。每个阶段同时运行所有三种资源类型。
文件 | 阶段 | 测试 |
| 创建 |
|
| 编辑 |
|
| 删除 |
|
按顺序运行阶段 — 每个阶段都依赖于前一个阶段:
# Phase 1: Create
mcp-tester run-tests --mcps tests/mcp-tester/mcps.json --model gpt-4o-mini --concurrent-runs 3 tests/mcp-tester/write-create.yaml
# Phase 2: Edit (after Phase 1 passes)
mcp-tester run-tests --mcps tests/mcp-tester/mcps.json --model gpt-4o-mini --concurrent-runs 3 tests/mcp-tester/write-edit.yaml
# Phase 3: Delete (after Phase 2 passes)
mcp-tester run-tests --mcps tests/mcp-tester/mcps.json --model gpt-4o-mini --concurrent-runs 3 tests/mcp-tester/write-delete.yaml所有三个阶段的结果:
Phase 1 (Create): total 3, success 3, failures 0
Phase 2 (Edit): total 3, success 3, failures 0
Phase 3 (Delete): total 3, success 3, failures 0写入工具测试的关键设计决策:
变异前的发现 — 编辑和删除测试指示代理首先调用读取工具(
get_wallets,get_categories,get_transactions)以按名称定位目标,然后调用变异工具。这反映了代理在不知道 ID 的情况下在现实世界中的行为。写入工具断言的
args: !any— 该框架要求精确的参数匹配。写入工具接受代理可能自行包含的可选字段(icon,with等);!any验证工具被调用并成功,而不会因无害的额外内容而失败。读取工具断言可以使用精确的参数匹配,因为它们的模式中没有 LLM 会自发添加的可选字段。可预测的标识符 — 测试资源使用固定名称(
MCP-Test-Wallet,MCP-Test-Category)和固定备注(MCP test transaction),以便代理可以在编辑和删除阶段按名称定位它们,而无需在测试运行之间共享状态。完整载荷编辑断言 —
edit_transaction是一个完全替换操作;测试提示指示代理首先获取现有交易(get_transactions)并携带所有当前字段值,仅更改备注。这验证了工具描述所需的多步推理。
安全说明
切勿提交真实的凭据或令牌。
缓存的令牌位于
~/.moneylover-mcp/中,仅限当前用户访问。删除该目录以撤销所有缓存的会话。
Available Tools
33 toolsadd_categoryAdd CategoryC
Create a new transaction category in a wallet.
Inputs: walletId (required), name (required), icon (required), type (required).
add_transactionAdd TransactionC
Create a new transaction in a wallet.
Inputs: walletId (required), categoryId (required), amount (required), date (required), +2 more.
add_walletAdd WalletC
Create a new Money Lover wallet.
Inputs: name (required), currencyId (required), icon.
delete_categoryDelete CategoryC
Permanently delete a category.
Inputs: categoryId (required).
delete_transactionDelete TransactionC
Permanently delete a transaction by its identifier.
Inputs: transactionId (required).
delete_walletDelete WalletC
Permanently delete a wallet and all its data.
Inputs: walletId (required).
edit_categoryEdit CategoryC
Rename a category or update its icon.
Inputs: categoryId (required), icon (required), name.
edit_transactionEdit TransactionA
Update an existing transaction. The API requires the full transaction payload on every edit, so you must supply walletId, categoryId, amount, and date (fetch the transaction with get_transactions first if you need the current values). categoryId should be the global category ID from get_all_categories or from an existing transaction response.
Inputs: transactionId (required), walletId (required), categoryId (required), amount (required), +3 more.
edit_walletEdit WalletC
Update a wallet name, icon, or currency.
Inputs: walletId (required), currencyId (required), name, icon.
get_all_categoriesGet All CategoriesA
List ALL categories across ALL wallets with no wallet filter. Use this instead of get_categories when no specific wallet is provided.
Inputs: limit.
get_categoriesGet CategoriesB
Retrieve categories for a specific wallet.
Inputs: walletId (required). Returns: categories
get_currenciesGet CurrenciesA
List all currencies supported by Money Lover (names, symbols, codes). Use this for currency metadata, not exchange rates.
Inputs: limit.
get_debtsGet DebtsB
List open debts or loans tracked in a specific wallet.
Inputs: walletId (required).
get_debt_transactionsGet Debt TransactionsB
List transactions flagged as debts or loans across the account.
Inputs: no named parameters.
get_eventsGet EventsC
List Money Lover events (savings goals, campaigns) associated with a wallet.
Inputs: walletId (required), limit.
get_exchange_ratesGet Exchange RatesB
Fetch the USD-based exchange rate snapshot used by Money Lover.
Inputs: no named parameters.
get_iconsGet IconsC
Fetch the icon pack used by Money Lover categories, wallets, and events.
Inputs: pack.
get_linked_providersGet Linked ProvidersA
List financial institution providers supported for linked accounts.
Inputs: no named parameters.
get_other_configGet Other ConfigB
Retrieve the small static configuration blob served under /other/config.
Inputs: no named parameters.
get_transactionsGet TransactionsC
Fetch transactions for a wallet between two dates.
Inputs: walletId (required), startDate (required), endDate (required).
get_transaction_search_configGet Transaction Search ConfigA
Return the saved configuration options (labels, with-parties, saved filters) available for use with the search_transactions tool.
Inputs: limit.
get_user_accountGet User AccountB
List devices and sessions tied to the Money Lover account.
Inputs: no named parameters.
get_user_infoGet User InfoB
Retrieve the Money Lover user profile associated with the provided token.
Inputs: no named parameters.
get_user_profileGet User ProfileB
Retrieve extended profile information for the current user.
Inputs: no named parameters.
get_wallet_balanceGet Wallet BalanceB
Fetch the current balance summary for a specific wallet.
Inputs: walletId (required).
get_walletsGet WalletsA
List all wallets accessible to the authenticated user.
Inputs: no named parameters. Returns: wallets
loginLogin to Money LoverA
Authenticate using Money Lover credentials to retrieve a JWT token.
Inputs: email (required), password (required). Returns: token
search_transactionsSearch TransactionsA
Free-form search across transactions using optional filters (walletId, categoryId, keyword, parties). Use this when no date range is given or when doing a keyword/label search instead of a date-range fetch.
Inputs: filters, limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 33 tools
Most tools have distinct purposes with clear resource-action pairs, but some overlap exists: get_user_account, get_user_info, and get_user_profile could be confused, and get_related_transactions, get_related_transactions_by_category, and get_related_transactions_by_wallet have subtle distinctions that might cause misselection without careful reading of descriptions.
Tool names follow a highly consistent verb_noun pattern throughout, with clear action prefixes (add_, delete_, edit_, get_, login, search_) and descriptive nouns. There are no deviations in style or convention, making the set predictable and readable.
With 33 tools, the count feels heavy for a personal finance server, bordering on excessive. While it covers many features, it may overwhelm agents and could likely be streamlined without losing core functionality, placing it in the borderline range for appropriateness.
The tool surface provides comprehensive coverage for the Money Lover domain, including full CRUD operations for wallets, categories, and transactions, along with extensive querying, user management, and auxiliary features like debts, events, and search. No obvious gaps exist that would hinder agent workflows.
Maintenance
Related MCP Connectors
Personal finance for AI agents: accounts, budgets, goals, 9-strategy debt payoff, reports. OAuth 2.1
Log, query, and edit expenses, budgets, and accounts in Manilo (formerly Ledgy) from any MCP-compatible AI assistant.
Personal wealth planning and forecasting. 53 read/write tools: accounts, goals, plans and forecasts.
Track expenses, budgets, balances, transfers, and multi-currency reports with OAuth-secured tools.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with YNAB budgets through natural language. Supports managing accounts, categories, transactions, and budget months with 21 tools for comprehensive budget operations.-
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Money Lover personal finance app through unofficial REST API. Supports authentication, wallet management, transaction querying, and creating new transactions for expense tracking.69 npm7ISC
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants and MCP clients to interact with personal finance data for transaction management, budgeting, recurring expenses, accounts, categories, tags, crypto, and balance history via LunchMoney's API.41 npm-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants and MCP clients to access and manage personal finance data through LunchMoney’s API, including transactions, categories, tags, budgets, recurring items, accounts, crypto, and balance history. It supports full CRUD, filtering, bulk operations, attachments, and token-efficient responses for automated financial insights.41 npm-