Agentic MCP Shopper Tools Quick Start (Pilot)

AI agents like Claude, Agentforce, and ChatGPT are powerful, but they often struggle to give truly accurate, brand-based, storefront-specific suggestions. That’s why we built the B2C Commerce Model Context Protocol (MCP) Service, focusing on the most important users: your shoppers.

The B2C Commerce MCP Service is a fully-hosted service for linking an AI agent to real-time B2C Commerce data access. The B2C Commerce MCP Service provides MCP tools for the agentic shopper experience, and supports the latest standards, including Google’s Agent to Agent (A2A), Model Context Protocol (MCP) /tools, HTTP SSE. Because it leverages a secure, standards-based protocol that supports robust authentication and authorization, the B2C Commerce MCP Service ensures data privacy and platform integrity.

This quick start explains how to connect an AI agent to the B2C Commerce MCP Shopper Service. It doesn’t cover Salesforce Agentforce Shopper Agent setup or Shopper Agents API session initialization.

The B2C Commerce MCP Shopper Service and the Salesforce Agentforce Shopper Agent are separate offerings. Use this table to find the applicable path for your goal.

Your goalWhat to use
Let external AI assistants (such as ChatGPT or Claude) search your catalog, build a cart, and link to checkout.The B2C Commerce MCP Shopper Service (this guide).
Add a conversational Shopper Agent (chat) to your storefront.The Shopper Agent setup docs: Set Up Salesforce Agent Guided Shopping.
Connect the B2C Commerce MCP Service to Agentforce.Not currently supported.

The Shopper Agents API (including its sessionInitKey) is part of Salesforce Agentforce Shopper Agent setup, not the B2C Commerce MCP Service, and is out of scope for this quick start. In this guide, the MCP sessionId from the /sse connection is used only for MCP Service messaging calls. For Shopper Agent setup, see the Help docs linked in the table.

With the B2C Commerce MCP Service, your AI agent always has access to the most up-to-date resources (product lists, details, and images) from Salesforce B2C Commerce. External AI assistants, such as ChatGPT and Perplexity, are enabled with seamless conversational access to a brand’s ecommerce capabilities, so that shoppers can use natural language to discover and buy products via the AI assistants, for example:

  • Search for any product on your storefront.
  • List products and product details with images.
  • Add one or more products to a cart.
  • Link to the checkout page.

The following image shows how the B2C Commerce MCP Service makes product data, inventory, pricing, order information, and merchant operational functions machine-readable and easily accessible to authorized AI agents.

The B2C Commerce MCP Shopper Service pilot provides the functionality shown in the MCP Server (Tools & Data) box.

B2C Commerce MCP Service)

The B2C Commerce MCP Service offers a range of features, such as shopper, merchant, and intelligence capabilities. The pilot program for the B2C Commerce MCP Shopper Service, however, is centered around the shopper experience.

To participate in the pilot program:

  • Onboard to SLAS and use the B2C Commerce API (SCAPI).
  • Contact your Salesforce account executive.

The B2C Commerce MCP Service doesn’t return a sessionInitKey. The sessionId returned when connecting to the MCP Service via /sse is only for making additional MCP Service requests within that session.

To demonstrate the B2C Commerce MCP Shopper Service, we are providing a demo shopper agent that uses the OpenAI GPT API and accepts simple HTTP requests using Agent2Agent (A2A) JSON RPC calls from a chat UI in your storefront.

Your AI agent configuration can vary depending on your environment. Check the documentation for your specific AI agent.

  1. Configure your agent library, for example: langchain or Springframework.ai, as part of your storefront so shoppers can ask natural language shopping questions.
  2. For authentication:
    • Create a new SLAS client ID or update your current SLAS client ID to include the sfcc.shopper-mcpagent scope in the SLAS JWT scopes field.
      • All Shopper MCP APIs require a Shopper Login and API Access Service (SLAS) token. These tokens contain specific tenants, user IDs, and scopes to control data access. You can use either a guest or registered user access token.
      • Pass this access token as a Bearer Token in the Authorization header to the B2C Commerce MCP Server.
      • You can use your existing PWA-kit Storefront guest or shopper login by incorporating the SLAS JWT into your newly built chat window and making calls to the shopper agent instance that your team develops. Validate the SLAS JWT on each call to the shopper agent. The SLAS JWT serves as the API authentication for the B2C Commerce MCP Server, so it’s crucial to pass the SLAS JWT through the entire process using an auth header.
      • For details, review the instructions in Authorization for Shopper APIs.
  3. Locate your B2C Commerce MCP Service tools:
    1. Call the following endpoints using your short-code, org-id, and the mcp family. You can find your organization’s short-code and tenant ID in Business Manager, for example: kv7kzm70 and f_ecom_zzrr_dev, respectively.
      • https://<short-code>.api.comm…om/mcp/shopper/v1/organizations/<org_id>/sse
      • https://<short-code>.api.comm…om/mcp/shopper/v1//organizations/<org_id>/mcp/messages?sessionId=<session_id>, where session_id is received in the first event from the /sse request.
  4. Create a connection for each shopper. Per the HTTP SSE spec, and leveraging Spring AI, your shopper agent calls the SSE endpoint to establish a connection with the B2C commerce MCP Server.
  5. Use the B2C Commerce MCP Service tools location to call the B2C Commerce MCP Shopper Service tools/endpoints using the JSON RPC /messaging protocol.

These tables summarize the available B2C Commerce MCP Service shopper tools for AI-powered product search, product detail pages with images, adding one or more products to a cart, and a link to checkout that redirects to the storefront for both guest and registered users:

FunctionalityDescriptionParameters
search_productGet a list of products based on query value.
  • siteId: Site ID to search
  • queryValue: Query value for the search
get_productGet a specific product by ID.
  • siteId: Site ID to search
  • productId: Product ID for the search
FunctionalityDescriptionParameters
create_basketCreate a basket (cart) with a product for a given site ID and usid.
  • siteId: Site ID to search
  • productId: Product ID
  • quantity: Number of each product to add
add_product_to_basketAdd a product to a cart with a given basket ID, site ID, and usid.
  • siteId: Site ID to search
  • basketId: Cart identifier
  • productId: Product ID
  • quantity: Number of each product to add
get_basketReturn the basket (cart) details for the given site ID and basket ID.
  • siteId: Site ID to search
  • basketId: Cart identifier
remove_basketRemove (delete) the given basket (cart) by site ID and basket ID.
  • siteId: Site ID to search
  • basketId: Cart identifier
checkoutStart checkout for given cart ID, site, and usid. This returns a link to the configured PWA kit store front.
  • siteId: Site ID to search
  • basketId: Cart identifier

In compliance with Salesforce Security Guidelines, every API requires a SLAS JWT for authentication, uses TLS over the network, monitoring and logging and auditing, and provides rate limits for all API calls.

  • MCP servers will have limited access to data sources, ensuring only relevant data is exposed, for example: shopper data for shopper APIs and merchant data for data APIs. The entire SCAPI API suite isn’t generically exposed.
  • The performance of the pilot is for demonstration purposes only and doesn’t fully represent the final product’s capabilities.