npm install @botmetria/ucp
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 parsersThe 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 envproducts (list/get, sync or async) — agents see the catalog, the manifest reports checkout:false.
cart.fill(items, ctx) — full agent checkout with a signed hand-off into your native cart.
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