
Supplier Invoice Matching
io.github.theluckystrike由 GitHub 账号 theluckystrike 发布v0.22.8更新于 Oct 30, 2026
Match supplier invoice lines against purchase orders and accepted receipts by SKU, locally.
概览
本地 MCP 服务器,按精确 SKU、单价和数量将供应商发票与采购订单及已验收收货单进行三方核对。
- 可以做什么
- 对一张采购订单、其收货单和一张发票执行三方匹配,需提供此前已开票数量,并返回逐 SKU 的异常。
- 列出、读取、分页查看和删除已保存报告,包含完整来源凭证与问题代码。
- 将已保存报告的逐 SKU 凭证导出为 CSV 文本,大批量导出可分页。
- 离线查询免费/Pro 授权状态并激活 Pro 密钥。
- 适用场景
- 适用于你已有结构化的采购订单、收货单和发票数据,希望发现数量、价格或未知 SKU 不符,包括总额相同但相互抵消的错误。它不用于提取 PDF、连接 ERP 或审批付款。
- 运行要求
- 通过 stdio 在本地运行;Claude Desktop 可安装 .mcpb 包,其他客户端需从源码检出并用 Node.js 18 或更高版本构建(npm 包未发布)。免费工具无需账号或 API 密钥;可选的 MCP_LICENSE_KEY 用于启用 Pro。保存的报告写入本地数据目录。
安装
在 SourceWeft 中
- 打开 控制台中的 Supplier Invoice Matching,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Three-way supplier invoice matching MCP server
Check a supplier invoice against its purchase order and delivery receipts in Claude or another MCP client. This local server compares each exact SKU, unit price and billed quantity with the PO, cumulative accepted deliveries and quantities you say were already invoiced. It catches offsetting SKU mistakes even when the invoice and PO grand totals agree, and returns the source values behind every exception. Supply structured documents; this server does not extract PDFs, perform OCR, connect to an ERP, post payments or approve an invoice.
Built by theluckystrike. MIT. Support: [email protected].
Try it before installing
Run the free three-way matching example in your browser. Edit the synthetic PO, receipt and invoice fields to see per-SKU exceptions. The example runs locally in your browser without an account or uploads. Product details and installation options.
Both servers include their full diagnostics and CSV evidence for free. Pro removes the limit of three saved reports; the $39 bundle covers both. Neither tool approves payment or retrieves missing accounting history.
Install
Claude Desktop: download three-way-match.mcpb v0.22.8 and open it. SHA-256: 6397928ec44ea9d5c406a66f4eb7aa9a2f34f5731bf8ef9972fadfdac882f040. Other clients can use the source instructions below.
Requires Node.js 18 or newer. Build from the source checkout; the npm package is not published. No API key or account is required to run the free tools.
Use the absolute path to servers/three-way-match/dist/index.js in your checkout. The server speaks stdio; your MCP client starts it. Do not put an HTTP URL in its place.
Claude Desktop: merge this entry into mcpServers in ~/Library/Application Support/Claude/claude_desktop_config.json on macOS (or %APPDATA%\Claude\claude_desktop_config.json on Windows), replacing /absolute/path with your checkout location:
Claude Code:
Cursor: merge the same JSON into .cursor/mcp.json in your project or ~/.cursor/mcp.json. Restart your client, call license_status, then run the example below. A tools/list result alone does not verify matching.
For Claude Desktop, download three-way-match.mcpb and open it to install. SHA-256: 6397928ec44ea9d5c406a66f4eb7aa9a2f34f5731bf8ef9972fadfdac882f040. This is a local stdio server; no hosted endpoint is available.
Tools
Input contract
One PO and one current supplier invoice per call. There is no fuzzy matching: SKU, supplier and PO references are exact, case-sensitive strings, with no surrounding whitespace or control characters. Document references and SKUs are 1–120 characters. PO, invoice and receipt document references must be distinct. Duplicate SKUs within a document or within prior_invoiced, and duplicate receipt references, produce invalid; ambiguous rows are excluded from comparison. Repeated SKUs across different receipt documents are expected and accumulate.
Quantities are whole units from 0 to 1,000,000,000; PO and invoice line quantities must be positive. Fractional quantities are rejected. accepted_quantity and rejected_quantity are disjoint counts, not a gross count and its subset. Rejected units never increase the quantity available to invoice. Receipts must carry valid YYYY-MM-DD dates; include only receipts relevant to this check. Dates are evidence, not an automatic invoice-date cutoff.
Every monetary input is an integer minor-unit amount from 0 to Number.MAX_SAFE_INTEGER (9,007,199,254,740,991). For USD, 100 means $1.00; for a zero-decimal currency use its own minor units. Supply the uppercase three-letter currency code on both PO and invoice. No currency conversion or currency-code catalog lookup occurs. Unit prices must match exactly, with no tolerance. Money products and totals use integer arithmetic; unsafe results produce invalid with unsafe_money_arithmetic, never a rounded amount.
invoice.total_minor is the total of the supplied goods lines. There are no implicit tax, freight, discount, rounding or credit adjustments. Represent agreed charges as explicit priced PO/invoice SKUs and appropriate receipt evidence, or prepare an excluding-adjustments goods total before calling. Do not supply an all-in invoice total while omitting its adjustments.
prior_invoiced is required, even when empty. Supply the complete cumulative quantities previously billed for each SKU against this PO, excluding this current invoice. [] explicitly asserts none. Current plus prior quantities must fit both accepted receipts and the PO. Saving reports does not update this history or detect repeated invoice references across checks; incorrect or omitted history can allow repeat billing to go undetected. Reports are evidence snapshots, not an accounting ledger.
Bounds apply equally to free and Pro: 1–500 PO lines, 1–500 invoice lines, up to 500 prior SKUs, and up to 100 receipts of 1–500 lines each. An empty receipts array is valid and produces missing-receipt exceptions for billed PO SKUs. Empty or malformed references, blank/missing SKUs, decimals, unsafe input numbers and invalid dates are rejected as input errors. Unknown SKUs are explicit unordered_sku exceptions.
Equal totals can hide SKU errors
Call three_way_match with:
The report has status: "exceptions", despite equal 2,000-minor-unit PO/invoice totals and equal aggregate quantities. SKU A has invoiced_above_accepted (10 billed, 5 accepted); SKU B has accepted_above_order (15 accepted, 10 ordered). Changing invoice unit prices to 90 for A and 110 for B also preserves the grand total but produces two unit_price_mismatch issues.
Partial deliveries can match
Using the same PO, supply a receipt containing only A with accepted_quantity: 4, rejected_quantity: 2. Invoice only A with quantity: 4, unit_price_minor: 100, total_minor: 400, and keep prior_invoiced: []. This returns matched. A has six units still undelivered; B need not appear on this partial invoice. A second matching receipt adds its accepted quantity; rejected quantities remain separate evidence. After previously billing two A units, supply prior_invoiced: [{"sku":"A","quantity":2}] and bill at most two more against those four accepted units.
Reading the report
matched means the supplied evidence passes these exact checks; it does not authorize payment. exceptions identifies document mismatches, unknown SKUs, missing receipts, excessive accepted/billed quantities, price differences or an inconsistent declared invoice total. invalid identifies ambiguity or unsafe computed money; resolve it before interpreting the comparison. Mismatched receipt PO/supplier references are flagged and those receipts do not support billing.
Every issue has code, severity, source, optional sku, and a concrete message. Each sorted SKU row includes PO/invoice one-based source line numbers; ordered, accepted, rejected, prior and current invoice quantities; both unit prices; cumulative billed quantity; available quantity before this invoice; remaining undelivered quantity; receipt references/line numbers and inclusion flags; and issue codes. The report retains the complete supplied documents, so a duplicate row never disappears from the audit evidence. Partial shortages are shown as remaining quantities and do not themselves fail a supported partial invoice.
Small reports return inline. A report whose escaped MCP response would exceed 8 MiB returns an explicit paginated: true overview with status, totals, counts, source document headers and report_id. All evidence remains free through report_page. Select section from issues, lines, po_lines, invoice_lines, prior_invoiced, receipts, receipt_lines or line_receipts; use offset (default 0) and limit (default 100, maximum 100), following next_offset until null. lines pages contain scalar evidence and receipt_count; get those receipt entries with line_receipts and the exact sku. receipt_lines requires the zero-based receipt_index from the original receipt array. receipts pages contain document headers and line counts. Together these sections preserve every source row and every computed issue.
Saved reports use their persistent UUID for pages, and report_get returns the same bounded overview for large saved reports. Large unsaved reports, including save-cap and storage failures, use preview:<UUID> IDs: the process keeps its last two large previews for 30 minutes. Restart, expiry or a third preview can evict them; resubmit the original diagnostic to recreate the free preview. Preview IDs belong to the current running server process. The underlying SDK also limits incoming stdio messages to 10 MiB; encoded requests must fit that transport limit even when individual row counts fit the schema.
CSV includes one row per SKU, exact minor-unit prices, quantities and line issue codes; document issues remain in the accompanying JSON and full report. CSV is returned as text, not written to an arbitrary caller-supplied path. Formula-like leading characters are escaped for spreadsheet use.
CSV exports that fit the same 8 MiB response budget stay inline. Larger exports return a first chunk of up to 1,000 rows with paginated, offset, returned, total_rows and next_offset. Pass that next_offset as offset in another report_export_csv call; optional limit is 1–1,000. Every chunk repeats the header; retain one header when combining chunks.
Free and Pro
When save: true hits the free cap, the full report is still returned with saved: false, save_error: "free_saved_report_cap" and the checkout link. A storage error likewise preserves the diagnostic report. Delete an old saved report to reuse a free slot. A saved report file is limited to 64 MiB when saved and read; this is a storage integrity guard, not a Pro limit.
Get Pro: $19 one time. All servers: $39 bundle. Activate the key with license_activate or set MCP_LICENSE_KEY. Keys verify offline.
All data stays local. Matching makes no network requests. Saved JSON reports live under ${XDG_DATA_HOME:-~/.local/share}/mcp-servers/three-way-match/; XDG_DATA_HOME must be absolute and the storage directory ancestry must not contain symlinks. Files use atomic rename and mutations share a cross-process lock. Reports include commercial document data: manage local access and backups accordingly. License activation writes the shared local license config.
Development
Tests exercise offsetting quantity/price errors, rejected and multiple receipts, partials, explicit prior billing, unknown and duplicate SKUs/references, currency/PO/supplier mismatches, dates, integer boundaries, free/Pro save policy, atomic storage and an MCP stdio initialization/tools/call round trip. Docker builds from the repository root with docker build -f servers/three-way-match/Dockerfile ..
来源:servers/three-way-match/README.md,提交 0983f9c
工具
0版本历史
2- v0.22.8最新Oct 16, 2026
- v0.22.6Oct 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分