Skip to main content
Glama
mf-accounting-voucher-mcp

mf-accounting-voucher-mcp

by solara-co-jp

mf-accounting-voucher-mcp

マネーフォワード クラウド会計の公式MCPサーバーが未対応の機能を補完するローカルMCPサーバーです。REST API v3 を直接呼び出し、公式MCP(リモート)と併用します。

提供ツール

ツール名

機能

APIエンドポイント

post_vouchers

証憑ファイル(PDF・画像)を仕訳に添付

POST /api/v3/vouchers

delete_voucher

証憑の添付解除

DELETE /api/v3/vouchers

delete_journal

仕訳の削除(取り消し不可)

DELETE /api/v3/journals/{id}

注記: 連携明細の「対象外」化は REST API に存在しないため提供しません。証憑ファイルのダウンロードも同様にAPI未対応です。公式MCPが提供済みの機能(getJournals 等)は再実装しません。

証憑ファイルのバイナリはLLMを経由しません。このサーバー(Nodeプロセス)がローカルのファイルパスを受け取り、読み込み・base64化してAPIへ送信します。

Related MCP server: money-forward-mcp-community

セットアップ

1. アプリポータルでアプリを登録

マネーフォワードのアプリポータルでアプリを作成し、以下を設定します。

  • リダイレクトURI: http://127.0.0.1:53682/callback

  • スコープ:

    • mfc/accounting/voucher.write(証憑の登録、削除)

    • mfc/accounting/journal.write(仕訳の登録、更新、削除)

発行された クライアントID / クライアントシークレット を控えます。

2. インストールとビルド

pnpm install && pnpm run build

3. 環境変数の設定

export MF_CLIENT_ID="(クライアントID)"
export MF_CLIENT_SECRET="(クライアントシークレット)"

変数

既定値

用途

MF_CLIENT_ID / MF_CLIENT_SECRET

なし(必須)

アプリポータルで発行

MF_REDIRECT_PORT

53682

コールバック用ローカルポート

MF_REDIRECT_URI

http://127.0.0.1:{PORT}/callback

リダイレクトURI

MF_TOKEN_PATH

~/.mf-accounting-voucher-mcp/tokens.json

トークン保存先

MF_MAX_FILE_MB

20

1ファイルの上限(ローカル側の安全弁)

MF_ALLOWED_EXT

.pdf,.jpg,.jpeg,.png

許可拡張子(カンマ区切りで上書き可)

4. 初回認可

pnpm run auth

ブラウザが開くので、マネーフォワードにログインして認可します。トークンは ~/.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 tools
delete_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

    A3.6/5.0

    Scored across 3 tools

    Disambiguation3/5

    post_vouchers与delete_voucher都涉及証憑添付,前者是添付、后者是解除添付,边界清晰;但delete_voucher和delete_journal都含'delete'前缀,容易混淆,且语义上一个删除附件、一个删除仕訳本身,描述虽说明但名称上不够鲜明。整体可区分但有轻微重叠。

    Naming Consistency3/5

    工具名采用动词+名词的snake_case(post_vouchers, delete_voucher, delete_journal),但动词风格不一致:post是动作,delete重复使用,且voucher与journal概念不同但都涉及删除,名词部分略显混乱。整体模式可识别但不够统一。

    Tool Count3/5

    3个工具属于偏少但可接受的范围。对于会计凭证管理,可能预期有获取/查询工具,但当前仅有写入和删除操作,功能面较窄,工具数接近最低阈值。

    Completeness2/5

    缺少核心的获取/查询功能(如获取凭证列表、获取仕訳详情),也缺少更新操作。用户无法查看已存在的凭证或仕訳,仅能添加和删除,导致操作闭环不完整,代理将面临无法验证或修订的困境。

    Related MCP Connectors

    • Secure remote MCP for supported accounting workflows in authorized Money S3 companies.

      https://money-mcp.uctomost.sk/mcp
    • 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.

      https://api.craneledger.ai/mcp
    • 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

      https://cotlet.dev/mcp/v1/bokio

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables Claude Desktop to interact with freee accounting API for expense registration, transaction management, and receipt image processing.
      15
      1
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Unofficial, community-maintained stdio MCP server for Money Forward ME that uses cookie-based authentication to retrieve accounts and assets from manual entry accounts.
      14
      37 npm
      9
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      An 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.
      29
      MIT
    • A
      license
      C
      quality
      C
      maintenance
      Enables 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.
      56
      8 npm
      MIT