Storefront MCP tool update_cart does not update cart?

When i add a product to cart, it responds with a checkout URL for the product I added, but:

  1. It does not reflect the existing storefront cart.
  • Example: If I have a Cap in my cart and I add a Shirt, the checkout URL only contains the Shirt.
  1. Calling the get_cart tool after that only shows the Shirt, ignoring the Cap.
  2. The items added via update_cart don’t appear in the actual online store cart.
  • The Shopify storefront still only shows the original cart (with the Cap).

I don’t see a clear use case for this from a customer’s perspective. If adding a product through update_cart doesn’t update the actual cart or the cart counter on the storefront, customers won’t see any change. This would make them uncomfortable or unsure if the item was really added to their cart.

Hi @Hisham_Naeem

The update_cart tool should generate a checkout link that will contain the shirt and cap in the cart from your example. The docs say that update_cart:

Updates quantities of items in an existing cart or adds new items. Creates a new cart if no cart ID is provided. Set quantity to 0 to remove an item.

Are you 100% sure you’ve implemented this correctly?

Hi @Liam-Shopify
I ran into the same issue — I just pulled the code from GitHub and didn’t update anything. But it still doesn’t work

I can confirm this bug with extensive testing.

I’ve tested the update_cart tool with raw JSON-RPC curl requests directly to the MCP endpoint (no
client library wrapper), and the lines parameter is completely ignored.

Test 1: Create new cart with items
{
“jsonrpc”: “2.0”,
“method”: “tools/call”,
“id”: 1,
“params”: {
“name”: “update_cart”,
“arguments”: {
“lines”: [
{
“merchandise_id”: “gid://shopify/ProductVariant/46867147358357”,
“quantity”: 1
}
]
}
}
}

Result: Cart created, but “lines”: and “total_quantity”: 0. Item not added.

Test 2: Add to existing cart (with valid cart_id from browser cookie)
{
“jsonrpc”: “2.0”,
“method”: “tools/call”,
“id”: 1,
“params”: {
“name”: “update_cart”,
“arguments”: {
“cart_id”: “gid://shopify/Cart/xxx?key=yyy”,
“lines”: [
{
“merchandise_id”: “gid://shopify/ProductVariant/46867147358357”,
“quantity”: 1
}
]
}
}
}

Result: Cart returned with existing items (added via storefront), but new item not added. No
errors. The updated_at timestamp changes, confirming the cart_id is valid and active.

What works:

  • :white_check_mark: get_cart - reads cart correctly (including items added via storefront)
  • :white_check_mark: update_cart - creates empty carts
  • :cross_mark: update_cart with lines parameter - completely ignored

Shopify support confirmed: "The Storefront MCP isn’t actually processing the lines parameter at all

  • this seems like a bug in the Storefront MCP’s implementation."

The MCP should be using Shopify’s Storefront API cartLinesAdd mutation under the hood, but it
appears to not be executing it.