Skip to content
AI Superpower
← AI in practice / October–November 2026

Developer workflows

Migrate Shopify Storefront MCP to UCP without losing cart state

A developer checklist for endpoint discovery, catalog/cart tool mapping, agent profiles, full cart updates and checkout verification.

AI Superpower · Published · 4 min read

Discover current tool contracts; Preserve complete cart state; Verify uncertain writes; Release with a recovery owner
Original workflow diagram. Examples are illustrative, not product screenshots.
In this guide
  1. The useful starting point
  2. Map behavior before changing code
  3. Check the contract in the client
  4. Make the regression test adversarial
  5. Separate model decisions from cart writes
  6. Release with an owner
  7. Sources and further reading

The useful starting point

Replace removed legacy catalog and cart calls with the supported UCP tools. Treat this as a contract change, not just an endpoint rename: update_cart replaces cart state, every UCP MCP request needs an agent profile, and checkout has separate requirements.

Shopify's legacy Storefront MCP catalog and cart tools are no longer available at /api/mcp. The current migration guide points catalog and cart work to /api/ucp/mcp. Existing integrations need a tool and data-contract review before traffic is switched.

This is a documentation-based migration guide, checked October 20, 2026. We have not executed a UCP shopping transaction or certified a vendor integration. Use the live Shopify reference for schemas and authentication; the checklist below defines what to verify.

Map behavior before changing code

Legacy behaviorCurrent destinationReview
search_catalog / get_product_detailsStorefront Catalog MCP: search_catalog, lookup_catalog, get_productChoose the tool for the actual lookup; adapt response parsing.
get_cart / update_cartCart MCP: create_cart, get_cart, update_cart, cancel_cartReview cart lifecycle and full-state updates.
checkoutURL handoffCheckout MCPImplement its documented authentication and signing requirements.
search_shop_policies_and_faqsExisting /api/mcp toolKeep separate routing; do not migrate it merely because catalog changed.

Check the contract in the client

Inventory hardcoded tool names, endpoint selection, stored cart IDs, response assumptions and error handling. Discover and validate the current schemas through the supported integration instead of supplying guessed fields. Every request to the UCP MCP endpoint requires an agent profile; include that in the connection's acceptance checklist.

The dangerous assumption is that update_cart applies a small patch. Shopify documents replacement of the cart's state. A client that submits just the changed line can remove an unrelated line. Read the cart, construct the full intended state according to the current schema, and verify the returned state. A read followed by a write is not automatically safe against another session changing the cart; implement the documented concurrency behavior or stop and reconcile conflicting changes.

Make the regression test adversarial

  1. Create a test cart containing variant A and variant B.
  2. Change A's quantity while preserving B, then compare all returned lines with the intended state.
  3. Remove A intentionally and prove that B remains.
  4. Try a nonexistent or unavailable variant and inspect the structured error.
  5. Interrupt an update after request submission. Re-read cart state before deciding whether a retry is safe.
  6. Exercise expiry or an invalid cart reference and return a recoverable message.
  7. Complete the supported checkout handoff in an approved test environment, verifying identities and required authorization.

Record the test environment, schema/reference version or retrieval date, expected state, actual state and evidence. Never log tokens, signing material or unnecessary customer details. The test result should be reproducible by someone who did not write the client.

Separate model decisions from cart writes

The assistant may suggest a product, but deterministic code should validate variant identity, quantity and permission to modify the cart. Show the buyer the intended change before a consequential action. Treat tool responses as data, and explain incomplete operations using observed state rather than a confident generated success message.

When a response is uncertain, “check cart status” is often a better recovery than “try again.” A second write can compound the first. Stop the write path when identity or state is ambiguous, while keeping ordinary storefront navigation available.

Release with an owner

Deploy a small controlled release, inspect failures and verify real storefront behavior. Have a documented switch to disable shopping actions. A rollback to code that still calls removed tools is not a recovery plan. Assign an owner to review Shopify changes and re-run the cart contract tests.

Send nontechnical stakeholders the merchant migration checklist. If you are choosing among developer, merchant and shopper tools, start with the Shopify MCP guide. Use the tool trial to record your own result.

Sources and further reading

Sources checked October 16, 2026. Tool features and plan availability can change; review the linked publisher documentation before connecting an account.