Tote
On this page (10 sections)
Tote is an open-source shopping agent on Shopify's Universal Commerce Protocol (UCP). It searches the Global Catalog, compares offers against the buyer's constraints, builds a cart, and hands off to the merchant's checkout. Tote never pays and never handles card data.
Install
Node 22.19 or newer.
With npx
Not published yet. After the first release (see scripts/release.md):
npx -y tote-agent web
npx -y tote-agent ask "Men's running shoes, size EU 43, under 120 EUR" --ships-to PL
npx -y tote-agent search "trail running shoes"
The npm package is tote-agent; the command it installs is tote. The published
packages read .env from the current directory only (variables already set in the shell
win). Put the variables from Setup there.
The MCP server is the tote-mcp package. For Claude Code:
claude mcp add --transport stdio tote -- npx -y tote-mcp
or in .mcp.json, forwarding the variables from your shell by name so no value is
written into the file:
{
"mcpServers": {
"tote": {
"type": "stdio",
"command": "npx",
"args": ["-y", "tote-mcp"],
"env": {
"TOTE_AGENT_PROFILE_URL": "${TOTE_AGENT_PROFILE_URL}",
"SHOPIFY_CLIENT_ID": "${SHOPIFY_CLIENT_ID}",
"SHOPIFY_CLIENT_SECRET": "${SHOPIFY_CLIENT_SECRET}",
"TOTE_BUYER_IP": "${TOTE_BUYER_IP}"
}
}
}
}
Other hosts and the HTTP transport: packages/mcp/README.md.
The libraries are tote-agent-core (UCP client) and tote-agent-loop (agent loop and
tools).
From source
git clone https://github.com/s7aciwa/tote.git
cd tote
npx -y pnpm@10.20.0 install
cp .env.example .env
node packages/cli/bin/tote.js web
From source there is no build step: packages/cli/bin/tote.js and
packages/mcp/bin/tote-mcp.js run the TypeScript source, and read .env from the current
directory, then from the repo root. Inside the repo the packages keep their workspace
import names (@tote/core, @tote/agent); pnpm --filter takes the npm name, for
example --filter tote-agent.
Example
From the repo root, after setup:
node packages/cli/bin/tote.js ask "Men's running shoes, size EU 43, under 120 EUR" --ships-to PL
This is the text layout that command prints. The shop names are examples. The merchant
link is a placeholder: a real continue_url is shown only on a terminal, or with
--show-handoff, and it is never printed here. Size = 43 is the label; the size
system EU is still checked. This request names no quantity, so a one-line cart gets 1.
Constraints Tote checks:
[1] ships to PL
[2] price <= 120.00 EUR
[3] Size = 43
Note: Delivery to your country is confirmed by the merchant after you enter your address at checkout. Tote cannot check it before that, so offers marked satisfies_pending_shipping meet every other constraint.
TITLE PRICE SHOP VERDICT [1] [2] [3]
Trail Runner Pro 89.99 EUR example-running.myshopify.com satisfies_pending_shipping at checkout met met
Trail Runner Max 129.99 EUR example-running.myshopify.com violates at checkout UNMET met
Trail Runner Pro 89.99 EUR example-shoes.myshopify.com violates at checkout met UNMET
Answer:
Trail Runner Pro, size EU 43, 89.99 EUR.
Next step:
example-running.myshopify.com: cart ready, finish at the merchant.
https://<merchant link>
The same command through pnpm:
npx -y pnpm@10.20.0 --silent --filter tote-agent tote ask "Men's running shoes, size EU 43, under 120 EUR" --ships-to PL
tote search prints one row per variant (title, price, shop, available) and does not
build a cart. --json on either command never contains the merchant link. Exit codes:
0 when an offer meets every constraint (search: offers found), 1 when none does, 2 for
bad flags or configuration, 3 for a UCP, model, or run error.
Three ways to use it
- CLI:
tote askandtote search, as above. From source there is no build step:packages/cli/bin/tote.jsruns the TypeScript source on Node 22.19 or newer. The npm packagetote-agentships built JavaScript. - MCP server:
start_request(the buyer's words, parsed into constraints and quantity) plus the five agent tools (search,get_product,compare,build_cart,start_checkout) for a host such as Claude Code, Codex, or Gemini CLI. The host model never sees the merchant link: the buyer gets a one-time local link on 127.0.0.1. See packages/mcp/README.md. - Skill: one
skills/tote/folder for Claude Code, Codex CLI, and Gemini CLI. See skills/README.md.
tote web
tote web serves a local page for the same agent run as tote ask, for use in a browser
instead of a terminal. It is not a hosted service.
node packages/cli/bin/tote.js web
It prints one address, for example http://127.0.0.1:44319/<token>/, and opens nothing by
itself. Open that address in a browser on the same machine. Stop it with Ctrl+C.
- It listens on 127.0.0.1 only, on a free port, or on
--port <n>(1024 to 65535). - The address holds a random session token made at each start. Any request without it gets 403. Do not share the address.
- The Host header must be
127.0.0.1orlocalhostwith that port, and the page's own requests must carry its Origin. There are no CORS headers. - The page opens on the Browse tab: a search box with optional max price, currency and ships-to filters. It calls the catalog search directly: no model and no cost. Results show as cards (image, title, price, seller name and the seller's public domain, or "Shopify store" when the catalog gives none, two lines of description, rating when present, and a "View offer" link to the product page), 24 per page with "Load more".
- Each Browse card has "Add to cart": an option select when the product has several
offers, and a quantity from 1 to 10. The cart panel lists the picked items grouped by
shop, with the seller's name and domain, a subtotal per currency (prices are never
converted) and a remove button per item. "Go to cart at <seller>" creates that shop's
cart with exactly those items and opens it at the merchant in a new tab. No model is
involved. The picked items live in the open page only; reloading the page empties the
cart. Only products the Browse search returned in this run of
tote webcan be added, and at most 10 carts a minute are created. - The Ask tab shows progress (search, compare, cart), the answer, notes and one card per compared offer with a mark per constraint: met, UNMET, unknown, or at checkout. Each handoff has "Go to cart", and "Go to checkout" when the agent started a checkout.
- Every "Go to cart" and "Go to checkout" opens the merchant's own link (the
continue_urlthat Shopify returns) in a new tab with one click. The link is fetched only on that click, is never shown on the page, and is never printed to the terminal, logged, or included in the progress stream. Tote never builds cart links itself and never pays: you finish and pay at the merchant. If the browser blocks the new tab, allow pop-ups for the page. - Product text is shown as text, never as HTML. The page loads its own files and, for
product images, only
https://cdn.shopify.com(enforced by its Content Security Policy). It makes no other outside requests. Catalog results are not stored or cached beyond the open page. - Settings are the same as
tote ask:.env,TOTE_MODEL,TOTE_BUYER_IP,TOTE_SHIPS_TO, and the flags--model,--buyer-ip,--ships-to,--max-steps,--max-tool-calls,--timeout. Missing configuration stops it at start with exit code 2. - One request runs at a time. Nothing is kept after it stops: no accounts, no history, no telemetry.
- The page never accepts a constraint gap. Use
tote askon a terminal for that.
Setup
Node 22.19 or newer. From the repo root:
npx -y pnpm@10.20.0 install
cp .env.example .env
The CLI reads .env from the current directory, then from the repo root. A variable
already set in the shell wins. Names below match .env.example and
packages/cli/README.md.
| Variable | Where it comes from |
|---|---|
SHOPIFY_CLIENT_ID, SHOPIFY_CLIENT_SECRET | Shopify Dev Dashboard: Agents, Agent identities, New identity. Set both or neither. Neither means the Anonymous tier: catalog and cart work, checkout does not. |
TOTE_AGENT_PROFILE_URL | Required on every catalog, cart, and checkout call. Publish profile/tote-agent.json at an https URL whose Content-Type is application/json, then put that URL here. A GitHub gist raw URL is text/plain and Shopify rejects it. gist.githack.com, GitHub Pages, or your own domain can serve it. |
TOTE_BUYER_IP | Your own current public IP. Required at the Token tier for cart and checkout. Tote does not look it up. Loopback, private, and link-local addresses are refused, and the value is never printed. |
TOTE_MODEL | provider:model, unless you pass --model. The key for each provider is in the rows below. |
ANTHROPIC_API_KEY | Anthropic key for anthropic:claude-sonnet-5-5 or anthropic:claude-haiku-5-5. |
OPENAI_API_KEY | OpenAI key for openai:gpt-6.1-sol or openai:gpt-6-luna. |
GOOGLE_API_KEY, GOOGLE_API_TIER | Google key, and GOOGLE_API_TIER=paid, for google:gemini-3.8-flash or google:gemini-3.5-flash-lite. Tote does not run on a free-tier key. |
OPENROUTER_API_KEY | OpenRouter key. TOTE_MODEL is openrouter:<org>/<model>, for example openrouter:anthropic/claude-haiku-5.5. Every request sends "provider": {"data_collection": "deny", "zdr": true}. |
TOTE_SHIPS_TO | Optional default delivery country, ISO 3166-1 alpha-2, for example PL. --ships-to wins for one run. |
TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID | Present in .env.example for a later Telegram bot. No code reads them yet. |
A missing profile URL, one Shopify credential without the other, a missing model key, or
a missing buyer IP at the Token tier stops tote ask with exit code 2 and names the
variable. Defaults: 12 model steps, 30 tool calls, 120 seconds (--max-steps,
--max-tool-calls, --timeout).
Safety
- Tote never pays and never handles card data. Checkout ends when the buyer opens the merchant link.
continue_urlnever reaches the model. It is not logged, not stored in telemetry, and not included in--json.- Store text (titles, descriptions, options, reviews, merchant messages) is untrusted. Tote shows it as data and does not follow instructions inside it.
- Each offer gets a verdict:
satisfies,satisfies_pending_shipping,incomplete, orviolates. Unknown is never met.satisfies_pending_shippingmeans every other constraint is met and ships-to stays deferred until the merchant checks the address. - Quantity comes only from the buyer's words. The default is 1. A quantity supplied by the model is ignored.
- Official UCP and MCP APIs only. No scraping. Global Catalog allows 5 requests per second per client id at the Token tier, and 1 per second per process at the Anonymous tier. Shop calls honor
Retry-After. A wait above 30 seconds fails instead of blocking.
Status
Live as of 2026-11-20: M1 (tote search on the Global Catalog) and M2 (tote ask through
search, compare, cart, and checkout handoff). The MCP server and the skill for Claude
Code, Codex CLI, and Gemini CLI are in this repo.
Not built: the Telegram bot, the Hermes plugin, the OpenClaw skill, and the Agent Shopping Index.
Architecture
| Package | Role |
|---|---|
| packages/core | UCP client: auth, rate limits, retries, catalog, cart, and checkout. No path calls complete_checkout. |
| packages/agent | The agent loop, the five tools, and the constraint checks. The model does not judge a constraint. |
| packages/cli | tote ask and tote search. |
| packages/mcp | start_request and the five tools over MCP (stdio or loopback HTTP), with a local handoff page. |
Design: docs/adr/001-architecture.md.
License: MIT, see LICENSE. Site design kit: MIT, Leonxlnx/taste-skill, see site/public/assets/LICENSE-taste-skill.txt.