mf-accounting-voucher-mcp
mf-accounting-voucher-mcp
这是一个补充Money Forward 云会计官方MCP服务器未支持功能的本地MCP服务器。它直接调用 REST API v3,与官方MCP(远程)配合使用。
提供的工具
工具名 | 功能 | API端点 |
| 将凭证文件(PDF・图片)附加到分录 |
|
| 解除凭证的附加 |
|
| 删除分录(不可撤销) |
|
注记: 将合作明细设为「对象外」在 REST API 中不存在,因此不提供此功能。凭证文件的下载同样API不支持。官方MCP已提供的功能(如
getJournals等)不会重新实现。
凭证文件的二进制数据不经过LLM。该服务器(Node进程)接收本地文件路径,读取并转换为base64后发送到API。
Related MCP server: money-forward-mcp-community
设置
1. 在应用门户注册应用
在Money Forward的应用门户创建应用,并进行以下设置。
重定向URI:
http://127.0.0.1:53682/callback作用域:
mfc/accounting/voucher.write(凭证的注册、删除)mfc/accounting/journal.write(分录的注册、更新、删除)
记录下发行的 客户端ID / 客户端密钥。
2. 安装与构建
pnpm install && pnpm run build3. 环境变量的设置
export MF_CLIENT_ID="(クライアントID)"
export MF_CLIENT_SECRET="(クライアントシークレット)"变量 | 默认值 | 用途 |
| 无(必填) | 在应用门户发行 |
|
| 回调用本地端口 |
|
| 重定向URI |
|
| 令牌保存位置 |
|
| 单文件上限(本地侧的安全阀) |
|
| 允许的扩展名(可用逗号分隔覆盖) |
4. 首次授权
pnpm run auth浏览器会打开,请登录Money Forward并进行授权。令牌将保存到 ~/.mf-accounting-voucher-mcp/tokens.json(mode 600),之后会自动刷新。
注册到 Claude Desktop / Cowork
注册一次后,MCP服务器会在客户端启动时自动启动。无需日常手动启动操作。
推荐:使用钥匙串(不将密钥写入配置文件)
仅在首次将认证信息注册到macOS钥匙串:
security add-generic-password -s mf-accounting-voucher-mcp -a client_id -w '(クライアントID)' -U
security add-generic-password -s mf-accounting-voucher-mcp -a client_secret -w '(クライアントシークレット)' -U在 claude_desktop_config.json 的 mcpServers 中注册启动脚本(请将路径替换为实际安装位置):
{
"mcpServers": {
"mf-accounting-voucher-mcp": {
"command": "/path/to/mf-accounting-voucher-mcp/scripts/mf-accounting-voucher-mcp.sh",
"args": []
}
}
}首次OAuth授权也可以通过脚本执行(无需设置环境变量):
scripts/mf-accounting-voucher-mcp.sh auth替代方案:将环境变量直接写入配置文件
{
"mcpServers": {
"mf-accounting-voucher-mcp": {
"command": "node",
"args": ["/path/to/mf-accounting-voucher-mcp/dist/index.js"],
"env": {
"MF_CLIENT_ID": "(クライアントID)",
"MF_CLIENT_SECRET": "(クライアントシークレット)"
}
}
}
}请注意此方法会将密钥以明文形式保留在配置文件中。
使用示例
「この領収書(/Users/xxx/Downloads/receipt.pdf)を仕訳 XXXX に添付して」
→ post_vouchers が呼ばれ、添付結果(voucher_file_ids)が返る
「仕訳 XXXX の証憑 a60cd25d-... の添付を解除して」
→ delete_voucher
「仕訳 XXXX を削除して」
→ delete_journal(実行前に仕訳内容の提示と明示的な確認が入る)可以通过官方MCP的 getJournalById 获取目标分录,并确认 voucher_file_ids 中已反映来验证附加结果。
注意事项
MF的文件类型・大小・数量的准确限制请参考官方规范
/specs/vouchers(本服务器的上限是本地侧的安全阀)切换事业者(办公室) 通过重新执行
pnpm run auth进行delete_journal无法撤销。调用方(LLM)的设计是在取得用户明确确认后才执行
Available Tools
3 toolsdelete_journalA
マネーフォワード クラウド会計の仕訳を削除する。この操作は元に戻せません。実行前に必ずユーザーの明示的な確認を取り、対象仕訳の内容(取引No・日付・金額・摘要)を提示してから呼び出すこと。
Inputs: id (required).
delete_voucherA
マネーフォワード クラウド会計の仕訳から証憑ファイルの添付を解除する(添付解除。ファイル自体の削除ではなく仕訳との紐付けを外す操作)。
Inputs: journal_id (required), voucher_file_id (required).
post_vouchersA
マネーフォワード クラウド会計の仕訳に証憑ファイル(PDF・画像)を添付する。ファイルはローカルの絶対パスで指定し、サーバー側で読み込んでbase64送信する(ファイル内容はLLMを経由しない)。
Inputs: file_paths (required), journal_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
post_vouchers与delete_voucher都涉及証憑添付,前者是添付、后者是解除添付,边界清晰;但delete_voucher和delete_journal都含'delete'前缀,容易混淆,且语义上一个删除附件、一个删除仕訳本身,描述虽说明但名称上不够鲜明。整体可区分但有轻微重叠。
工具名采用动词+名词的snake_case(post_vouchers, delete_voucher, delete_journal),但动词风格不一致:post是动作,delete重复使用,且voucher与journal概念不同但都涉及删除,名词部分略显混乱。整体模式可识别但不够统一。
3个工具属于偏少但可接受的范围。对于会计凭证管理,可能预期有获取/查询工具,但当前仅有写入和删除操作,功能面较窄,工具数接近最低阈值。
缺少核心的获取/查询功能(如获取凭证列表、获取仕訳详情),也缺少更新操作。用户无法查看已存在的凭证或仕訳,仅能添加和删除,导致操作闭环不完整,代理将面临无法验证或修订的困境。
Related MCP Connectors
Secure remote MCP for supported accounting workflows in authorized Money S3 companies.
e-Boekhouden MCP server for ChatGPT, Claude and any AI agent: create invoice, book mutation, add relation, list open items and export ledger in your own e-Boekhouden account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to e-Boekhouden yourself; Cotlet does not store your password and you need no e-Boekhouden API key. About the official e-Boekhouden API: Yes. e-Boekhouden has a REST API with an OpenAPI description (checked 14 Oct 2026). Setup and FAQ: https://cotlet.dev/integrations/e-boekhouden-api-mcp-server
Headless API-first double-entry accounting & bookkeeping engine. 84 MCP tools over HTTP.
Bokio MCP server for ChatGPT, Claude and any AI agent: create invoice, send invoice, upload receipt, create journal entry and list unpaid invoices in your own Bokio account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Bokio yourself; Cotlet does not store your password and you need no Bokio API key. About the official Bokio API: Yes, Bokio has a public REST API for invoices, customers, journal entries, uploads and supplier invoices (checked 14 Oct 2026), but it depends on your price plan and on the kind of integration: a private integration token works for one company only, and a tool that serves several companies must be registered as a public integration with OAuth 2.0. Bokio publishes no MCP server of its own. Setup and FAQ: https://cotlet.dev/integrations/bokio-api-mcp-server
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables Claude Desktop to interact with freee accounting API for expense registration, transaction management, and receipt image processing.151MIT
- AlicenseAqualityCmaintenanceUnofficial, community-maintained stdio MCP server for Money Forward ME that uses cookie-based authentication to retrieve accounts and assets from manual entry accounts.1424 npm10MIT
- AlicenseBqualityCmaintenanceAn unofficial MCP server for Money Forward Cloud Accounting that extends the official beta MCP by enabling simultaneous connections to multiple businesses, attaching receipts and invoices to journal entries, and fully deleting journal entries.29MIT
- AlicenseCqualityCmaintenanceEnables AI assistants to operate MoneyForward Cloud Invoice, Expense, and Accounting through their public APIs, exposing 56 tools for issuing invoices, filing expenses with receipt images, and posting journal entries.5614 npmMIT