mcp-server

v0.2.0
@invoice-harness/mcp-server Checked 3 days ago Published 1 month ago

MCP server for invoice-harness: operate your self-hosted invoicing tool from Claude and other AI assistants.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_documents

帳票(見積/納品/請求/領収/発注/支払通知)の一覧を取得。typeで種別を絞り込み。

ParameterTypeDescription
typestring

get_document

帳票1件の詳細(明細・合計・入金状況)を取得。

ParameterTypeDescription
id *string

list_document_attachments

帳票1件の添付ファイル(内訳PDF等)の一覧を取得(読み取りのみ。ファイル名・サイズ・登録日時)。

ParameterTypeDescription
id *string

list_clients

取引先の一覧を取得。

list_issuers

発行元(自社・会社)の一覧を取得。どの会社で帳票を発行できるか確認する。

create_issuer

発行元(自社)を新規登録。会社名は必須。登録番号(T+13桁)・代表者名・住所・振込先などは任意。複数社運用ではこれで会社を追加する。

ParameterTypeDescription
name *string会社名(必須)
addressstring
bank_infostring振込先(銀行・支店・種別・口座番号・名義)
emailstring
entity_typestring事業形態。individual=個人事業主(決算は暦年)
fiscal_monthnumber決算月 1-12。複数社で会社ごとに異なる場合に指定。未指定は全体設定に従う
person_namestring代表者名・担当者名
postal_codestring
registration_numberstring適格請求書発行事業者 登録番号 T+13桁
telstring

update_issuer

発行元(自社)情報を更新。id は list_issuers で取得。指定したフィールドだけ上書きする。

ParameterTypeDescription
id *string
addressstring
bank_infostring
emailstring
entity_typestring事業形態。individual=個人事業主(決算は暦年)
fiscal_monthnumber決算月 1-12。未指定は変更しない
namestring
person_namestring
postal_codestring
registration_numberstring
telstring

list_divisions

計上区分(部門・事業部)の一覧を取得。会社名付き。

list_items

品目マスタの一覧を取得。

list_tax_rates

税率マスタ(適用開始日つき)の一覧を取得。消費税率の変更に備える時限マスタで、発行日に応じて作成画面の税率が切り替わる。

add_tax_rate

税率マスタに1行追加。消費税率の変更に備える時限マスタ。発行日に応じて作成画面の税率が切り替わる(例: 標準 12% を 2027-04-01 から)。確定済みの過去帳票には影響しない。

ParameterTypeDescription
label *string系列ラベル(標準 / 軽減 など)
rate *number税率パーセント 0-100(10, 8, 12 等)
valid_from *string適用開始日 YYYY-MM-DD(この日から有効)

get_settings

課税・表示・決算月などの設定を取得。

update_settings

設定を更新(指定したフィールドだけ上書き)。初期設定をAIで行える。

ParameterTypeDescription
accent_colorstring帳票アクセント色 #RRGGBB
amount_roundingstring金額の端数
date_formatstring日付表記 2026-01-01 / 2026年1月1日
fiscal_monthnumber決算月 1-12
invoice_show_transaction_dateboolean
tax_displaystring外税/内税
tax_roundingstring消費税の端数
withholdingstring源泉徴収 なし/あり(10.21%)
withholding_basisstring源泉の計算基礎 税抜/税込

create_client

取引先を新規登録。取引先は会社(発行元)ごとに持つので、会社が複数あるときは issuer_id が必須。category_names で顧客区分タグを付与(無ければ自動作成)。

ParameterTypeDescription
name *string
addressstring
category_namesarray顧客区分(VIP/代理店 等。複数可)
contactstring
emailstring
honorificstring敬称(既定 御中)
issuer_idstring所属する会社(発行元)のID。会社が複数あるときは必須。list_issuers で取得。空文字は指定不可(このマスタに「全社共通」は無い)
postal_codestring
registration_numberstring適格請求書発行事業者 登録番号 T+13桁。免税事業者は省略

