The store's assistant on a Shopify store, with Shopify's example

Run Shopify's storefront example, vendored unchanged, against a real Shopify store: the assistant searches the live catalog, builds a real cart, answers from the store's policies, and hands the customer to the store's own checkout page.

What this run is

This is Shopify's port of the blueprint's shopping agent (Shopify/claude-for-commerce-examples, storefront/), started by the reference's script with the reference's environment. The store's assistant reads the store over UCP (Universal Commerce Protocol, carried on MCP, the Model Context Protocol) and the web app brands itself from the store: name, logo, colors, and best sellers, so the same code is a branded storefront for any shop. Nothing here places an order or takes payment; checkout, shipping, and payment happen on Shopify's page.

Running it

Set up once with ./setup.sh, which vendors the example and installs its npm workspace. Copy platforms/shopify/.env.example to platforms/shopify/.env and put ANTHROPIC_API_KEY in it. SHOP_DOMAIN defaults to fakestore-ai.myshopify.com, a public demo store that serves UCP.

platforms/shopify/first-party/run.sh

The script prints the Sign in with Shop status and the store, starts the example's API with uvicorn on 8004, waits for /api/health, and starts the web app with npm run dev -w storefront/web on 3005.

platforms/shopify/first-party/run.sh --api-only

starts the API alone.

Surface URL
The branded storefront with the assistant http://localhost:3005
The example's API (health, brand, chat, cart, sign-in routes) http://localhost:8004

GET http://localhost:8004/api/brand returns the store's name and branding as read from the store. There is no operations portal in this folder: the example's merchant half (merchant/ in the vendored copy) runs the blueprint's merchant agent over the Shopify Admin API, needs a Dev Dashboard app installed on your own store or its in-process local store, and ships no web UI; the vendored copy's README.md and merchant/README.md describe it.

A scripted walkthrough

Shopify's example suggests three prompts, and they run against the public demo store, an apparel shop priced in Canadian dollars, as checked on 8 September 2026.

  1. Ask for a gift: "I'm looking for a gift under $50, what do you recommend?" The assistant calls search_catalog on the store and the grid shows the results.
  2. Add one: "Add the first one to my cart." The assistant creates a real cart on the store (create_cart); the cart drawer stays in sync with the conversation.
  3. Ask a policy question: "What's your return policy?" The assistant calls search_shop_policies_and_faqs on the store's /api/mcp and quotes the store's policy.
  4. Ask how to pay. The tender question on a Shopify store is answered by the store's checkout page; the assistant does not compute rewards or installments, since the processor layer of this reference is not in this run.
  5. Check out. The checkout button in the web app opens the store's hosted checkout page. Behind it, the example lazily staged the cart as a UCP checkout (create_checkout) and took the document's continue_url; the cart's own continue_url is the fallback. complete_checkout is never called.
  6. Pay on Shopify's page. Shipping and payment are collected there. Against the public demo store the reference's runs stopped at the staged checkout; on your own development store, Shopify documents test orders through the Bogus gateway or a payment provider's test mode.
  7. Ask about the order. Order tracking follows Shopify's Order MCP: only orders placed through this agent are visible, on the buyer's ask, and the credential must carry read_global_api_orders. Without that scope the assistant says order tracking is unavailable and points at the confirmation email.

To join a cart the store already has, open the storefront with ?cart=<cart id> (a storefront's cart cookie value works as-is); writes re-read the cart first, so nothing done elsewhere is overwritten.

What runs without credentials, and what does not

There is no simulated mode for the running host: it always talks to a real store. What changes with credentials is narrower. Without ANTHROPIC_API_KEY the web app browses the store and the cart works from the grid, while chat turns do not run. Without SHOPIFY_UCP_CLIENT_ID and SHOPIFY_UCP_CLIENT_SECRET the sign-in routes answer 503 and every session is a guest, which Shopify's example states is identical to running with no credentials at all. Shopify's own tests, run by platforms/shopify/test.sh, replay recorded store responses and need no network and no key.

Sign in with Shop

With a Dev Dashboard app's credentials in .env, the storefront offers Sign in with Shop. The flow is authorization-code against Shop, server-side; buyer tokens are keyed by session and never reach the model, the browser, or the logs, and each catalog call pairs the token with the buyer's IP as the catalog requires. An expired token re-mints once, and a failed re-mint falls back to guest. Signed-in search_catalog calls return personalized results. SHOP_OAUTH_REDIRECT_URI (default http://localhost:8004/api/auth/shop/callback) must match the app's registered callback, and WEB_APP_URL (default http://localhost:3005) is where the browser goes afterwards.

Stopping

Ctrl-C stops the API and the web app. The web app's log is at /tmp/commerce-agents-shopify-web.log if it did not start.