Skip to main content
Glama
solara-co-jp

mf-accounting-voucher-mcp

by solara-co-jp

mf-accounting-voucher-mcp

A local MCP server that complements features not supported by the official MCP server for マネーフォワード クラウド会計. It calls the REST API v3 directly and is used alongside the official MCP (remote).

Provided Tools

Tool name

Function

API endpoint

post_vouchers

Attach voucher files (PDF/images) to journal entries

POST /api/v3/vouchers

delete_voucher

Remove voucher attachments

DELETE /api/v3/vouchers

delete_journal

Delete journal entries (irreversible)

DELETE /api/v3/journals/{id}

Note: Marking linked details as "excluded" is not available in the REST API, so this is not provided. Downloading voucher files is likewise not supported by the API. Features already provided by the official MCP (such as getJournals) are not reimplemented.

Voucher file binaries do not pass through the LLM. This server (a Node process) receives a local file path, reads it, base64-encodes it, and sends it to the API.

Related MCP server: money-forward-mcp-community

Setup

1. Register an app in the App Portal

Create an app in the マネーフォワード App Portal and configure the following.

  • Redirect URI: http://127.0.0.1:53682/callback

  • Scopes:

    • mfc/accounting/voucher.write (registering and deleting vouchers)

    • mfc/accounting/journal.write (registering, updating, and deleting journal entries)

Note down the issued client ID / client secret.

2. Installation and build

pnpm install && pnpm run build

3. Environment variable configuration

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

Variable

Default

Purpose

MF_CLIENT_ID / MF_CLIENT_SECRET

None (required)

Issued in the App Portal

MF_REDIRECT_PORT

53682

Local port for the callback

MF_REDIRECT_URI

http://127.0.0.1:{PORT}/callback

Redirect URI

MF_TOKEN_PATH

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

Token storage location

MF_MAX_FILE_MB

20

Per-file limit (local safety valve)

MF_ALLOWED_EXT

.pdf,.jpg,.jpeg,.png

Allowed extensions (overridable as comma-separated list)

4. Initial authorization

pnpm run auth

A browser opens, so log in to マネーフォワード and authorize. The token is saved to ~/.mf-accounting-voucher-mcp/tokens.json (mode 600) and is automatically refreshed thereafter.

Registering with Claude Desktop / Cowork

Once registered, the MCP server starts automatically when the client launches. No manual startup is needed in daily use.

Only on the first run, register the credentials in the macOS keychain:

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

Register the startup script in mcpServers in claude_desktop_config.json (replace the path with your actual installation location):

{
  "mcpServers": {
    "mf-accounting-voucher-mcp": {
      "command": "/path/to/mf-accounting-voucher-mcp/scripts/mf-accounting-voucher-mcp.sh",
      "args": []
    }
  }
}

The initial OAuth authorization can also be run via the script (no environment variable configuration needed):

scripts/mf-accounting-voucher-mcp.sh auth

Alternative: Writing environment variables directly in the config file

{
  "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": "(クライアントシークレット)"
      }
    }
  }
}

Note that with this method, secrets remain in plain text in the config file.

Usage example

「この領収書(/Users/xxx/Downloads/receipt.pdf)を仕訳 XXXX に添付して」
→ post_vouchers が呼ばれ、添付結果(voucher_file_ids)が返る

「仕訳 XXXX の証憑 a60cd25d-... の添付を解除して」
→ delete_voucher

「仕訳 XXXX を削除して」
→ delete_journal(実行前に仕訳内容の提示と明示的な確認が入る)

The attachment result can be verified by retrieving the target journal entry with the official MCP's getJournalById and confirming it is reflected in voucher_file_ids.

