Skip to main content
Glama
invoiceflow-mcp

invoiceflow-mcp

by automatiabcn

InvoiceFlow MCP

Model Context Protocol向けのAI活用型請求書自動化ツール

License: MIT TypeScript MCP

InvoiceFlowは、プロフェッショナルなPDF請求書の作成、AIによる支払い遅延リスクの予測、リマインダーの自動送信、入金と請求書の照合、キャッシュフローの追跡をすべてMCPプロトコル経由で実現します。


機能

  • プロフェッショナルなPDF請求書作成: 明細、税金、割引、多通貨(10通貨)対応

  • AIリスク予測 (0-100): 請求金額、クライアントの履歴、期日、リマインダー履歴に基づく予測

  • スマートリマインダー: リスクレベルに応じた段階的な通知

  • 支払い照合: 金額と支払者メールアドレスによる入金と請求書の照合(プラットフォーム非依存 — 手動入力またはWebhook経由の支払いデータに対応)

  • キャッシュフローレポート: 回収率、予測収入、クライアント別の内訳

  • クライアント管理: 支払い履歴の自動追跡

  • 連番請求書番号: (INV-2026-0001, INV-2026-0002, ...)

  • 10個のMCPツール + 4個のMCPリソース: 請求業務のライフサイクル全体をカバー


Related MCP server: Invoice Generator AI MCP

クイックスタート

MCPizeマーケットプレイスからインストール

  1. mcpize.com で InvoiceFlow MCP を検索

  2. Install をクリックし、サブスクリプションプランを選択

  3. MCP対応クライアントでツールとリソースが自動的に利用可能になります

ソースからビルド

git clone https://github.com/enzoemir1/invoiceflow-mcp.git
cd invoiceflow-mcp
npm ci
npm run build

MCPクライアントの設定に追加:

{
  "mcpServers": {
    "invoiceflow": {
      "command": "node",
      "args": ["path/to/invoiceflow-mcp/dist/index.js"]
    }
  }
}

ツール

client_manage

新規クライアントを作成します。請求書作成前に必須です。

invoice_create

明細付きの請求書を作成します。小計、税金、割引、合計を自動計算します。連番の請求書番号 (INV-YYYY-NNNN) を生成します。

invoice_send

請求書PDFをメールで送信します(SENDGRID_API_KEYが必要)。ステータスを「送信済み」に更新します。

invoice_list

ステータス、クライアント、金額範囲、日付範囲、または期限超過ステータスで請求書をフィルタリングします。ページネーションをサポートしています。

invoice_mark_paid

請求書を支払い済み(全額または一部)としてマークします。クライアントの支払い履歴を自動的に更新します。

invoice_remind

支払いリマインダーを送信します。リマインダー回数をインクリメントします。カスタムメッセージをサポートしています。

invoice_risk

AIによる支払い遅延リスク予測 (0-100)。リスクレベル、要因の内訳、推奨アクション、次回リマインダー日を返します。

cashflow_report

キャッシュフローの概要を生成します:請求総額、回収額、未払い額、期限超過額、回収率、30日間の予測。

payment_reconcile

金額と支払者メールアドレスに基づいて、入金を請求書と照合します。自動的に支払い済みとしてマークします。


リソース

リソース

説明

invoices://pending

未払い請求書一覧

invoices://overdue

期限超過請求書一覧

invoices://stats

月次キャッシュフロー概要

clients://list

支払い履歴付きクライアント一覧


リスク予測エンジン

4つの加重要因を使用して請求書を0〜100でスコアリングします:

要因

重み

測定内容

請求金額

20%

金額が高いほどリスクが高い

クライアント履歴

35%

支払い率、遅延支払い、平均日数

期日

30%

期日までの日数/経過日数

リマインダー

15%

送信済みリマインダー数

リスクレベル: 低 (0-30), 中 (31-60), 高 (61-100)


設定

.env.example を .env にコピーし、必要な変数を設定してください:

cp .env.example .env

変数

必須

説明

SENDGRID_API_KEY

メール送信時

SendGrid経由で請求書とリマインダーを送信

SendGridはオプションです。InvoiceFlowは、請求書作成、リスクスコアリング、キャッシュフローレポート、照合において完全にオフラインで動作します。送信メールが必要な場合にのみSendGridを追加してください。

ロードマップ: Stripe & PayPalライブ同期

payment_reconcile ツールは現在、提供された金額(CSV、Webhook、または手動入力)を保存済みの請求書と照合します。Webhookリスナーを備えたStripeおよびPayPal APIの直接統合はv2.0で計画されています。進捗状況は issues を参照してください。

使用例

クライアントと請求書の作成

> Create a client "Acme Corp" with email billing@acme.com

✓ Client created: Acme Corp (id: 3f2a...)

> Create an invoice for Acme Corp: 10 hours consulting at $150/hr, 20% tax

✓ Invoice INV-2026-0001 created
  Subtotal: $1,500.00 | Tax: $300.00 | Total: $1,800.00

支払いリスクの評価

