Documentation /docs/invoice-po-reconciliation-mcp

Reconcile invoices, purchase orders, and receipts

Docspeed's compare tool compares two or three uploaded documents using a shared schema. It calls Extract with grounding enabled, then preserves the Extract-provided region_ids and grounding_regions. That gives an agent both the differences and the source evidence to show a human reviewer.

One-line connection

Set DOCSPEED_API_KEY privately before launching your terminal client. For Codex:

codex mcp add docspeed --url https://api.docspeed.ai/mcp/ --bearer-token-env-var DOCSPEED_API_KEY

For Claude Code:

claude mcp add --transport http --scope project docspeed https://api.docspeed.ai/mcp/ --header 'Authorization: Bearer ${DOCSPEED_API_KEY}'

Start a fresh session, approve the connection, and follow the setup guide for the skill and timeouts.

Request a reviewable comparison

“Compare this invoice with this purchase order. Check quantities, unit prices, tax, totals, and identifiers. Show the source evidence for each discrepancy; do not approve a payment.”

Upload the two documents with the direct streaming upload helper; reserve files_upload for tiny inputs at most 4 KiB. Then call compare with their two distinct file_ids and schema: "auto". Supply three IDs for a three-document comparison. A full Docspeed schema can replace "auto" when the fields to compare are already known. Compare does not accept free-form instructions or a Compare-specific OCR grounding pass.

Inspect missing, similar, and differing values rather than treating every result as a binary accounting verdict. Grounding explains where values came from; it does not authorize payment or establish contractual validity.

Recorded evidence and repeatable fixtures

The recorded invoice extraction shows the evidence contract used by Extract. This is not a recording of the comparison recipe above. The public agent-tools repository contains the companion package. Recipe prompts and expected checks are not measured comparison outcomes.

For repeatable automation, the available Docster tools can clarify, build, validate, and invoke a reusable workflow. Claim a completed build only when docster_status reports ready. Build and invocation use your account's normal balance and quotas; they can fail explicitly.

PDF and common document images are supported. Native DOCX/XLSX requires separate beta access. Uploading sends documents to Docspeed; use authorized sources and review privacy. See Compare, invoice extraction, cited questions, and support.