create_item

品目マスタを新規登録。品目は会社(発行元)ごとに持つので、会社が複数あるときは issuer_id が必須。

ParameterTypeDescription
name *string
issuer_idstring所属する会社(発行元)のID。会社が複数あるときは必須。list_issuers で取得。空文字は指定不可(このマスタに「全社共通」は無い)
tax_ratenumber税率(既定10)
unitstring単位(既定 式)
unit_pricenumber

create_division

計上区分(部門)を新規登録。issuer_name 省略時は全社共通。

ParameterTypeDescription
name *string
issuer_namestring会社名(その会社専用にする場合)

update_client

取引先を更新(id は list_clients で取得・指定フィールドだけ上書き。指定しなかった項目は現在値のまま)。支払条件は closing_day / pay_month_offset / pay_day / pay_note。null を渡すとその項目を消す。送付メールの CC は取引先ではなく担当者(client_contacts.cc_emails)側の設定で、このツールでは変えられない。

ParameterTypeDescription
id *string
addressstring
closing_day締め日(1〜31、99=末日)。null で消す
contactstring
emailstring
honorificstring
namestring
pay_day支払日(1〜31、99=末日)。null で消す
pay_month_offset支払月(0=当月、1=翌月、2=翌々月、3=3か月後)。null で消す
pay_notestring | null支払条件メモ。null か空文字で消す
postal_codestring
registration_numberstring適格請求書発行事業者 登録番号 T+13桁。免税事業者は省略

update_item

品目を更新(id は list_items で取得)。

ParameterTypeDescription
id *string
namestring
tax_ratenumber
unitstring
unit_pricenumber

delete_item

品目を削除。

ParameterTypeDescription
id *string

delete_division

計上区分(部門)を削除(帳票は残り割当が外れる)。

ParameterTypeDescription
id *string

list_client_categories

顧客区分マスタの一覧を取得。

create_client_category

顧客区分(VIP・代理店・製造業 等)をマスタに新規登録。

ParameterTypeDescription
name *string

delete_client_category

顧客区分を削除(各取引先からも外れる)。id は list_client_categories で取得。

ParameterTypeDescription
id *string

set_client_categories

取引先に顧客区分を設定(丸ごと置き換え)。会社名と区分名で指定でき、区分が無ければ自動作成。空配列で全解除。

ParameterTypeDescription
category_names *array付与する区分名(複数可)
client_name *string

list_note_templates

備考テンプレートの一覧を取得。

create_note_template

備考テンプレートを新規登録(請求書等の備考に挿入できる定型文)。会社(発行元)ごとに持つので、会社が複数あるときは issuer_id が必須。

ParameterTypeDescription
body *stringテンプレ本文(例: お振込み手数料は御社にてご負担ください。)
name *string
issuer_idstring所属する会社(発行元)のID。会社が複数あるときは必須。list_issuers で取得。空文字は指定不可(このマスタに「全社共通」は無い)

delete_note_template

備考テンプレートを削除。id は list_note_templates で取得。

ParameterTypeDescription
id *string

set_default_note_template

この備考テンプレートを既定(新規帳票に自動挿入)にする。

ParameterTypeDescription
id *string

duplicate_document

帳票を複製(同種別・新番号・下書き)。id は list_documents で取得。新IDを返す。

ParameterTypeDescription
id *string

list_projects

プロジェクト(案件)一覧を取得。顧客名・状態・請求合計/支払合計/粗利つき。client で顧客名絞り込み。

ParameterTypeDescription
clientstring顧客名で絞り込み

get_project

プロジェクト詳細(収支+紐づく帳票一覧)。id は list_projects で取得。

ParameterTypeDescription
id *string

create_project

プロジェクト(案件)を新規作成。顧客の配下に案件を作り、請求書・見積書・支払(発注/支払通知)を紐づけて粗利を管理する。

