Section M
Agentic commerce
With a real store, handleShopifyRoutes proxies /api/mcp to Shopify's Storefront MCP server and serves /.well-known/ucp; initializeShopifyScripts loads WebMCP tools in supporting browsers. Demo mode answers /api/mcp locally with the same tool names, backed by the mock catalog and carts.
MCP endpoint, product discovery & cart interaction
Send JSON-RPC to /api/mcp: list tools, search the catalog, fetch product details, create a cart.
- Hydrogen API
handleShopifyRoutes (/api/mcp, /.well-known/ucp)initializeShopifyScripts({ webMcp })- Data
- Simulated MCP server in demo; Shopify Storefront MCP live
Agent-assisted shopping flow
A deterministic demo agent (rules, not an LLM) turns a request into MCP tool calls: search → details → cart → checkout link. Plug an LLM in by giving it the same tools.
- Hydrogen API
MCP tools/call- Data
- Mock catalog via MCP
Deterministic demo agent: simple rules choose the tool calls, so every step is reproducible. An LLM agent would call the same MCP tools.