B2C Storefront

The B2C storefront MCP server supports guest shopping flows — no customer login required. AI agents can search your product catalog, build a cart, and generate a checkout link on behalf of any shopper.

Example prompts

  • “Find Nike running shoes size 10 that are under $120.”
  • “Show me the top 5 bestsellers in ‘Hoodies’.”
  • “I’m ready to check out.”

Tools

Search the storefront product catalog by keyword. Supports cursor-based pagination for browsing large result sets.

InputTypeRequiredDescription
termstringYesSearch keyword. Must be at least 3 characters.
cursorstringNoPagination cursor from a previous response’s nextCursor field. Omit for the first page.
contextstringNoAdditional context about the request (demographics, mood, location) to help tailor results. Must not contain PII.

Returns a list of matching products including name, description, and available options. When nextCursor is null, there are no more results.

Fetch variants and images for a specific product by ID. Use this after search_products to retrieve the information needed before adding an item to the cart.

InputTypeRequiredDescription
idintegerYesProduct entity ID from search_products.
option_valuesarrayYes (when product has options)Option selections. Each entry requires optionEntityId and valueEntityId. If the product has options, prompt the shopper to choose before calling this tool.

Returns product images and available variants with SKUs.

Add a product to the cart. If no cart exists in the current session, one is created automatically.

InputTypeRequiredDescription
item.quantityintegerYesNumber of units to add.
item.productEntityIdintegerYesProduct entity ID.
item.variantEntityIdintegerNoVariant entity ID. Required when the product has variants.
item.selectedOptionsobjectNoOption selections for checkboxes, date fields, text fields, multiple choice, and number fields.

Returns the updated cart.

Change the quantity, variant, or options for an existing line item in the cart.

InputTypeRequiredDescription
line_item_idstringYesEntity ID of the cart line item to update.
item.quantityintegerYesUpdated quantity.
item.productEntityIdintegerYesProduct entity ID.
item.variantEntityIdintegerNoUpdated variant entity ID.
item.selectedOptionsobjectNoUpdated option selections.

Returns the updated cart.

Remove a line item completely from the cart. To reduce quantity without removing the item, use update_cart_item instead.

InputTypeRequiredDescription
item_idstringYesEntity ID of the cart line item to remove.

Returns the updated cart.

Generate a checkout URL for the cart in the current session. Requires a cart to exist.

No inputs required.

Returns checkoutURL — redirect the shopper to this URL to complete their purchase.

Coming next

  • customer_login — authenticate shoppers to unlock personalized pricing, order history, and account features

Typical flow

1

Search for products

Call search_products with a keyword to find matching items. Use cursor to paginate through large result sets.

2

Get product details

Call get_product_details with the product ID. If the product has options (size, color, etc.), prompt the shopper to choose before proceeding.

3

Add to cart

Call add_item_to_cart with the selected product, variant, and quantity. A cart is created automatically if one does not already exist.

4

Adjust the cart

Use update_cart_item to change quantities or variants, or remove_item_from_cart to remove items the shopper no longer wants.

5

Go to checkout

Call create_checkout_url and redirect the shopper to the returned URL to complete their purchase.

Example

Here is search_products in action inside Claude, searching a sample store for products related to coffee.

Claude's response showing search_products was called with the term espresso
Claude calling search_products with the term 'espresso'
Expanded view showing the search_products request body and matching product results
Expanding the tool call to inspect the request and response