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
- Verify that your deployment meets the prerequisites.
- For cart, order, and account tools, set up shopper authentication. On Adobe Commerce Optimizer, set up shopper authentication for custom tools.
- Use an MCP client that supports HTTP POST and JSON-RPC 2.0.
- Start in a non-production environment.
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.
config.json.X-View-Id)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.
https://commerce-storefront.adobe.io/mcphttps://commerce-storefront-sandbox.adobe.io/mcphttps://<cell-id>[-sandbox].api.commerce.adobe.com/<tenant-id>/storefront/mcphttps://commerce-storefront.adobe.io/mcphttps://commerce-storefront-sandbox.adobe.io/mcpStep 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.
X-Website-Codebase.X-Store-CodeX-Store-View-CodeX-View-IdX-Api-KeyX-Magento-Admin-Endpoint/graphql. Routes cart and checkout requests to the Commerce backend.X-Customer-Group0 if omitted.X-Agent-ID, X-Agent-Key, X-Session-Id, X-Mcp-RegistryX-Mcp-Registry: true is required to load the merchant’s custom tools. See Set up an AI agent for shopper authentication.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
-
Call
tools/listand confirm that the expected tools appear.The tool set varies by deployment, feature enablement, and tenant configuration. See Availability by deployment.
-
Send a basic
product_searchrequest. -
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_recommendationsreturns 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
- Review the Tools reference.
- Create custom tools for business-specific functionality.