Copilot Money MCP
Copilot Money MCP 服务器
使用本地 Copilot Money 数据,通过 AI 查询和管理您的个人财务
免责声明
这是一个独立的、社区驱动的项目,与 Copilot Money 或其母公司没有任何关联、认可或联系。 此工具由独立开发者创建,旨在实现对本地缓存数据的 AI 驱动查询。“Copilot Money”是其各自所有者的商标。
Related MCP server: LunchMoney MCP Server
概述
一个 MCP 服务器,让 AI 助手能够访问您的 Copilot Money 个人财务数据。它从您 Mac 上本地缓存的 Firestore 数据库(LevelDB + Protocol Buffers)中读取数据。读取过程 100% 本地化,零网络请求。
涵盖支出、投资、预算、目标等方面的 17 个读取工具 — 可查询交易、账户、持仓、余额、类别、定期扣款、预算、目标和投资表现。
隐私至上
我们从不收集、存储或将您的数据传输到本项目运营的任何服务器 — 我们根本没有服务器。详情请参阅我们的 隐私政策。
无任何形式的分析、遥测或跟踪
读取过程完全本地化 — 零网络请求
开源 — 您可以自行验证代码
[!IMPORTANT] 关于 AI 提供商的提示。 虽然此服务器本身在本地运行,且从不将您的数据发送到本项目运营的任何服务器,但 您连接的 AI 助手(Claude、ChatGPT、Gemini 等)将看到您的 Copilot Money 数据,作为回答您问题的一部分。这意味着您的财务数据将被传输并由您选择的模型提供商(Anthropic、OpenAI、Google 或其他第三方)处理,并受该提供商自身的隐私政策和数据保留条款约束。
通过将此 MCP 服务器与托管的 AI 模型一起使用,您即知情地与该 AI 提供商共享您的财务数据。 仅在您能接受此权衡的情况下使用此工具。如果您不能接受,请考虑等待官方的 Copilot Money 集成或使用完全本地化的模型。
快速入门
先决条件
Node.js 18+(Claude Desktop 已捆绑)
Copilot Money(macOS App Store 版本)
Claude Desktop、Cursor 或任何兼容 MCP 的客户端
通过 Claude Desktop 安装
从 Releases 下载最新的
.mcpb捆绑包双击
.mcpb文件以安装到 Claude Desktop重启 Claude Desktop
开始询问有关您财务的问题!
通过 npm 安装
npm install -g copilot-money-mcp然后添加到您的 Claude Desktop 配置中(~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"copilot-money": {
"command": "copilot-money-mcp"
}
}
}为 Cursor 安装
全局安装该包:
npm install -g copilot-money-mcp打开 Cursor 设置(
Cmd + ,)> Features > MCP Servers添加服务器配置:
{
"mcpServers": {
"copilot-money": {
"command": "copilot-money-mcp"
}
}
}您可以做什么
支出分析
“我上个月在外出就餐上花了多少钱?”
“显示我过去 30 天内所有的 Amazon 消费记录”
“今年我支出最高的前 5 个类别是什么?”
使用 get_transactions、get_categories,支持日期范围、文本搜索和类别筛选。
账户概览
“我所有账户的净资产是多少?”
“显示我过去 6 个月支票账户的每月余额”
“哪些银行连接需要注意?”
使用 get_accounts、get_balance_history、get_connection_status。
投资组合
“我目前的持仓和总回报是多少?”
“显示 AAPL 过去一年的价格历史”
“本季度我的时间加权回报率是多少?”
使用 get_holdings、get_investment_prices、get_securities、get_investment_performance、get_twr_returns。
预算与目标
“我这个月的预算执行情况如何?”
“我的应急基金进展如何?”
“显示我过去 6 个月的目标历史”
使用 get_budgets、get_goals、get_goal_history。
订阅与定期扣款
“我正在支付哪些订阅费用?”
“我每月在定期扣款上花费多少钱?”
使用 get_recurring_transactions。
可用工具
读取工具 (17)
工具 | 描述 |
| 查询交易记录,支持筛选 — 日期范围、类别、商户、金额、账户、地点、文本搜索以及特殊类型(外币、退款、重复、HSA 合格)。 |
| 列出所有账户及其余额,支持按类型(支票、储蓄、信用卡、投资)筛选。包含净资产计算。 |
| 列出类别及其交易计数和支出总额。支持列表、树状和搜索视图。 |
| 识别订阅和定期扣款,包含频率、成本和预计下次扣款日期。 |
| 获取预算,包含支出与限额的对比。 |
| 获取财务目标,包含目标金额、进度和每月供款。 |
| 目标的每月进度快照,包含每日数据和供款记录。 |
| 账户随时间的每日余额快照。支持按日、周或月粒度。 |
| 当前投资持仓,包含代码、数量、价格、成本基础和总回报。 |
| 股票、ETF、共同基金和加密货币的历史价格数据(每日 + 高频)。 |
| 股票拆分历史,包含比例、日期和乘数。 |
| 每个证券的投资表现数据。 |
| 投资持仓的月度时间加权回报率 (TWR) 数据。 |
| 证券主数据 — 代码、名称、类型、价格和标识符 (ISIN/CUSIP)。 |
| 关联机构的银行同步健康状况,包括上次同步时间戳和错误信息。 |
| 本地缓存元数据 — 日期范围、交易计数、缓存时长。 |
| 从磁盘重新加载数据。缓存每 5 分钟自动刷新一次。 |
配置
缓存 TTL
服务器在内存中缓存数据 5 分钟。可通过环境变量配置:
# Set cache TTL to 10 minutes
COPILOT_CACHE_TTL_MINUTES=10 copilot-money-mcp
# Disable caching (always reload from disk)
COPILOT_CACHE_TTL_MINUTES=0 copilot-money-mcp您也可以使用 refresh_database 工具手动刷新。
解码超时
对于大型数据库(500MB+),请增加解码超时时间(默认:90 秒):
# Via environment variable
DECODE_TIMEOUT_MS=600000 copilot-money-mcp
# Via CLI flag
copilot-money-mcp --timeout 600000对于超过 1GB 的数据库,还需增加 Node.js 内存:
{
"mcpServers": {
"copilot-money": {
"command": "node",
"args": [
"--max-old-space-size=4096",
"/path/to/copilot-money-mcp/dist/cli.js",
"--timeout", "600000"
]
}
}
}支持的日期周期
period 参数支持以下快捷方式:
this_month last_month last_7_days last_30_days last_90_days ytd this_year last_year
已知限制
本地缓存依赖
此服务器从 Copilot Money 的 本地 Firestore 缓存 读取数据,而非云端。Firestore 的离线持久化会缓存应用获取过的每一个文档,因此本地数据库通常包含您在应用中查看过的所有交易、账户、预算、目标和其他数据。默认的 Firestore 缓存大小为 100 MB(足以容纳数万条交易),只有在超过该限制时,旧文档才会通过 LRU 垃圾回收机制被清除。
为了最大化缓存数据: 打开 Copilot Money 应用并浏览您的数据(交易历史、账户、预算),以确保它们已被获取并缓存在本地。
故障排除
找不到数据库
如果您看到“Database not available”:
确保已安装 Copilot Money 并已同步数据
检查数据库位置:
~/Library/Containers/com.copilot.production/Data/Library/Application Support/firestore/__FIRAPP_DEFAULT/copilot-production-22904/main验证目录下是否存在
.ldb文件提供自定义路径:
copilot-money-mcp --db-path /path/to/database
解码工作进程超时
如果您看到“Decode worker timed out”:
增加超时时间:
copilot-money-mcp --timeout 300000(5 分钟)对于 1GB+ 的数据库,还需增加 Node.js 内存:
node --max-old-space-size=4096 dist/cli.js --timeout 300000
未找到交易记录
打开 Copilot Money 应用并等待同步
数据库结构可能已更改 — 提交 issue
贡献
请参阅 CONTRIBUTING.md 了解开发设置、架构以及如何添加新工具。
许可证
MIT 许可证 - 详情请参阅 LICENSE。
致谢
Available Tools
14 toolsget_accountsARead-only
Get all accounts with balances, plus summary fields: total_balance (net worth = assets minus liabilities), total_assets, and total_liabilities. Optionally filter by account type (checking, savings, credit, investment). Checks both account_type and subtype fields for better filtering (e.g., finds checking accounts even when account_type is 'depository'). By default, hidden accounts are excluded. name is your Copilot nickname when set, else the provider label — it is user-editable, so key on account_id, never on name. Default rows are terse: account_id, name, account_type, subtype, current_balance, institution_name, iso_currency_code, item_id, plus user_hidden / user_deleted when set (the flags include_hidden controls). That drops the other ~35 document fields. PARTIAL list of what goes, not exhaustive: the embedded holdings array (get_holdings covers it), institution logo images plus their logo_content_type (base64-encoded, several KB each — this PAIR is where the removed include_logos flag went, and the flag gated both, so request them together), mask (the last-4 digits humans identify an account by), available_balance, limit, institution_id, creation_timestamp (when the account was created in Copilot, YYYY-MM-DD — written only on newer rows, so absent means unknown, not old), the denormalized official_name / original_* name dupes, and user_id. Any document field is requestable by name: fields: ["default", "mask", "available_balance"], or "all" / "*" for full rows. include_logos was removed in v3.0.0 — passing it now raises an error naming this migration.
Inputs: fields, account_type, include_hidden.
get_balance_historyARead-only
Get daily balance snapshots for accounts over time. Each entry returns current_balance, available_balance, limit, account_id, and account_name. The response also includes an accounts array listing the distinct account IDs in the paginated page. Requires a granularity parameter (daily, weekly, monthly) to control response size. Weekly and monthly modes downsample by keeping the last data point per period. Filter by account_id and date range.
Inputs: granularity (required), limit, offset, end_date, +2 more.
get_budgetsARead-only
Get budgets from Copilot's native budget tracking. Returns the current-month effective budget per category plus the full amounts map of per-month overrides for history lookups. For parent categories, the returned amount is the resolved total (children + rollovers) that Copilot displays in the Budgets view. Totals use the current-month effective amount.
Inputs: active_only.
get_cache_infoARead-only
Get information about the local data cache, including the date range of cached transactions and total count. Useful for understanding data availability before running historical queries. This tool reads from a local cache that may not contain your complete transaction history. Also reports decode_health: per-collection counts of documents dropped on schema validation failure (a "degraded" status means some cached documents are missing from results).
Inputs: no named parameters.
get_categoriesARead-only
Unified category retrieval tool. Supports multiple views: list (default) - user categories with transaction counts/amounts for a time period; tree - user categories as hierarchical tree; search - search user categories by keyword. Use parent_id to get subcategories. For list view, use period (e.g., "this_month") or start_date/end_date to filter by date. Includes all categories, even those with $0 spent (matching UI behavior).
Inputs: view, query, period, end_date, +2 more.
get_connection_statusARead-only
Get connection status for all linked financial institutions. Shows per-institution sync health including last successful update timestamps for transactions and investments, login requirements, and error states. Use this to check when accounts were last synced or to identify connections needing attention. Also reports decode_health: per-collection counts of cached documents dropped on schema validation failure (a "degraded" status means some documents are missing from results). Also reports scheduled_smoke: the last scheduled API-drift check with timestamp, or null if the weekly job is not installed. Only "fail" means the API drifted; "auth-missing" and "incomplete" mean drift is unknown.
Inputs: no named parameters.
get_goal_historyARead-only
Get monthly progress snapshots for financial goals. Returns current_amount, target_amount, daily data points, and contribution records per month. Filter by goal_id or month range (YYYY-MM). Cache-only: no live-mode (--live-reads) counterpart exists because Copilot's GraphQL endpoint does not expose goal data, so this tool always returns cached LevelDB data regardless of the --live-reads flag.
Inputs: limit, offset, goal_id, end_month, +1 more.
get_goalsARead-only
Get financial goals from Copilot's native goal tracking. Retrieves user-defined savings goals, debt payoff targets, and investment goals. Returns goal details including target amounts, monthly contributions, status (active/paused), start dates, and tracking configuration. Calculates total target amount across all goals. Cache-only: no live-mode (--live-reads) counterpart exists because Copilot's GraphQL endpoint does not expose goal data, so this tool always returns cached LevelDB data regardless of the --live-reads flag.
Inputs: active_only.
get_holdingsARead-only
Get current investment holdings with position-level detail. Returns ticker, name, quantity, current price, equity value, average cost, and total return per holding. Joins data from account holdings, securities, and optionally historical snapshots. Filter by account or ticker symbol. Note: cost_basis may be unavailable for cash-equivalent positions. Positions on hidden and merged accounts are EXCLUDED by default, matching get_accounts — pass include_hidden: true for them. Do NOT sum holdings as portfolio value: unvested stock-plan shares are reported as holdings, so the sum can far exceed the investment balance; with --live-reads use get_investment_balance_live for the total.
Inputs: limit, offset, account_id, ticker_symbol, +2 more.
get_investment_pricesARead-only
Get investment price history for portfolio tracking. Returns one row per (security, period) for stocks, ETFs, mutual funds, and crypto. Filter by ticker symbol, date range, or price type (daily/hf). By default each row is TERSE: the security, the period, and its latest price (latest_price / latest_at) — enough to answer "what is this worth". The full price series (prices, an epoch-millis map) is most of a full row and roughly quadruples response size, so it is omitted unless requested via fields; ask for it only when you need the time series itself, not a current value.
Inputs: limit, fields, offset, end_date, +3 more.
get_investment_splitsARead-only
Get stock split events from the local Firestore cache. Returns one row per (security, effective_date) with the adjustment multiplier (e.g. 0.1 for a 10-for-1 split — multiply pre-split prices/quantities by this value to convert to the post-split equivalent). Joined with the securities collection so each row includes ticker and name. IMPORTANT: prices returned by get_investment_prices and get_investment_prices_live are ALREADY split-adjusted by Copilot. Use this tool only when you need the split events themselves (e.g., for narrative or historical-analysis purposes) — you do NOT need to apply these multipliers to the prices yourself. Securities that have never split are not included in the output. Coverage is limited to securities Copilot currently syncs in your local cache (typically currently-held or recently-held).
Inputs: limit, offset, end_date, start_date, +1 more.
get_recurring_transactionsARead-only
Identify recurring/subscription charges. Combines two data sources: (1) Pattern analysis - finds transactions from same merchant with similar amounts, returns estimated frequency, confidence score, and next expected date. (2) Copilot's native subscription tracking - returns user-confirmed subscriptions stored in the app. Both sources are included by default for comprehensive coverage. Rows in the pattern-analysis recurring array are terse by default: merchant, normalized_merchant, occurrences, average_amount, total_amount, frequency, confidence, category_name, last_date, next_expected_date. That excludes the matched transactions array (already reachable via get_transactions) and confidence_reason (prose explaining the score) — see fields for how to get either back.
Inputs: name, fields, period, end_date, +4 more.
get_transactionsARead-only
Reads from the local LevelDB cache, which may lag behind Copilot's server if the macOS app hasn't synced recently. For real-time data use --live-reads with get_transactions_live. Unified transaction retrieval tool. Supports multiple modes: (1) Filter-based: Use period, date range, category, merchant, amount filters. (2) Single lookup: Provide transaction_id to get one transaction. (3) Text search: Use query for free-text merchant search. (4) Special types: Use transaction_type for foreign, refunds, credits, duplicates, hsa_eligible, tagged. (5) Location-based: Use city or lat/lon with radius_km. (6) Tag filter: Use tag to find transactions with a specific tag. Rows are TERSE by default: transaction_id, date, amount, name, category_name, account_id, item_id, pending, excluded, internal_transfer. excluded answers "is this row excluded from spending?" — the raw per-transaction flag OR the row's category being user-excluded, the same union exclude_excluded filters on — so it is true for a row Copilot never stamped individually. It is therefore nearly always false in a default response, since exclude_excluded already removed those rows; it carries information only when you pass exclude_excluded: false. A cache row carries ~30 fields and most callers need a handful, so the rest are excluded unless asked for. PARTIAL list of what that drops, not exhaustive: Plaid metadata (plaid_category_id, plaid_category_strings, plaid_deleted), internal IDs (category_id, recurring_id, goal_id, parent_transaction_id, children_transaction_ids, user_id), enrichment and intelligence fields (normalized_merchant — still the normalized merchant name when requested — intelligence_suggested_category_ids, suggestion_ids, original_name), tag_ids, review state (user_reviewed, user_note, user_changed_type — true only when a human re-typed the row, so do not second-guess its type), location (city, region, country, lat/lon), and flags like is_amazon/from_investment. amazon is worth naming because nothing else hints it exists: on rows Copilot matched to an Amazon order it carries the receipt — {order_id, items: [{id, name, link, price, quantity}], other: {giftWrapping, rewards, savings, shipping, tax}} — so fields: ["default", "amazon"] answers "what was in this order" without an exported CSV. Ask for any of them by name with fields: ["default", "tag_ids"], or take the whole document with fields: ["all"] (or "*"). category_name is always resolved to a human-readable name. compact was removed in v3.0.0 — passing it now raises an error naming this migration.
Inputs: lat, lon, tag, city, +22 more.
refresh_databaseARead-only
Refresh the in-memory cache by reloading data from the local Copilot Money database. Use this when the user has recently synced new transactions in the Copilot Money app, or when you suspect the cached data is stale. The cache also auto-refreshes every 5 minutes. Returns the updated cache info after refresh.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Each tool targets a distinct resource (transactions, accounts, holdings, budgets, goals, categories, splits, connection/cache status), and the descriptions steer callers correctly for the closest pairs (get_goals vs get_goal_history, get_accounts vs get_balance_history, get_cache_info vs get_connection_status). The main ambiguity comes from get_transactions being a six-mode mega-tool and from multiple tools referencing absent `_live` counterparts (get_transactions_live, get_investment_prices_live, get_investment_balance_live), which an agent cannot call.
All tools use snake_case with a get_<resource> pattern, and the single exception (refresh_database) still follows the verb_noun convention. Resource names are predictable and parallel across domains (get_goals/get_goal_history, get_holdings/get_investment_prices).
14 tools is well within the sweet spot for a personal-finance server covering transactions, accounts, investments, budgets, goals, and cache management. Each tool maps to a real domain object and none look redundant or padding.
Read coverage is thorough across every major domain: accounts, transactions (with search/filter/location/tag modes), balance history, budgets, categories, goals plus goal history, holdings, prices, splits, recurring charges, and cache/connection health. The gap is the absence of any mutation tools (edit transaction category, adjust budget/goal, create tags), so agents can analyze but not change anything.
Maintenance
Related MCP Connectors
Personal finance for AI agents — onboard, import statements, categorize & budget over MCP.
Read-only finance MCP server. Connects your banks, cards, payment apps, books and payroll into one ledger for your AI. Can't move money. Open source (AGPL-3.0), free during beta.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseBqualityDmaintenanceMCP server that provides AI assistants access to stock market data including financial statements, stock prices, and market news through a Model Context Protocol interface.112,332MIT
- AlicenseAqualityBmaintenanceAn MCP server implementation that provides programmatic access to personal finance data through LunchMoney's API, enabling AI assistants to manage transactions, budgets, categories, and assets.59378 npm115MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Splitwise expenses with atomic duplicate prevention, smart fuzzy matching, and support for flexible split ratios between two people.MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to perform comprehensive Microsoft Excel operations including data analysis, cell editing, advanced formatting, and VBA execution on Windows systems. It provides a structured workflow for managing workbooks and worksheets through a dedicated Model Context Protocol interface.54MIT