avie-moneylover-mcp
Provides tools to read Money Lover account data and add transactions, with features for previewing, duplicate detection, reconciliation, and safe batch import of bank/card statement JSON via an MCP client.
README
Avie Money Lover MCP / Local Bridge
Unofficial Money Lover integration for two workflows:
- MCP server — expose Money Lover read/write tools to an MCP-capable client.
- GPT + local bridge — let ChatGPT prepare/review statement JSON while your own machine keeps the Money Lover token/cookie and performs the final import.
Unofficial project. This repository is not affiliated with, endorsed by, or sponsored by Money Lover. It uses web endpoints observed from the Money Lover web app. Those endpoints, authentication flows, category behavior, and anti-bot requirements can change without notice.
What it can do
- Read authenticated user info
- List wallets and wallet categories
- Read transactions by date range
- Resolve Money Lover
user_category_v2source IDs to runtime IDs using transaction history - Preview a single transaction without writing
- Add a transaction with duplicate protection
- Preview a bank/card statement batch
- Reconcile expense − income against a statement total
- Flag exact duplicates, probable duplicates, unresolved categories, and review rows
- Import sequentially only after explicit confirmation
- Verify created transactions by reading them back
- Safely re-run after a partial import: exact duplicates are skipped
Requirements
- Windows 10/11, macOS, or Linux
- Node.js 22+
- A Money Lover account you control
- For reliable writes: a fresh wallet-owner session, current browser cookie/
cf_clearanceif required, and the matching browser User-Agent
Quick start
git clone https://github.com/haonguyen97ftu/avie-moneylover-mcp.git
cd avie-moneylover-mcp
npm install
npm test
Windows helper setup
scripts\setup-windows.cmd
Set credentials in the current shell only:
set "MONEYLOVER_ACCESS_TOKEN=YOUR_FRESH_OWNER_TOKEN"
set "MONEYLOVER_CF_CLEARANCE=YOUR_CURRENT_CF_CLEARANCE_VALUE"
set "MONEYLOVER_USER_AGENT=YOUR_EXACT_BROWSER_USER_AGENT"
Then run:
scripts\doctor.cmd
Recommended GPT + local workflow
Bank/card statement
↓
ChatGPT extracts + categorizes
↓
statement JSON
↓
local preview
↓
review / duplicate / reconciliation checks
↓
explicit IMPORT confirmation
↓
Money Lover
↓
local verification report
Do not paste Money Lover tokens, refresh tokens, passwords, browser cookies, or cf_clearance into ChatGPT, GitHub issues, logs, or screenshots. ChatGPT only needs the statement plus the generated preview/result JSON.
Preview a statement
scripts\preview.cmd data\your-statement.json
Import after review
scripts\import.cmd data\your-statement.json
The importer requires you to type exactly:
IMPORT
before writes begin.
See docs/HUONG_DAN_SU_DUNG.md for the complete Vietnamese guide.
API behavior observed
Authenticated requests currently use:
Authorization: AuthJWT <access_token>
Observed endpoints:
| Client method | HTTP | Endpoint |
|---|---|---|
getUserInfo() |
POST | /api/user/info |
getWallets() |
POST | /api/wallet/list |
getCategories(walletId) |
POST | /api/category/list |
getTransactions(...) |
POST | /api/transaction/list |
addTransaction(...) |
POST | /api/transaction/add |
Writes may require browser-like headers and a current Cloudflare session. Supported environment variables include:
MONEYLOVER_ACCESS_TOKENMONEYLOVER_CF_CLEARANCEMONEYLOVER_COOKIEMONEYLOVER_USER_AGENTMONEYLOVER_TIMEOUT_MSMONEYLOVER_CATEGORY_LOOKBACK_DAYSMONEYLOVER_WRITE_DELAY_MS
Batch statement format
Start from data/example-statement.json. Full field documentation is in docs/STATEMENT_FORMAT.md.
Preview:
npm run preview -- data\your-statement.json
Import:
npm run import -- data\your-statement.json
Optional flags:
--allow-review— include rows intentionally left inreviewafter you inspect them--allow-mismatch— bypass statement reconciliation protection; use only when you understand the discrepancy--allow-shared-wallet— bypass the owner safety check; shared-wallet writes may still fail--confirm IMPORT— non-interactive confirmation; not recommended for ordinary manual use
Safety defaults
The importer refuses to write when:
- any row is
blocked - a
reviewrow exists unless--allow-reviewis supplied - the statement reconciliation difference is non-zero unless
--allow-mismatchis supplied - the authenticated user is not the wallet owner unless
--allow-shared-walletis supplied - confirmation is not exactly
IMPORT
Amounts must be positive numbers.
Category v2
Some accounts expose a source/template category ID from /category/list, while /transaction/add expects a different runtime category ID. The bridge learns this mapping from existing transactions.
If a category has never appeared in history, copy:
config/runtime-category-overrides.example.json
to:
config/runtime-category-overrides.json
and add the runtime ID observed from a real browser transaction request. The local override file is ignored by Git.
Public-repo safety
The repository is configured to avoid committing local financial data by default:
data/*.jsonis ignored except the sanitized exampleout/is ignored.env*is ignored- local runtime category overrides are ignored
- local session helper files are ignored
Before pushing, run:
npm run repo:check
npm test
Then inspect git status manually.
Security
If a token, password, refresh token, browser cookie, or cf_clearance value is ever exposed, treat it as compromised and rotate/revoke the session. See SECURITY.md.
Contributing
Bug reports and pull requests are welcome. Please read CONTRIBUTING.md before submitting changes. Never include real financial statements, account identifiers, tokens, or cookies in issues or test fixtures.
Documentation
- Vietnamese usage guide
- Statement JSON format
- Architecture
- GitHub publishing guide
- Security policy
- Changelog
- GPT statement normalization prompt
- GPT preview review prompt
License
MIT — see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。