Notes

  • For the exact MF limits on file type, size, and count, refer to the official specification /specs/vouchers (this server's limits are a local safety valve)

  • Switching business entities (offices) is done by re-running pnpm run auth

  • delete_journal cannot be undone. The caller (LLM) is designed to obtain explicit user confirmation before executing

Available Tools

3 tools
delete_journalA

マネーフォワード クラウド会計の仕訳を削除する。この操作は元に戻せません。実行前に必ずユーザーの明示的な確認を取り、対象仕訳の内容(取引No・日付・金額・摘要)を提示してから呼び出すこと。

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes削除する仕訳のID

TDQS

A4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full behavioral burden. It explicitly discloses that the operation is irreversible and imposes a mandatory safety workflow: show the user the transaction details and obtain explicit confirmation before calling. This is excellent transparency for a destructive operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with no wasted words. It front-loads the action and irreversibility, then gives the specific confirmation requirement. Every sentence contributes essential operational context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter destructive tool, the description covers what is deleted, that it cannot be undone, and what must be done before invoking it. It does not describe success or error behavior, but with no output schema and low complexity this is a minor gap rather than a critical omission.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%; the single `id` parameter is already described as '削除する仕訳のID'. The description adds no extra information about ID format, source, or validation, so the schema is doing the work and the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the action and target: it deletes a journal entry (仕訳) in Money Forward Cloud Accounting. However, it does not explicitly differentiate itself from the sibling tool delete_voucher, so an agent may still be uncertain which delete operation to select.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides strong pre-call guidance: it states the operation cannot be undone and requires explicit user confirmation with target journal details presented beforehand. However, it does not describe when to prefer this tool over alternatives such as delete_voucher or post_vouchers.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_voucherA

マネーフォワード クラウド会計の仕訳から証憑ファイルの添付を解除する(添付解除。ファイル自体の削除ではなく仕訳との紐付けを外す操作)。

ParametersJSON Schema
NameRequiredDescriptionDefault
journal_idYes対象の仕訳ID
voucher_file_idYes添付解除する証憑ファイルのID

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden, and it adds the valuable clarification that the operation is non-destructive on the file itself (only removes the link), which goes beyond the tool name. However, it does not disclose permission requirements, response format, or whether the operation is reversible — gaps for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single compact sentence with one parenthetical clarification. The critical semantic distinction (detach, not delete) is front-loaded, and there is minimal waste, though the parenthetical does add some length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter tool with fully documented parameters and no output schema, the description covers the essential semantics and the key non-deletion distinction well. Nothing critical is missing for correctly invoking the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and both parameters (journal_id, voucher_file_id) carry their own schema descriptions, so the baseline of 3 applies. The description adds no parameter-level detail beyond what the schema already documents.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific operation — detaching (添付解除) a voucher file from a journal entry in Money Forward Cloud Accounting — with a clear verb and resource. The parenthetical explicitly states it removes the association rather than deleting the file, which distinguishes it from the sibling delete_journal and resolves the ambiguity inherent in the name 'delete_voucher'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The parenthetical clarifies the semantics ('not file deletion but link removal'), which implies this is not the tool for actually deleting files. However, it does not explicitly name alternatives or state when-not conditions; the routing away from delete_journal is implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

post_vouchersA

マネーフォワード クラウド会計の仕訳に証憑ファイル(PDF・画像)を添付する。ファイルはローカルの絶対パスで指定し、サーバー側で読み込んでbase64送信する(ファイル内容はLLMを経由しない)。

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathsYes添付するファイルの絶対パス(Mac)の配列。最大10件
journal_idYes添付先の仕訳ID

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description takes on the full burden of behavioral disclosure. It explains that files are specified by local absolute path, are loaded server-side, and sent as base64, and notably states that file contents do not pass through the LLM—a valuable privacy/security detail. It does not mention permissions or potential side effects beyond attachment, but the core behavior is clear and informative.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-organized sentence that front-loads the action and then explains the file-handling mechanism. There is no wasted wording, and the key technical detail (base64, no LLM exposure) is included without bloating the text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple 2-parameter tool with no output schema, the description covers the essential information: the action, the file types, the path requirement, and the transmission method. It does not explicitly mention error scenarios or return values, but these are less critical given the straightforward nature of the operation and the absence of an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, with descriptions for both file_paths and journal_id in the schema itself. The description adds no new parameter-specific semantics beyond what's in the schema; it repeats the absolute path concept but does not enhance it. This is the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action: attach voucher files (PDF/image) to a journal entry in Money Forward Cloud Accounting. It specifies the resource (journal entry) and the object being attached (files), distinguishing it from sibling tools that delete. The verb 'attach' is specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implicitly indicates when to use this tool (when attaching voucher files to a journal) but does not explicitly mention alternatives or exclusions. Sibling tools are delete operations, so the purpose is clearly different, but the tool lacks an explicit statement like 'Use this instead of delete_voucher when adding attachments.'

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.0
    • First observeddelete_journal
    • First observeddelete_voucher
    • First observedpost_vouchers

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

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

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

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
    A
    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
    25 npm
    5
    MIT
  • A
    license
    B
    quality
    A
    maintenance
    Read-only MCP server for self-hosted Manager.io bookkeeping, providing curated GET tools to access accounting data like invoices, balances, and reports.
    10
    1
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables MCP-capable assistants to query and manage Lexware Office contacts, sales documents, vouchers, files, payments, webhooks, and reference data via the Lexware Office public API. Adds bank reconciliation tools for matching bank statement CSVs against Lexware vouchers or scanned receipt PDFs.
    4
    MIT