Connect to Shopper MCP Server

Connect your MCP client to the Shopper MCP Server endpoint assigned to your environment, send the required headers, and verify that the expected tools and catalog data are returned.

Before you begin before-you-begin

Step 1: Identify your environment identify-environment

Find the identifier for the Commerce instance and environment that you want to connect. Data spaces and tenants are isolated, so do not reuse an identifier across environments.

Deployment
Identifier
Where to find it
Adobe Commerce on cloud infrastructure or on-premises
Environment ID or SaaS Data Space ID (a UUID)
In the Commerce Admin, go to System > Services > Commerce Services Connector, then select the production or non-production data space.
Adobe Commerce as a Cloud Service
Tenant ID or instance ID (a short, non-UUID value)
In Commerce Cloud Manager, or in the tenant segment of the storefront GraphQL endpoint or config.json.
Adobe Commerce Optimizer
Assigned tenant or instance identifier, and the view identifier (X-View-Id)
Confirm both values with your Adobe Commerce representative.

Step 2: Get the endpoint get-endpoint

Use the endpoint assigned to your tenant and environment. The following patterns are for reference only. Your assigned endpoint is authoritative.

Deployment
Endpoint pattern
Adobe Commerce on cloud infrastructure or on-premises (production)
https://commerce-storefront.adobe.io/mcp
Adobe Commerce on cloud infrastructure or on-premises (sandbox)
https://commerce-storefront-sandbox.adobe.io/mcp
Adobe Commerce as a Cloud Service
https://<cell-id>[-sandbox].api.commerce.adobe.com/<tenant-id>/storefront/mcp
Adobe Commerce Optimizer (production)
https://commerce-storefront.adobe.io/mcp
Adobe Commerce Optimizer (sandbox)
https://commerce-storefront-sandbox.adobe.io/mcp

Step 3: Gather the header values headers

Find website, store, and store view codes in the Commerce Admin under Stores > All Stores. Copy each value exactly as configured.

If you use Shopper MCP Server with Adobe Brand Concierge, website, store, and store view codes are retrieved automatically.

Header
Description
Applies to
X-Environment-Id
The identifier from Step 1.
Required for all deployments
X-Website-Code
Website to target. A common default is base.
Required for all deployments
X-Store-Code
Store group to target.
Required for all deployments
X-Store-View-Code
Store view that determines the returned locale and related store view data.
Required for all deployments
X-View-Id
View identifier used for tenant routing.
Adobe Commerce Optimizer only
X-Api-Key
Public Commerce Services Connector API key for the production or sandbox environment.
Adobe Commerce on cloud infrastructure or on-premises only
X-Magento-Admin-Endpoint
Commerce GraphQL URL, typically the store base URL plus /graphql. Routes cart and checkout requests to the Commerce backend.
Adobe Commerce on cloud infrastructure or on-premises only
X-Customer-Group
Customer group ID. Defaults to 0 if omitted.
Optional
X-Agent-ID, X-Agent-Key, X-Session-Id, X-Mcp-Registry
Agent credentials, shopper session, and registry lookup. X-Mcp-Registry: true is required to load the merchant’s custom tools. See Set up an AI agent for shopper authentication.
Adobe Commerce Optimizer shopper authentication only
WARNING
X-Api-Key is the public key, not the private half of the Commerce Services Connector key pair. Do not put private keys or other secrets in MCP request headers.

Step 4: Initialize the connection initialize

Send an initialize request with the required headers. Replace the placeholders with the values for your environment, and add X-Api-Key, X-Magento-Admin-Endpoint, or X-View-Id if your deployment requires them.

POST /mcp HTTP/1.1
Content-Type: application/json
Accept: application/json, text/event-stream
X-Environment-Id: <environment-or-tenant-id>
X-Website-Code: <website-code>
X-Store-Code: <store-code>
X-Store-View-Code: <store-view-code>

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": "2024-11-05",
    "capabilities": {},
    "clientInfo": {
      "name": "your-agent-name",
      "version": "1.0.0"
    }
  }
}

Store the returned Mcp-Session-Id and include it on later requests, as your MCP client requires.

Step 5: Verify the connection verify

  1. Call tools/list and confirm that the expected tools appear.

    The tool set varies by deployment, feature enablement, and tenant configuration. See Availability by deployment.

  2. Send a basic product_search request.

  3. Confirm that the response contains products from the expected store view, or catalog view for Adobe Commerce Optimizer.

Also confirm the following:

  • The environment or tenant ID and the website, store, and store view codes match the intended store.
  • Catalog synchronization is complete.
  • If Product Recommendations is enabled, product_recommendations returns results.
  • Cart and checkout tools are tested only in a non-production environment.

If a check fails, see Troubleshooting.

Optional: route through a custom domain custom-domain

You can use a CDN reverse proxy to expose the MCP endpoint on a domain you control, such as https://yourdomain.com/mcp. Configure the proxy to route the /mcp path to the endpoint assigned by Adobe and to pass through or set the required headers.

Coordinate the setup with your CDN provider and Adobe Commerce representative, then verify the endpoint, headers, and TLS configuration.

Next steps next-steps

recommendation-more-help
commerce-help-shopper-mcp