ParameterTypeDescription
client_name *string顧客名(取引先に登録済みであること)
name *string案件名
detailstring
division_namestring計上区分(部門)名。案件に設定すると、区分未設定の帳票はこの区分で集計される
end_datestring
issuer_namestring自社(発行元)の会社名
personstring担当者名
start_datestring
statusstring提案中/進行中/完了(既定 進行中)

update_project

プロジェクトを更新(部分指定・未指定は現状維持)。status は proposed(提案中)/active(進行中)/done(完了)。

ParameterTypeDescription
id *string
detailstring
end_datestring
namestring
personstring
start_datestring
statusstring

delete_project

プロジェクトを削除(帳票は残り、割当だけ外れる)。

ParameterTypeDescription
id *string

list_targets

売上目標の一覧(会社・部門ごとの月次目標)。month=YYYY-MM で単月、fiscal_year でその年度の12ヶ月分。省略時は今年度。

ParameterTypeDescription
fiscal_yearnumber決算年(例 2027 = 2027年◯月期。12ヶ月分を取得)
monthstringYYYY-MM(単月で取得)

set_target

売上目標を月次で設定。会社名または部門名 × month(YYYY-MM) で指定(amount=0 で削除)。ダッシュボードに達成率・目標ラインが表示される。

ParameterTypeDescription
amount *numberその月の売上目標(税込・円)
month *stringYYYY-MM(対象の暦年月)
company_namestring会社の目標を設定する場合
division_namestring部門の目標を設定する場合

list_members

メンバー一覧を取得(氏名・メール・権限・状態)。

invite_member

メンバーを招待。初期パスワードを発行して返す(本人は初回ログインで変更)。role は member か owner。

ParameterTypeDescription
email *string
name *string
rolestring

update_member

メンバーを更新(メールで指定。氏名・メール・権限を変更)。最後のオーナーは降格不可。

ParameterTypeDescription
email *string対象メンバーの現在のメール
namestring
new_emailstring
rolestring

delete_member

メンバーを削除(メールで指定)。最後のオーナーは削除不可。

ParameterTypeDescription
email *string

grant_member_company_access

メンバーに会社別の閲覧権限を付与(この会社を見せる)。メールと会社名で指定。

ParameterTypeDescription
company_name *string
email *string

revoke_member_company_access

メンバーの会社別の閲覧権限を解除。メールと会社名で指定。

ParameterTypeDescription
company_name *string
email *string

update_document

下書きの内容を更新(部分指定可・未指定は現状維持)。発行元・取引先・計上区分・案件の付け替えも可能。発行済みは編集不可(取消+訂正を使う)。id は list_documents、issuer_id は list_issuers、client_id は list_clients、project_id は list_projects で取得。

ParameterTypeDescription
id *string
client_idstring取引先を付け替える。list_clients の id
division_idstring計上区分(部門)を付け替える。空文字で解除
due_datestring
issue_datestring
issuer_idstring発行元(自社)を付け替える。list_issuers の id
linesarray指定すると明細を丸ごと置き換え
notesstring
project_idstring案件を付け替える。空文字で解除
subjectstring

list_email_templates

メール文面テンプレートの一覧(key/件名/本文)。issuer_id を渡すとその会社の文面(無ければ全社共通)を返す。

ParameterTypeDescription
issuer_idstring会社(発行元)のID。list_issuers で取得。会社が複数あるときは必須。空文字 "" で全社共通の文面だけを見る

update_email_template

メール文面テンプレートを更新(key は list_email_templates で取得)。会社(発行元)ごとに持つので、会社が複数あるときは issuer_id が必須。

ParameterTypeDescription
body *string
key *string
subject *string
issuer_idstring会社(発行元)のID。会社が複数あるときは必須。list_issuers で取得。空文字 "" を明示すると全社共通(会社別設定が無い会社のフォールバック)にæ…

get_doc_templates

帳票種別ごとの既定備考を取得(type -> notes)。issuer_id を渡すとその会社の設定(無ければ全社共通)を返す。

