@acjlabs/receipt-extraction-client
v0.1.6
Published
AU GST/ABN-aware receipt & invoice extraction — applies documented AU entertainment/ITC tax-code rules per line item, returning a tax_code, a confidence and a rationale for each, not just OCR text. Typed TypeScript client for the ACJ Labs MCP server; call
Maintainers
Readme
@acjlabs/receipt-extraction-client
AU GST/ABN-aware receipt & invoice extraction — applies documented AU entertainment/ITC tax-code
rules per line item, returning a tax_code, a confidence, and a one-line rationale for each, not
just OCR text. Typed TypeScript client for the ACJ Labs Receipt Extraction
MCP server — call extract_receipt without wiring up a full MCP client yourself.
npm install @acjlabs/receipt-extraction-clientUsage
import { createReceiptExtractionClient } from "@acjlabs/receipt-extraction-client";
const client = createReceiptExtractionClient({
baseUrl: "https://receipt-extraction.acjlabs.com", // no trailing slash, no "/mcp"
apiKey: "your-api-key",
});
const receipt = await client.extractReceipt(base64EncodedImageOrPdf, "image/png");
// receipt: { schema_version, vendor: { name, abn, abn_valid }, date, line_items, totals }https://acjlabs-receipt-extraction.acjlabs.workers.dev is an alternate base URL for the same
deployment and keeps working — if you already have it configured, nothing needs to change.
extractReceipt throws if extraction/normalization fails for the document (a malformed image, a
vision-provider error) — there is no partial result to fall back to (the service processes one
document per call).
Design notes
- Only runtime dependency is
@modelcontextprotocol/sdk— installing this client doesn't pull in the server's own dependencies transitively. - Connects fresh per call. The server's MCP transport is stateless (no session state is kept between HTTP requests), so there's no session worth holding open between calls.
- Types (
Receipt,Vendor,LineItem,Totals,TaxCode) are hand-kept in sync with the server's wire schema — not imported from the server package, on purpose (see the dependency note above).
Scope
Each line item's tax_code is the code the service's documented rule set assigns, with the rule it
applied named in rationale so you can check the call rather than just take it. GST handling reflects
publicly documented Australian tax law and is provided as software output, not tax advice.
