If you have ever tried building an automated deal-finder for commercial liquidation, estate, or surplus equipment auctions across North America (such as HiBid), you run into three practical engineering traps almost immediately:

  1. Hidden All-In Cost Distortion: A "$100" current bid with an "18% Buyer's Premium + 3% CC", 8% local sales tax, and $25 shipping is actually $152.44 landed — wiping out thin resale margins if your script only filters on hammer price.
  2. Hourly Cron Deduplication Burn: Polling active auctions every hour without persistent state re-processes (and re-alerts on) the exact same 95% of lots 24 times a day.
  3. Headless Browser Overhead: Spawning Chromium just to read public auction catalogs burns 1–2 GB of RAM when the underlying catalog is backed by structured GraphQL.

Here is how we solved all three in clearbid-toolkit (MIT-licensed, zero external npm dependencies) and exposed it as a native stdio Model Context Protocol (MCP) server for Claude Desktop, Cursor, and n8n.

1. Parsing Free-Text Buyer's Premium Schedules & Solving the Inverse Max-Bid Formula

Every independent auction house writes its Buyer's Premium schedule differently: "15% Buyer's Premium", "18% BP", or "No Buyer's Premium Sale".

Once normalized into bp (%), most scripts stop at computing forward landed cost. What resellers and sourcing agents actually need is the inverse formula: given a known eBay/Amazon sold comp ($R$), marketplace selling fee ($f$, e.g., 13%), shipping ($S$), tax ($t$), and your minimum acceptable net ROI ($r$, e.g., 35%), what is the exact maximum hammer bid ($H_{\max}$) you can place?

export function calculateMaxSnipingBid({ expectedResalePrice, buyerPremiumPct = 15, salesTaxPct = 0, shippingCost = 0, resaleFeePct = 13, minRoiPct = 35 }) { const netProceeds = expectedResalePrice * (1 - resaleFeePct / 100); const maxLandedCost = netProceeds / (1 + minRoiPct / 100); const multiplier = (1 + buyerPremiumPct / 100) * (1 + salesTaxPct / 100); const maxHammerBid = Math.max(0, Math.floor(((maxLandedCost - shippingCost) / multiplier) * 100) / 100); return { expectedResalePrice, netProceedsAfterFees: Math.round(netProceeds * 100) / 100, maxLandedCost: Math.round(maxLandedCost * 100) / 100, maxHammerBid }; } 

For example, on a generator that sells for $500 on eBay (13% fee -> $435 net proceeds) with $25 shipping, 15% Buyer's Premium, and a 40% minimum ROI target, your hard ceiling hammer bid is $248.44 — not $300+.

2. Zero-Dependency Stdio MCP Server (clearbid-mcp)

Instead of pulling heavy framework dependencies for a lightweight tool server, mcp/server.js implements JSON-RPC 2.0 over stdin/stdout directly in ~200 lines of pure Node.js ESM.

Crucially, it boots without requiring API credentials at startup so offline tools (calculate_auction_max_bid and score_rfp_bid_no_go) work out-of-the-box, while live cloud catalog queries connect to clearbid-data/hibid-auctions-lots-scraper when APIFY_TOKEN is configured:

{ "mcpServers": { "clearbid-mcp": { "command": "npx", "args": ["-y", "--package=github:buffq/clearbid-toolkit", "clearbid-mcp"], "env": { "APIFY_TOKEN": "YOUR_APIFY_TOKEN" } } } } 

Once connected to Claude Desktop or Cursor, you can ask:

"Find open inverter generator or Milwaukee tool lots on HiBid closing within 24 hours with shipping offered under $120 current bid, then calculate my max profitable hammer bid assuming a $380 resale comp and 35% target ROI."

3. Stateful Hourly Deal Sniping in n8n Without Duplicate Alerts

For scheduled background monitoring, the toolkit includes a ready-to-import workflow (workflows/hibid-hourly-deal-sniper.json):

  • Pre-Enrichment Filtering: Filters closingWithinHours: 24, maxCurrentBid, shippingOfferedOnly: true, and negative terms (["broken", "for parts", "manual only"]) before fetching lot detail galleries.
  • Persistent Cross-Run Deduplication (onlyNewSinceLastRun: true): Stores delivered lotIds in a named Key-Value Store so when an item enters the final 24-hour sniping window below your ceiling price, Slack/Telegram pings you once and skips it on subsequent hourly ticks.
  • Historical Sold Comps (status: "closed"): Switch status to "closed" to benchmark actual priceRealized hammer prices before bidding.

Source & Ready-to-Use Templates

Everything in the client toolkit, CLI, offline calculators, MCP server, and n8n JSON templates is open-source under MIT:

Happy sniping — feedback or PRs for additional public surplus/procurement adapters are always welcome!