ParameterTypeDescription
issuer_idstring会社(発行元)のID。list_issuers で取得。会社が複数あるときは必須。空文字 "" で全社共通の設定だけを見る

set_doc_template

帳票種別ごとの既定備考を設定(新規作成時に自動挿入)。会社(発行元)ごとに持つので、会社が複数あるときは issuer_id が必須。

ParameterTypeDescription
notes *string
type *string
issuer_idstring会社(発行元)のID。会社が複数あるときは必須。list_issuers で取得。空文字 "" を明示すると全社共通(会社別設定が無い会社のフォールバック)にæ…

list_audit

監査ログ(操作履歴・改ざん検知チェーン)を取得。読み取り専用。

ParameterTypeDescription
limitnumber

list_transactions

銀行明細(入出金)の一覧。status で絞り込み(例 unmatched)。閲覧専用トークンでも使えるが、その場合は割り当て会社の口座の明細だけが返る(口座に紐づかない生明細は含まれない)。

ParameterTypeDescription
statusstring

reconcile_transaction

銀行明細を帳票に消し込む(入金記録+ステータス更新)。単一なら document_number を指定。合算振込(Square 等で複数請求がまとめて1振込)は allocations に複数の配分(帳票番号+配分額+決済手数料)を渡す。配分先はすべて同一の会社(発行元)に限る。

ParameterTypeDescription
txn_id *string
allocationsarray合算振込を複数請求書へ配分するときの明細。実入金 Σ(amount-fee) が入金額に達すると消込済み
document_numberstring単一消込する帳票の番号(例 INV-2026-0001)。allocations 指定時は不要

create_deposit

手動で入金(振込1回ぶん)を登録する。合算振込の受け皿を作り、返り値の id を reconcile_transaction の txn_id に使って複数請求書へ配分する。amount=着金額(実際に振り込まれた額)。登録と同時に出納帳の口座へ必ず記帳する(口座が未登録の会社ではエラー。先に出納帳で口座を登録すること)。

ParameterTypeDescription
amount *number着金額(実際の入金額。合算配分の実入金合計がこれに一致すると消込済み)
accountstring口座・決済名(任意ラベル。帳簿の所属は ledger_account_id で決まる)
descriptionstring摘要(例 Square合算 7/15)
issuer_idstring記帳先の会社。複数社の口座が見えるときは必須
ledger_account_idstring記帳先の出納帳口座ID。省略時は issuer_id(または見える口座が1社ぶんならその会社)の既定口座
txn_datestring入金日 YYYY-MM-DD(省略時は当日)

delete_document

帳票を削除(下書きのみ。発行済みは cancel_document を使う)。

ParameterTypeDescription
id *string

share_document

公開共有リンクを発行(取引先がログイン無しで開けるURLを返す)。

ParameterTypeDescription
id *string

unshare_document

公開共有リンクを失効。

ParameterTypeDescription
id *string

get_summary

財務サマリー(PL)を取得。会計年度・会社別・部門別の売上/費用/利益/入金。fy=決算年, issuer=会社名 で絞り込み可。

ParameterTypeDescription
fynumber
issuerstring

search_documents

取引先名・日付範囲・金額範囲で帳票を検索(電帳法の検索要件に対応)。

ParameterTypeDescription
fromstring
maxnumber
minnumber
qstring
tostring

create_document

帳票を新規作成(下書き)。client_name(無ければ自動作成)と明細を指定。複数社運用では issuer_name で会社を、division_name で部門を指定。typeは既定で請求書。作成後 issue_document で発行(確定)する。インスタンス設定でプロジェクト必須の場合は project_name が必要。

ParameterTypeDescription
client_name *string
lines *array
division_namestring計上区分(部門)の名前
due_datestring
issuer_namestring発行元(会社)の名前。複数社運用時に指定。省略時は先頭の会社
notesstring
project_namestring紐づけるプロジェクト(案件)名
subjectstring
typestring