> What's the risk score for invoice INV-2026-0001?

Risk Score: 42/100 (Medium)
  - Invoice Amount: 25 (moderate amount)
  - Client History: 50 (new client)
  - Due Date: 15 (due in 28 days)
  - Reminders: 10 (none sent)
Recommended: Send an early reminder with a polite tone.

キャッシュフローレポートの生成

> Show me the cash flow report

April 2026:
  Total Invoiced: $12,400.00
  Collected: $8,200.00 (66.1%)
  Outstanding: $4,200.00
  Overdue: $1,800.00
  Projected (30d): $2,400.00

対応通貨

USD, EUR, GBP, CAD, AUD, JPY, CHF, TRY, BRL, INR


料金

プラン

価格

月間請求書数

機能

Free

$0

5

基本的なPDF請求書

Pro

$12/月

100

AIリスクスコアリング、スマートリマインダー、照合

Business

$29/月

500

多通貨、キャッシュフローレポート、優先サポート

MCPize Marketplace で利用可能です。


開発

npm run dev        # Hot reload
npm run build      # Production build
npm test           # Run tests
npm run inspect    # MCP Inspector

テスト

テストはコアビジネスロジックをカバーしています:

  • ストレージ — CRUD操作、フィルタリング、連番請求書番号

  • リスクモデル — 4つの加重要因を持つAIスコアリングエンジン、リスク分類

  • キャッシュフロー — レポート生成、回収率、予測、クライアント別内訳

npm test           # Run all tests
npx vitest --watch # Watch mode

Proライセンス

InvoiceFlowは Freeモード で提供されます。invoice_demo_seed、client_manage、invoice_create、invoice_list、invoice_mark_paid、invoice_remind はオープンです。以下のツールには Proライセンス が必要です:

  • invoice_send — PDF生成 + SendGridメール配信

  • invoice_risk — 支払い遅延リスク予測

  • payment_reconcile — Stripe/PayPal/銀行振込と請求書の照合

  • cashflow_report — ポートフォリオ全体のキャッシュフロー + 30日予測

Proライセンスを購入 (€12, 永続ライセンス, 3台まで): https://automatiabcn.lemonsqueezy.com/buy/2d439c05-f463-4137-8883-950e8ee1112d

または Indie MCP Stack Bundle (€69, 4サーバーすべて) を入手してください。

export LEMONSQUEEZY_LICENSE_KEY=YOUR-KEY-HERE

またはMCPクライアント設定にて:

{
  "mcpServers": {
    "invoiceflow-mcp": {
      "command": "npx",
      "args": ["-y", "invoiceflow-mcp-server"],
      "env": { "LEMONSQUEEZY_LICENSE_KEY": "YOUR-KEY-HERE" }
    }
  }
}

検証はローカルで24時間キャッシュされるため、初回実行後は完全にオフラインで動作可能です。


ライセンス

MITライセンス。詳細は LICENSE を参照してください。

Built by Automatia BCN。

Available Tools

10 tools
cashflow_reportCash Flow ReportA
Read-onlyIdempotent

Generate a portfolio-wide cash flow summary across all invoices. Returns {period, total_invoiced, total_collected, total_outstanding, total_overdue, collection_rate (percent), avg_days_to_payment (or null if no paid history), projected_income_30d (forecast based on due dates and historical pay rate), breakdown_by_status, breakdown_by_client}. Takes no input — always reports on the current full dataset. Ideal for dashboards and monthly close.

Inputs: no named parameters.

client_manageManage ClientA
Idempotent

Create or upsert a client record used by invoice_create. Accepts name, email, company, address, city, country, tax_id, phone, default_currency ("USD"|"EUR"|"GBP"|...) and notes. Returns the stored client object including the generated id (UUID), an empty payment_history (populated as invoices are paid), and timestamps. Safe to call repeatedly: if a client with the same email already exists, the existing record is returned unchanged.

Inputs: name (required), email (required), city, notes, +6 more.

invoice_createCreate InvoiceA
Idempotent

