finance-reconcile-mcp
Read-only MCP server for reconciling SimpleFIN bank data against Firefly III ledger, enabling audit and review workflows without mutation.
README
finance-reconcile-mcp
Read-only Model Context Protocol server for reconciling SimpleFIN Bridge bank data against a Firefly III ledger.
This project is for audit and reconciliation workflows. It does not create, edit, delete, categorize, merge, import, or otherwise mutate financial data in Firefly III.
Status
v0.3.0 focuses on category intelligence and reviewable proposals: local category rules, category suggestion confidence, and compact review plans from the latest audit. Matching heuristics, category suggestions, and account mapping should still be reviewed before trusting the output.
Features
- Read-only SimpleFIN and Firefly III connectors
- Setup tools for discovering accounts, validating mappings, and saving local config
- Missing transaction detection across mapped accounts
- Stale account and balance mismatch checks
- Duplicate transaction detection in Firefly III
- Uncategorized transaction summaries with suggested category labels
- Local category rules for remembering merchant-to-category suggestions
- Stable fingerprints for repeat audit findings
- Local ignored-finding and audit-history files
- Review plans that turn the latest audit into manual, non-mutating proposed actions
- Compact JSON responses designed for AI agents and MCP clients
Requirements
- Node.js 20 or newer
- A SimpleFIN Access URL
- A Firefly III Personal Access Token
Recommended Setup: OpenClaw + npx
After this package is published to npm, users should not need to clone the repo. Register it as an OpenClaw MCP server with npx.
openclaw mcp set finance-reconcile '{
"command": "npx",
"args": ["-y", "finance-reconcile-mcp@latest"],
"env": {
"SIMPLEFIN_ACCESS_URL": "https://user:password@bridge.simplefin.org/simplefin",
"FIREFLY_BASE_URL": "https://firefly.example.com",
"FIREFLY_PAT": "your-firefly-token",
"DEFAULT_LOOKBACK_DAYS": "30",
"READONLY": "true"
}
}'
OpenClaw stores outbound MCP server definitions with openclaw mcp set. See the OpenClaw MCP docs for the full command surface.
By default, the account map is stored at:
- Linux/macOS:
~/.config/finance-reconcile-mcp/account-map.json - Windows:
%APPDATA%\finance-reconcile-mcp\account-map.json
Set ACCOUNT_MAPPING_FILE only if you want a custom path.
Ignored findings and audit history default to:
~/.config/finance-reconcile-mcp/ignored-findings.json~/.config/finance-reconcile-mcp/audit-history.json
Set IGNORED_FINDINGS_FILE or AUDIT_HISTORY_FILE only if you want custom local paths.
Category rules default to the user config directory:
- Linux/macOS:
~/.config/finance-reconcile-mcp/category-rules.json - Windows:
%APPDATA%\finance-reconcile-mcp\category-rules.json
Set CATEGORY_RULES_FILE only if you want a custom local path.
OpenClaw User Flow
Once the server is registered, ask OpenClaw:
Check the setup status for my finance reconciliation MCP server.
OpenClaw should call setup_get_status.
Then ask:
Suggest an account map for my SimpleFIN and Firefly accounts.
OpenClaw should call setup_suggest_account_map, then show you:
- confidence-scored account matches
- unmatched SimpleFIN accounts
- unmatched Firefly III accounts
- an
account_map_json_draft
Review the draft. If it looks right, ask:
Save this account map for finance reconciliation.
OpenClaw can call setup_save_account_map with:
{
"account_map": {
"accounts": [
{
"simplefin_id": "simplefin-account-id",
"simplefin_name": "CHASE TOTAL CHECKING (...1234)",
"firefly_account_id": "7",
"firefly_name": "Chase Checking"
}
]
},
"overwrite": true,
"confirm_write": true
}
setup_save_account_map only writes the local account-map.json config file. It never writes to Firefly III or SimpleFIN.
Then validate:
Validate my saved finance reconciliation account map.
OpenClaw should call setup_validate_account_map.
Finally, reconcile:
Find SimpleFIN transactions from the last 30 days that appear missing from Firefly.
OpenClaw should call reconcile_find_missing_transactions with:
{
"days": 30
}
For category review, ask:
Suggest categories for my uncategorized Firefly transactions.
OpenClaw should call firefly_summarize_uncategorized. The server may use local category rules, but it never applies categories to Firefly III.
For a compact manual review queue, ask:
Create a review plan for my finance audit.
OpenClaw should call reconcile_prepare_review_plan after an audit has been run. Review-plan actions always include would_mutate_firefly: false and requires_manual_review: true.
Audit And Review Workflow
Run the compact audit first:
Run a compact finance reconciliation audit for the last 30 days.
The reconcile_run_audit tool returns status, summary, recommended_actions, since_last_audit, and top_findings. It also writes a compact local audit-history snapshot with active finding fingerprints. This local write never creates, edits, categorizes, merges, or deletes financial data in Firefly III or SimpleFIN.
Inspect full details when needed:
{
"days": 30,
"include_details": true
}
Ignore a finding after reviewing its fingerprint:
{
"fingerprint": "missing_transaction:example",
"type": "missing_transaction",
"reason": "Known historical import gap"
}
Use setup_ignore_finding for that local ignore. Future audits exclude ignored findings from active counts by default. To inspect ignored findings alongside the audit:
{
"days": 30,
"include_ignored": true
}
Every successful audit compares active finding fingerprints with the previous local snapshot:
{
"since_last_audit": {
"new_findings": 0,
"resolved_findings": 1,
"unchanged_findings": 6
}
}
Prepare a review plan from the latest local audit snapshot:
Create a review plan for my finance audit.
The reconcile_prepare_review_plan tool returns missing transaction review items, duplicate review items, category suggestion items, stale account review items, and balance mismatch review items. These are reviewable proposals only. They do not create transactions, apply categories, delete duplicates, merge transactions, or write to Firefly III.
Category Rules
Category rules are local memory for category suggestions. They are stored as JSON:
{
"rules": [
{
"id": "category_rule:example",
"match": "king soopers",
"category": "Groceries",
"created_at": "2026-05-14T12:00:00.000Z"
}
]
}
Rules match normalized transaction descriptions and merchant names. Add a rule when you want future summaries and review plans to suggest the same category for a merchant:
{
"match": "king soopers",
"category": "Groceries"
}
Use setup_add_category_rule, setup_remove_category_rule, and setup_list_category_rules to manage this local file. These setup tools only write local config. They never mutate Firefly III or SimpleFIN.
Configuration
Environment variables:
SIMPLEFIN_ACCESS_URL=https://user:password@bridge.simplefin.org/simplefin
FIREFLY_BASE_URL=https://your-firefly.example.com
FIREFLY_PAT=your-personal-access-token
DEFAULT_LOOKBACK_DAYS=30
READONLY=true
MOCK_DATA=false
# Optional. Defaults to the user config directory.
# ACCOUNT_MAPPING_FILE=/absolute/path/to/account-map.json
# Optional. Defaults to ~/.config/finance-reconcile-mcp/ignored-findings.json
# IGNORED_FINDINGS_FILE=/absolute/path/to/ignored-findings.json
# Optional. Defaults to ~/.config/finance-reconcile-mcp/audit-history.json
# AUDIT_HISTORY_FILE=/absolute/path/to/audit-history.json
# Optional. Defaults to the user config directory.
# CATEGORY_RULES_FILE=/absolute/path/to/category-rules.json
Notes:
READONLY=falseis rejected at startup.MOCK_DATA=trueruns deterministic fixtures and does not require SimpleFIN or Firefly credentials.SIMPLEFIN_ACCESS_URLmay be the SimpleFIN root Access URL or the/accountsURL.- SimpleFIN Access URLs usually contain credentials. Keep the full URL; the server sends those credentials as an HTTP Basic Auth header internally.
- Do not commit
.envoraccount-map.json.
CLI Checks
These commands do not start the MCP server and do not print secrets:
finance-reconcile-mcp --version
finance-reconcile-mcp --check-config
For a safe fixture check:
MOCK_DATA=true finance-reconcile-mcp --check-config
Get A SimpleFIN Access URL
Create a SimpleFIN token from SimpleFIN Bridge. The token is not the Access URL; it is a base64-encoded claim URL. Decode it, then make a POST request to the decoded URL. The response body is the Access URL to use for SIMPLEFIN_ACCESS_URL.
Cross-platform Node.js command:
node -e "const token = process.argv[1]; const url = Buffer.from(token, 'base64').toString('utf8'); fetch(url, { method: 'POST' }).then(async (r) => { if (!r.ok) throw new Error('HTTP ' + r.status); console.log(await r.text()); }).catch((e) => { console.error(e.message); process.exit(1); });" "PASTE_SIMPLEFIN_TOKEN_HERE"
PowerShell alternative:
$token = "PASTE_SIMPLEFIN_TOKEN_HERE"
$claimUrl = [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($token))
$accessUrl = Invoke-RestMethod -Method Post -Uri $claimUrl
$accessUrl
The result should look roughly like:
https://user:password@bridge.simplefin.org/simplefin
Treat this URL like a secret. It contains read credentials for the SimpleFIN account feed.
Firefly III Token
Create a Personal Access Token in Firefly III and set it as FIREFLY_PAT. The server only uses read endpoints, but you should still treat the token as a secret.
Account Mapping
account-map.json connects SimpleFIN accounts to Firefly III accounts:
{
"accounts": [
{
"simplefin_id": "optional-simplefin-id",
"simplefin_name": "CHASE TOTAL CHECKING (...1234)",
"firefly_account_id": "7",
"firefly_name": "Chase Checking"
}
]
}
Use simplefin_id when you know it. If you omit it, the server falls back to an exact SimpleFIN account name match.
Generic MCP Client Configuration
If your MCP client uses JSON config directly:
{
"mcpServers": {
"finance-reconcile": {
"command": "npx",
"args": ["-y", "finance-reconcile-mcp@latest"],
"env": {
"SIMPLEFIN_ACCESS_URL": "https://user:password@bridge.simplefin.org/simplefin",
"FIREFLY_BASE_URL": "https://your-firefly.example.com",
"FIREFLY_PAT": "your-personal-access-token",
"DEFAULT_LOOKBACK_DAYS": "30",
"READONLY": "true"
}
}
}
}
For a custom account-map path, add:
{
"ACCOUNT_MAPPING_FILE": "/absolute/path/to/account-map.json"
}
Tools
Setup:
setup_get_statusshows configuration and account-map status.setup_list_simplefin_accountslists SimpleFIN accounts for account mapping. It fetches balances only, not transactions.setup_list_firefly_accountslists Firefly III asset/liability accounts for account mapping.setup_suggest_account_mapsuggests anaccount-map.jsondraft by comparing SimpleFIN and Firefly III account names, currencies, and balances.setup_validate_account_mapvalidates an account-map object or the configured file, optionally checking live accounts.setup_save_account_mapwrites the localaccount-map.jsonconfig file afterconfirm_write: true. It does not mutate financial data.setup_list_category_ruleslists local category suggestion rules.setup_add_category_ruleadds or updates a local category suggestion rule.setup_remove_category_ruleremoves a local category suggestion rule.setup_list_ignored_findingslists locally ignored finding fingerprints.setup_ignore_findingwrites a finding fingerprint to the local ignored-findings file.setup_unignore_findingremoves a finding fingerprint from the local ignored-findings file.
Reconciliation:
reconcile_run_auditruns the full audit without mutating financial systems. It returns compact output by default and writes a local audit-history snapshot.reconcile_prepare_review_plancreates reviewable proposed actions from the latest audit snapshot. Every action is manual-review-only and haswould_mutate_firefly: false.reconcile_find_missing_transactionscompares mapped SimpleFIN and Firefly III transactions and returns SimpleFIN transactions that appear missing from Firefly III.reconcile_check_stale_accountscompares the latest transaction dates per mapped account.reconcile_check_balance_mismatchescompares SimpleFIN balances with Firefly III account balances.
Firefly III audit helpers:
firefly_find_possible_duplicatesfinds possible duplicate Firefly III transactions.firefly_summarize_uncategorizedgroups uncategorized Firefly III transactions and suggests category labels without applying them.
Tool Examples
Run the compact audit:
{
"days": 30
}
Limit compact output:
{
"days": 30,
"max_missing": 5,
"max_duplicates": 5,
"max_uncategorized_groups": 5
}
Inspect full audit details:
{
"days": 30,
"include_details": true
}
Show ignored findings in the audit output:
{
"days": 30,
"include_ignored": true
}
Create a review plan from the latest audit:
{}
Add a local category rule:
{
"match": "king soopers",
"category": "Groceries"
}
Ignore a reviewed finding locally:
{
"fingerprint": "duplicate_group:example",
"type": "duplicate_group",
"reason": "Reviewed and accepted duplicate-looking transfer split"
}
Find missing transactions over the default lookback window:
{}
Find missing transactions over 30 days:
{
"days": 30
}
Find missing transactions for one mapped account:
{
"days": 30,
"account": "Chase Checking"
}
Use a fixed date range:
{
"start_date": "2026-04-01",
"end_date": "2026-04-30"
}
From Source
Use this path for development or until the package is published to npm.
git clone <repo-url>
cd finance-reconcile-mcp
npm install
cp .env.example .env
npm run build
npm start
On Windows PowerShell:
Copy-Item .env.example .env
For a source checkout, you can point OpenClaw at the built file:
openclaw mcp set finance-reconcile '{
"command": "node",
"args": ["/absolute/path/to/finance-reconcile-mcp/dist/index.js"],
"cwd": "/absolute/path/to/finance-reconcile-mcp",
"env": {
"SIMPLEFIN_ACCESS_URL": "https://user:password@bridge.simplefin.org/simplefin",
"FIREFLY_BASE_URL": "https://firefly.example.com",
"FIREFLY_PAT": "your-firefly-token",
"READONLY": "true"
}
}'
Development
npm run dev
npm run typecheck
npm test
npm run build
npm pack and npm publish run npm run build automatically through the prepack script.
Release Checklist
npm version minorornpm version patchgit push origin main --follow-tagsnpm publishnpm view finance-reconcile-mcp version
Mock Mode
Set MOCK_DATA=true to run against deterministic fixtures instead of real HTTP connectors. The fixture set includes one missing transaction, one duplicate Firefly transaction group, one stale account, one balance mismatch, and uncategorized transactions.
Example MCP client env:
{
"MOCK_DATA": "true",
"READONLY": "true"
}
Then call reconcile_run_audit with { "days": 30 }.
Matching Design
Transactions are normalized into a shared internal type before matching. Account mapping is required. Matching uses a score from 0 to 1:
- signed amount exact match: high weight
- posted date proximity within plus or minus 2 days: high weight
- description similarity: medium weight
- shared external transaction ID: immediate high confidence
The server masks source account and transaction identifiers in returned JSON where possible and never logs secrets.
Troubleshooting
SimpleFIN URL Includes Credentials
SimpleFIN Access URLs usually look like https://user:password@.../simplefin. Keep that full URL in SIMPLEFIN_ACCESS_URL; the server strips the credentials from the request URL and sends them as an HTTP Basic Auth header. Do not manually remove the credentials unless your SimpleFIN provider has given you another authentication method.
No Account Map Matches
Run setup_suggest_account_map again and compare the draft with account-map.json. If Firefly III account names changed, update firefly_account_id and firefly_name.
Empty Missing Transaction Results
An empty result can mean Firefly III is up to date, the date range is too narrow, or the account map points at the wrong Firefly account. Try a wider range and verify the mapping with the setup tools.
Security Model
- This server is designed to be read-only for financial systems.
- No Firefly III write endpoints are implemented.
- No SimpleFIN mutation endpoints exist in this project.
reconcile_run_auditwrites local audit-history JSON only.reconcile_prepare_review_planreads local audit history only and does not mutate financial systems.- Category rule tools write local category-rules JSON only.
- Ignored-finding tools write local ignored-findings JSON only.
setup_save_account_maponly writes local config after explicit confirmation.- Secrets are read from environment variables and are not logged intentionally.
- Returned account and transaction identifiers are masked where possible.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。