personal-finance-mcp
personal-finance-mcp
非官方。 本项目与 Plaid Inc. 无关联,未得到其认可或赞助。“Plaid”是 Plaid Inc. 的商标。这是一个自托管客户端,使用您提供的凭据与 Plaid 的 API 进行通信。
一个自托管、只读的 MCP 服务器,可将您的银行、信用卡、贷款和经纪账户(通过 Plaid)连接到像 Claude Code 这样的 MCP 客户端。用简单的英语询问您的财务状况——无需第三方聚合器(如 Monarch、Mint 等)。
您可以询问的内容
“我所有账户的总余额是多少?”
“显示过去 30 天内超过 100 美元的交易。”
“我还在支付哪些订阅费用?”
“我上个月在杂货上花了多少钱?”
“是否有银行需要重新验证?”
会话示例(示意):
you : What did I spend on groceries last month?
claude : [calls get_transactions]
$487.23 across 14 transactions. Top merchants:
Whole Foods ($198), Trader Joe's ($156), Safeway ($89).
you : Any subscriptions I'm still paying for?
claude : [calls get_recurring_transactions]
7 active recurring outflows totaling $142/mo:
Netflix ($15.99), Spotify ($11.99), NYT ($4), ...Related MCP server: plaid-mcp
工具
所有 9 种工具均为只读。每个工具都会返回 {<data>: [...], "warnings": [...]},因此即使某个银行连接中断,也不会导致整个查询失败。
工具 | 功能描述 |
| 所有已关联银行的账户列表,包含余额信息 |
| 实时当前余额 + 可用余额(可按账户筛选) |
| 指定日期范围内的交易记录(最长可追溯至 2 年前) |
| 按关键字搜索商户 / 名称 / 交易对手 |
| 检测到的定期流入 + 流出流 |
| 信用卡、学生贷款、抵押贷款,包含年利率 (APR) 和还款详情 |
| 当前持仓,包含代码 + 证券元数据 |
| 指定日期范围内的买入 / 卖出 / 分红历史 |
| 每个已关联银行的健康状况(显示是否需要重新验证) |
快速入门
需要 Python 3.11+、一个 Plaid 账户(免费试用计划)和一个 MCP 客户端。
1. Plaid 设置
在 https://dashboard.plaid.com/signup 注册 → 选择 Trial(试用)计划(免费,10 个项目)。
Team Settings → Products:启用 Transactions、Liabilities、Investments。
Team Settings → API:复制您的
client_id和生产环境secret。
2. 安装
git clone https://github.com/JosueM1109/personal-finance-mcp.git
cd personal-finance-mcp
python3.11 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # then fill in PLAID_CLIENT_ID and PLAID_SECRET
pytest -v # sanity check3. 关联银行
为您想要连接的每个银行运行一次:
uvicorn link_helper:app --port 8765打开 http://localhost:8765,点击 Link a bank,完成 Plaid Link。终端会打印一行类似 PLAID_TOKEN_CHASE=access-prod-xxx... 的内容——将其粘贴到 .env 文件中,并为每个银行重复此操作。
4. 运行
python server.py # serves on http://localhost:8000/mcp5. 添加到 Claude Code
claude mcp add --transport http personal-finance http://localhost:8000/mcp尝试输入“list my accounts”进行确认。
部署
若要进行可从任何地方访问的部署:
Docker(已包含):
docker build -t personal-finance-mcp . && docker run --rm -p 8000:8000 --env-file .env personal-finance-mcp任何 Python 主机(Fly.io、Railway、树莓派 + Tailscale、VPS):设置
.env.example中的环境变量,通过 HTTPS 公开/mcp,并使用身份验证进行保护。Prefect Horizon(作者使用的方式 — $0 经常性成本):请参阅 docs/DEPLOYMENT.md 获取完整指南。
保护端点。 公开带有您令牌的 MCP 端点会泄露所有已关联的账户。请使用 OAuth 2.1、Cloudflare Access 或仅绑定到私有网络。
安全性
单租户。 每人一个部署。请勿共享。
只读。 没有任何工具会修改任何机构的状态。请勿添加任何会修改状态的工具。
令牌存储在环境变量中,从不存储在磁盘上。
.env已被 git 忽略。您自行负责 Plaid 合规性。 您是以您自己的账户作为 Plaid 的客户。
每次部署前:
[ ]
.env从未提交:git log --all -- .env返回空[ ] 历史记录中没有真实令牌:
git log -S'access-prod-' --all仅返回占位符[ ] MCP 端点前有身份验证网关(或仅限 localhost)
[ ] 部署环境中设置了
HORIZON=1(或类似设置),从而在部署环境中禁用link_helper.py[ ] 每隔几周检查一次
get_institutions_status()以确认是否需要重新验证
故障排除
尽管有真实数据,但工具返回为空。 关联银行时未启用 Plaid 产品。请在启用 Transactions + Liabilities + Investments 的情况下重新关联。当这是原因时,工具会在 warnings 中显示 PRODUCTS_NOT_SUPPORTED。
get_institutions_status() 显示 re_auth_required。 银行的 Plaid 会话已过期。以更新模式运行 link_helper.py — 您现有的访问令牌保持不变。请参阅 docs/DEPLOYMENT.md。
Plaid Link 显示银行“不支持”(Amex 常见问题)。 通常是 INSTITUTION_REGISTRATION_REQUIRED 问题 — OAuth 银行需要先在 Plaid 仪表板中进行机构注册。请参阅 docs/TROUBLESHOOTING.md。
更多问题:docs/TROUBLESHOOTING.md。
架构
server.py — FastMCP 服务器,9 个只读工具。
plaid_client.py — Plaid SDK 封装:
SecretStr令牌脱敏、每个项目 5 分钟的健康缓存、响应格式化、结构化错误映射。link_helper.py — 仅限本地的 FastAPI 应用,用于 Plaid Link。如果设置了
HORIZON=1,则拒绝运行。
深入了解(包括为什么使用 /transactions/get 而不是 /transactions/sync):docs/ARCHITECTURE.md。
贡献
请参阅 CONTRIBUTING.md。范围刻意保持狭窄:只读、单租户、由 Plaid 支持。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceA read-only MCP server that enables users to analyze their real bank, credit card, loan, and brokerage data through Plaid. It provides financial analysis tools for transactions, balances, investments, liabilities, and debt while keeping all access tokens and data locally stored.24MIT
- FlicenseNot gradedqualityCmaintenanceSelf-hosted MCP server enabling Claude to query bank accounts, balances, and transactions through Plaid with OAuth and TLS.
- AlicenseBqualityAmaintenanceopen-source personal finance app with a first-party MCP server. 91 HTTP tools (OAuth 2.1 + DCR) and 87 stdio tools cover transactions, budgets, accounts, portfolio analytics, FX conversion, loans, subscriptions, goals, importers, and rules. Users self-host with Docker + PostgreSQL or use the managed cloud8911AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceA local MCP server that provides read-only SQL access to financial accounts via Plaid, enabling natural language queries about transactions, balances, and holdings.MIT
Related MCP Connectors
Hosted remote MCP server for YNAB on Cloudflare Workers with OAuth
Brazilian Open Finance MCP — 30+ banks (Itaú, Nubank, etc.) to Claude/Cursor. Read-only.
Read-only bank access for your AI agent. Connects Claude, ChatGPT, Cursor, Gemini, Codex.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/JosueM1109/personal-finance-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server