Create a new invoice for an existing client. Required: client_id (UUID) and line_items (non-empty array of {description, quantity, unit_price, tax_rate?, discount_percent?} — tax and discount are per-line). Optional: currency (defaults to the client's default_currency then USD), issue_date (YYYY-MM-DD or full ISO, defaults to today), due_date (same format, defaults to issue_date + 30 days), notes, and terms. Auto-calculates subtotal, discount_total, tax_total, and total; generates a sequential invoice_number in format INV-YYYY-NNNN; sets status="draft". Returns the full invoice object ready for invoice_send.

Inputs: client_id (required), line_items (required), notes, terms, +3 more.

invoice_demo_seedSeed Demo DataA

Populate the store with a realistic demo dataset: 8 clients across 5 archetypes (on-time, late-payer, high-value, new, chronic-late) and 25-45 invoices spanning the last 6 months (paid, sent, and overdue). Every invoice has line items, tax, payment history, and reminder metadata. Use this to evaluate InvoiceFlow via MCP Inspector without real Stripe, SendGrid, or PayPal credentials — invoice_list, cashflow_report, invoice_risk, and payment_reconcile all return meaningful results against the returned ids. Safe to call multiple times; each call appends a fresh batch with unique UUIDs. Returns counts plus sample_invoice_ids you can feed straight into invoice_risk or invoice_mark_paid.

Inputs: no named parameters.

invoice_listList InvoicesA
Read-onlyIdempotent

Search and filter invoices. Optional filters: status ("draft"|"sent"|"viewed"|"paid"|"overdue"|"cancelled"|"refunded"), client_id, min_amount, max_amount, date_from/date_to (ISO dates), overdue_only (boolean). Pagination via limit (default 50, max 200) and offset. Returns {total, invoices[]} where each invoice includes full line_items and payment state. Use this to build dashboards or drive invoice_remind/invoice_risk workflows.

Inputs: limit, offset, status, to_date, +5 more.

invoice_mark_paidMark Invoice PaidA

Record a full or partial payment against an invoice. Updates amount_paid and amount_due; sets status="paid" only when the outstanding balance reaches zero. As a side effect, a fully-paid invoice updates the client payment_history (total_revenue, paid_invoices, avg_days_to_payment, late_payment_count) which invoice_risk then uses for future predictions. Returns a confirmation with the paid amount and remaining balance.

Inputs: invoice_id (required), amount, payment_method.

invoice_remindRecord Payment ReminderA

Record that a payment reminder has been issued for an unpaid invoice. Increments reminder_count, sets last_reminder_at, and advances draft → sent. Returns the generated reminder message (custom or default) so the caller can relay it through their preferred channel — this tool itself does not send email; use invoice_send for actual delivery. Safely refuses to remind on already-paid invoices.

Inputs: invoice_id (required), message.

invoice_riskAssess Payment RiskA
Read-onlyIdempotent

Predict late-payment risk for a specific invoice on a 0-100 scale. The model combines invoice amount (relative to client average), client payment history (avg_days_to_payment, late_payment_count), days remaining until due date, and prior reminder_count. Returns {risk_score (0-100), risk_level ("low"|"medium"|"high"|"critical"), factors (array of {factor, impact, detail}), recommended_action (string), next_reminder_date (ISO string or null)}. Use for prioritizing collection effort on high-value invoices.

Inputs: invoice_id (required).

invoice_sendSend InvoiceA

Generate the invoice PDF and deliver it to the client. Always generates the PDF and marks the invoice status="sent". Email delivery via SendGrid is attempted automatically when the SENDGRID_API_KEY environment variable is set; without it the PDF is still generated and the status still advances so the caller can handle delivery out-of-band. Returns a confirmation message with the PDF size.

Inputs: invoice_id (required), message.

payment_reconcileReconcile PaymentA

Match an incoming external payment (e.g. Stripe webhook, PayPal IPN, bank transfer) to an open invoice. Matching rule: the payer_email must equal the invoice client_email (case-insensitive) AND the payment_amount must equal the invoice amount_due within one cent. On match the invoice is marked paid, amount_paid/amount_due are updated, and client payment_history is recomputed exactly like invoice_mark_paid. Returns a reconciliation message on match or a "no match" message otherwise (no error). If multiple invoices match, the first one is reconciled.

Inputs: payer_email (required), payment_amount (required), reference, payment_method.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool has a distinct purpose: portfolio summary, client management, invoice creation, demo seeding, invoice listing, payment recording, reminder tracking, risk prediction, PDF generation/delivery, and external payment reconciliation. No functional overlap exists.

    Naming Consistency3/5

    Most tools follow a noun_verb pattern (e.g., invoice_create, invoice_list), but invoice_risk and invoice_demo_seed deviate (noun_noun and noun_noun_verb), and cashflow_report could be interpreted as compound noun. Inconsistent imperative style.

    Tool Count5/5

    10 tools is well-scoped for an invoicing system, covering core workflows (client, invoice, payment, report, risk) without unnecessary bloat.

    Completeness3/5

    Missing client listing/deletion and invoice update/deletion; lacks refund handling. Demo seeding and risk tools add value, but CRUD gaps may cause agent failures in some workflows.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Turn Claude, Cursor, and your AI agents into an autonomous CFO. Manage invoicing, expenses, real-time bank reconciliation, cash flow, and tax compliance in plain language — backed by Frihet ERP.
      100
      505 npm
      13
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables MCP clients to search and inspect an invoice ledger, generate VAT summaries, run OCR on local documents, and use reusable prompts for chasing overdue invoices and reconciling entries.
      2
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents and finance teams to extract structured fields from messy invoices and audit them before payment, applying seven evidence-backed risk rules that catch total/tax mismatches, duplicate invoices, missing fields, future dates, and round amounts, then returning a 0–100 score with a payment link. Exposes four MCP tools over stdio and Streamable HTTP (spec 2025-11-25) plus a web UI, backed by an optional AWS Bedrock or OpenAI-compatible extraction brain that degrades gracefully to a zero-dependency offline engine.
      MIT