po-pilot-mcp
v1.0.0Post-Stocky Shopify replenishment, MOQ Purchase Order generator, and 3-way invoice match MCP.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
calculate_replenishment_plan Calculate Stockout-Adjusted Replenishment & Reorder Points
Replaces Shopify Stocky's retired forecasting brain. Computes margin-weighted ABC classes, stockout-adjusted daily sales velocity, demand + lead-time variability safety stock (SS = Z * sqrt(LT*sigma_d^2 + d^2*sigma_LT^2)), reorder points, inventory position (On-Hand + On-Order - Committed - Backorders), days of cover, and carton-rounded order recommendations. Free Local Sandbox processes up to 25 SKUs per call; Pro/License unlocks unlimited SKUs and Live Shopify sync.
| Parameter | Type | Description |
|---|---|---|
demo_mode | boolean | Run immediately against the built-in US Shopify merchant dataset (no API keys required). |
inventory_csv | string | Raw CSV exported from Shopify Admin Products or merchant reorder spreadsheet. |
review_period_days | integer | Days between purchasing review cycles (e.g., 7 for weekly, 14 for bi-weekly). |
service_level | string | Target cycle service level used for Z-score safety stock calculation (85%=1.04, 90%=1.28, 95%=1.65, 97.5%=1.96, 99%=2.33). |
skus | array | Structured SKU inventory + velocity rows. |
supplier_rules | array | Optional supplier rules (e.g. from migrate_stocky_csv_snapshot) to apply vendor lead_time_days overrides. |
use_live_shopify | boolean | Pull live variants and paid order velocity from configured Shopify Admin GraphQL API (Pro / License). |
window_days | integer | Lookback window in days when parsing CSV or querying live Shopify orders. |
build_supplier_purchase_orders Build MOQ-Compliant Supplier POs, Landed Costs, OTB & Shopify PO/Transfer CSVs
Turns SKU demand signals into ready-to-send Purchase Orders grouped by vendor. Enforces carton/case-pack multiples, per-SKU MOQs, supplier-level minimum units/USD thresholds (topping up A-class SKUs first), US import tariff + freight landed unit costs with margin-erosion alerts, and optional Open-to-Buy (`max_cash_budget_usd`) cashflow rationing. Outputs ready-to-import Shopify Native Draft PO CSV (`SKU,Supplier SKU,Quantity,Cost,Tax %`), Shopify POS Inventory Transfers CSV (`SKU,Barcode,Quantity`), and formatted vendor PO emails.
| Parameter | Type | Description |
|---|---|---|
default_import_duty_pct | number | Fallback US import tariff / customs duty % when not specified on a vendor's supplier_rules entry. |
demo_mode | boolean | Generate full multi-vendor POs using the built-in Austin, TX merchant demo dataset. |
inventory_csv | string | Raw Shopify Products/Inventory CSV text. |
max_cash_budget_usd | number | Optional Open-to-Buy (OTB) maximum landed cash spend ceiling in USD across all generated POs. Trims lowest-priority C/B cartons first while protecting CRITICAL A-class SKUs. |
min_gross_margin_pct | number | Minimum acceptable landed gross margin % before triggering `margin_erosion_warning: true` on a PO line. |
po_prefix | string | Prefix for generated Purchase Order numbers. |
review_period_days | integer | Days of forward cover to buy beyond lead time. |
service_level | string | Target cycle service level used for Z-score safety stock calculation (85%=1.04, 90%=1.28, 95%=1.65, 97.5%=1.96, 99%=2.33). |
skus | array | Structured SKU inventory + velocity rows. |
supplier_rules | array | Per-vendor MOQ, minimum USD spend, import tariff %, freight USD, lead time override, payment terms, email, and ship-to location rules. |
use_live_shopify | boolean | Pull live store SKUs and barcodes from Shopify Admin GraphQL (Pro / License). |
reconcile_po_three_way_match Audit PO vs Receiving vs Supplier Invoice (3-Way Match + QuickBooks/Xero CSVs)
Deterministic Finance Ops 3-way match engine for wholesalers and Shopify merchants. Cross-examines approved Purchase Order lines, warehouse dock receiving counts (good vs damaged units), and billed supplier invoice lines to catch silent unit-price creep, short-shipments billed in full, unapproved surcharges, and freight cap overages. Emits ready-to-import QuickBooks Online (`quickbooks_bill_csv`) and Xero (`xero_bill_csv`) Purchase Bill CSVs containing ONLY verified payable quantities and unit costs, plus a vendor Debit Memo email. Free Local Sandbox audits up to 15 invoice lines per call; Pro…
| Parameter | Type | Description |
|---|---|---|
agreed_freight_cap_usd | number | Maximum freight/shipping charge agreed on the PO, if applicable. |
currency | string | 3-letter ISO currency code for QuickBooks/Xero export. |
demo_mode | boolean | Run a realistic 3-way match audit catching silent price creep, damaged units, and unapproved pallet fees. |
due_date | string | Bill due date in YYYY-MM-DD format (defaults to Net 30 from invoice_date). |
invoice_date | string | Invoice date in YYYY-MM-DD format (defaults to today UTC). |
invoice_extra_fees_usd | number | Freight, pallet, or handling charges billed on the invoice. |
invoice_lines | array | Billed lines extracted from the supplier PDF/CSV invoice. |
invoice_number | string | Supplier invoice number for QuickBooks/Xero Bill CSV export (defaults to INV-<po_number>). |
po_lines | array | Approved Purchase Order line items. |
po_number | string | Purchase Order reference number. |
qbo_expense_account | string | QuickBooks Online expense/COGS account name (defaults to 'Cost of Goods Sold'). |
receiving_lines | array | Warehouse receiving counts per SKU. |
vendor | string | Vendor or distributor name. |
xero_account_code | string | Xero chart-of-accounts code for inventory/COGS lines (defaults to '310'). |
migrate_stocky_csv_snapshot Recover Supplier Directory, Real Lead Times & MOQs from Stocky PO CSV
Shopify Stocky shut down on August 31, 2026 and never provided a Supplier Directory export. Paste a historical Stocky Purchase Orders CSV export (or pass `demo_mode: true`) and this tool reconstructs every supplier profile: actual observed lead-time average and standard deviation from Created-to-Received timestamps, latest SKU unit cost, GCD-inferred carton pack sizes, historical minimum PO spend, and ready-to-use `supplier_rules` JSON for `build_supplier_purchase_orders`.
| Parameter | Type | Description |
|---|---|---|
demo_mode | boolean | Test supplier reconstruction using the built-in Stocky PO CSV fixture. |
stocky_po_csv | string | Raw CSV content from Stocky Purchase Orders export. |