issue_document

帳票を発行(確定・ロック)。以後は訂正不可になり、改ざん検知の対象になる。

ParameterTypeDescription
id *string

cancel_document

発行済みの帳票を取消(無効化)。原本は保持され売上集計から除外。入金記録があると取消不可。

ParameterTypeDescription
id *string

create_correction

発行済みの訂正版(内容コピーの新しい下書き)を作成。元帳票に紐づく。返り値の id を編集・発行する。

ParameterTypeDescription
id *string

convert_document

取引フロー変換(見積→発注/納品/請求、請求→領収/支払通知 等)。内容をコピーして新帳票を作成し親子リンク。

ParameterTypeDescription
id *string
target *string

send_document

帳票を取引先へメール送付(公開共有リンク付き)。Resend 設定時は実送信、未設定なら『送付済み』記録のみ。送付前に取引先メールが登録されている必要がある。

ParameterTypeDescription
id *string

send_test_document

帳票をテスト送信(取引先へ送る前の確認用)。本番の送付と同じ件名(先頭に【テスト送信】)・本文・添付・共有リンクで、to にだけ送る。送付済みにはしない・取引先には送らない。to は発行元のメールアドレスか、サーバーの許可リスト(TEST_SEND_ALLOWED)に含まれるアドレスのみ(それ以外は 403)。共有リンクが未発行ならこの時点で発行される。書き込み権限のあるトークンが必要。

ParameterTypeDescription
id *string
to *string

record_payment

請求書に入金を記録(部分入金可)。amount=請求先が支払った額(残額に反映)。fee=クレカ/Square等の決済手数料(実入金=amount-fee)。amount省略時は残額全額。記録と同時に出納帳へ実入金額の明細を必ず1行起こす(出納帳に記録しない選択肢は廃止)。口座が未登録の会社ではエラーになるので、先に出納帳で口座を登録すること。通常運用は出納帳の明細に帳票を紐づける操作が主で、このツールは外部連携向け。

ParameterTypeDescription
id *string
amountnumber
feenumber決済手数料(クレカ/Square。例: amountの3.6%)
ledger_account_idstring記帳先の出納帳口座ID。省略時は直近に使った口座(無ければ先頭の口座)。口座が1件も無い会社ではエラー
methodstring
paid_datestring
referencestring入金伝票番号・摘要(合算入金は同じ番号で各請求に)

list_received_invoices

受領請求書(自社が取引先から受け取った請求書)の一覧を取得。status(unpaid/paid/canceled)・支払期日(from/to)・取引先名(q)で絞り込み可能。会社限定トークンはその会社のみ。

ParameterTypeDescription
fromstring支払期日の下限 YYYY-MM-DD
issuer_idstring会社(発行元)ID で絞る
qstring取引先名で部分一致検索
statusstring
tostring支払期日の上限 YYYY-MM-DD

create_received_invoice

受領請求書をメタ情報のみで登録(未払)。取引先は client_name(登録済みと照合)か vendor_name(手入力)のいずれか。ファイル添付は web の登録フォームから行う。複数社運用では issuer_name で会社を指定。

ParameterTypeDescription
amount *number税込金額(円)
client_namestring取引先(登録済み clients と照合。無ければ発行元名として扱う)
due_datestring支払期日 YYYY-MM-DD
invoice_numberstring
issue_datestring発行日 YYYY-MM-DD
issuer_namestring受領した自社の名前。省略時は先頭の会社
notestring
payment_methodstring
project_namestring紐づけるプロジェクト(案件)名
tax_amountnumber消費税額(円)
vendor_namestring発行元名(clients 未登録のときの手入力)

mark_received_invoice_paid

受領請求書を支払済にする。paid_date(省略時は本日)と method(支払方法)を記録。

ParameterTypeDescription
id *string
methodstring支払方法(振込 / クレカ 等)
paid_datestring支払日 YYYY-MM-DD(省略時は本日)