Skip to main content

Salesforce Commerce Cloud B2C MCP server

An AI agent connected to Salesforce Commerce Cloud B2C can power online storefronts—managing product catalogs and inventory, processing customer orders and returns, applying dynamic promotions and pricing, and personalizing shopping experiences. E-commerce teams, merchandisers, and operations professionals use this integration to automate catalog management, order fulfillment, and customer engagement without manual portal access.

Setting up an MCP server

This article covers the standard steps for creating an MCP server in AI Gateway and connecting it to an AI client. The steps are the same for every integration — application-specific details (API credentials, OAuth endpoints, and scopes) are covered in the individual application pages.

Before you begin

You'll need:

  • Access to AI Gateway with permission to create MCP servers
  • API credentials for the application you're connecting (see the relevant application page for what to collect)

Create an MCP server

Find the API in the catalog

  1. Sign in to AI Gateway and select MCP Servers from the left navigation.
  2. Select New MCP Server.
  3. Search for the application you want to connect, then select it from the catalog.

Configure the server

  1. Enter a Name for your server — something descriptive that identifies both the application and its purpose (for example, "Zendesk Support — Prod").
  2. Enter a Description so your team knows what the server is for.
  3. Set the Timeout value. 30 seconds works for most APIs; increase to 60 seconds for APIs that return large payloads.
  4. Toggle Production mode on if this server will be used in a live workflow.
  5. Select Next.

Configure authentication

Enter the authentication details for the application. This varies by service — see the Authentication section of the relevant application page for the specific credentials, OAuth URLs, and scopes to use.

Configure security

  1. Set any Rate limits appropriate for your use case and the API's own limits.
  2. Enable Logging if you want AI Gateway to record requests and responses for auditing.
  3. Select Next.

Deploy

Review the summary, then select Deploy. AI Gateway provisions the server and provides a server URL you'll use when configuring your AI client.


Connect to an AI client

Once your server is deployed, you'll need to add it to the AI client your team uses. Select your client for setup instructions:

Tips

  • You can create multiple MCP servers for the same application — for example, a read-only server for reporting agents and a read-write server for automation workflows.
  • If you're unsure which OAuth scopes to request, start with the minimum read-only set and add write scopes only when needed. Most application pages include scope recommendations.
  • You can edit a server's name, description, timeout, and security settings after deployment without redeploying.

Authentication

Salesforce B2C Commerce uses OAuth 2.0 through an API Client configured in Account Manager. The authorization endpoint is https://account.demandware.com/dwsso/oauth2/authorize, and the token endpoint is https://account.demandware.com/dwsso/oauth2/access_token. Your API Client provides Client ID and Client Secret. Scopes determine access level—shopper scopes (e.g., sfcc.shopper-products, sfcc.shopper-orders) grant customer-facing operations, while admin scopes (e.g., sfcc.products, sfcc.catalogs) enable back-office catalog and order management. Select scopes matching your use case to follow the principle of least privilege.

Available tools

The MCP server provides product catalog management, customer shopping operations, order processing, promotions, and multi-site capabilities for complete B2C e-commerce operations.

Product & catalog

ToolDescription
listProductsRetrieve products with search, filtering, and pagination
getProductGet product details including variants, pricing, images
updateProductModify product name, description, variants, availability
uploadProductImagesAdd or update product images and alt text
createCategoryCreate product category with navigation hierarchy
updateCategoryModify category name, description, product assignments

Customer & shopping

ToolDescription
getCustomerProfileRetrieve customer account, addresses, preferences
updateCustomerProfileUpdate name, contact info, communication preferences
listCustomerOrdersGet purchase history and order details
getCustomerWishlistRetrieve saved items and gift registries
addToWishlistSave product for later purchase

Cart & checkout

ToolDescription
addToCartAdd product with quantity and options to shopping cart
removeFromCartRemove item or clear entire cart
applyPromotionApply coupon code or promotional discount
calculateShippingGet shipping costs and delivery dates
calculateTaxesCompute sales tax by address
placeOrderSubmit cart as confirmed order

Promotions & pricing

ToolDescription
createCampaignCreate percentage/fixed discount or BOGO promotion
setCampaignDatesSchedule campaign start and end dates
generateCouponCodesCreate unique discount codes with usage limits
trackCouponRedemptionMonitor coupon usage and effectiveness
setPriceOverrideApply regional or customer-specific pricing

Order management & analytics

ToolDescription
updateOrderStatusChange order status and send notifications
processReturnCreate RMA and manage return workflow
trackShipmentGet carrier and tracking information
getOrderAnalyticsRetrieve revenue, conversion, and AOV metrics
searchProductPerformanceIdentify top-selling and underperforming products
analyzeFunnelMetricsTrack conversion rates by stage

Tips

Use shopper scopes (sfcc.shopper-*) for storefront operations and use admin scopes (sfcc.*) for back-office only — separate API clients by use case for security and auditability.

Manage inventory in your source system and sync to Commerce Cloud on a scheduled cadence to prevent overselling and maintain a single source of truth.

Create promotions with clear naming conventions and date ranges — monitor redemption rates to understand campaign effectiveness and adjust strategies.

Cache product catalog and category data locally if you make frequent read queries to reduce API calls and improve responsiveness.

Apply regional pricing and localized content at the site level so customers see currency and language appropriate to their location.