Node.js: the @botmetria/ucp SDK

WooCommerce and a feed storefront — 15 minutes · SDKs — about an hour · 4 ways · not just WordPress

Express or plain node:http — agentic commerce and analytics install as one npm package. MIT, zero dependencies, Node ≥ 18.

Install

npm install @botmetria/ucp

Quick start

Mount the middleware first, before routes and body parsers:

const { Ucp, expressMiddleware } = require("@botmetria/ucp");

const ucp = new Ucp({
  store_name: "My Shop",
  store_url: "https://my-shop.com/",
  currency: "EUR",
  products: myProducts,   // { list(offset, limit), get(id) } — sync or async
  // cart: myCart,        // { fill(items, ctx) } — agent checkout
});

app.use(expressMiddleware(ucp)); // first, before routes and body parsers

Bonus: analytics in the same package

The second entry point is the AI-bot collector: counting with IP verification plus blocking by the rules you set in the dashboard.

const { middleware } = require("@botmetria/ucp/collect");
app.use(middleware()); // BM_SITE / BM_KEY / BM_SECRET from env

Two levels — one package

Storefront (catalog only)

products (list/get, sync or async) — agents see the catalog, the manifest reports checkout:false.

Full checkout

cart.fill(items, ctx) — full agent checkout with a signed hand-off into your native cart.

Verify

The manifest on your domain plus the live purchase demo:

curl https://your-store.com/.well-known/ucp

Package and sources: npm · GitHub · UCP spec & self-hosting