Set up shopper authentication
Shopper authentication lets a shopper sign in to their Adobe Commerce account from an AI agent, so the agent can send requests to the Shopper MCP Server as the signed-in shopper.
Adobe Commerce acts as the OAuth 2.0 authorization server. The shopper always signs in on your storefront, so the agent never sees the shopper’s password:
- The agent sends the shopper to your storefront sign-in page.
- The shopper signs in, or creates an account.
- Adobe Commerce returns a one-time authorization code to the agent.
- The agent exchanges the code for an access token and a refresh token.
- Shopper MCP Server calls the Adobe Commerce GraphQL API with the access token. The token can call only the GraphQL operations covered by its scopes.
The flow uses the OAuth 2.0 authorization code grant with PKCE (Proof Key for Code Exchange). Product discovery does not require shopper authentication.
Before you begin before-you-begin
- Verify that your deployment meets the prerequisites.
- Make sure that your storefront and your Adobe Commerce instance are served over HTTPS.
- [PaaS only]{class="badge informative" title="Applies to Adobe Commerce on Cloud projects (Adobe-managed PaaS infrastructure) and on-premises projects only."} Install the Shopper MCP Authentication enablement module.
Step 1: Register an OAuth 2.0 client register-client
An OAuth 2.0 client identifies the application that requests access for the shopper.
-
In the Commerce Admin, go to System > Agentic Commerce > OAuth 2.0 Clients.
-
Click New Client.
-
Enter a Name. New clients are active.
-
In Redirect URIs, enter one URI per line. The redirect URI of each request must match one of these values exactly.
Each URI must be absolute and have no fragment (
#). Usehttps,httponlocalhost,127.0.0.1, or[::1]for local testing, or a private-use scheme such ascom.example.app:for native apps. -
In Allowed Scopes, select the scopes that the client can request. See Scopes.
-
Click Save Client.
{width="500" modal="regular"}
-
Copy the Client ID and the client secret from the confirmation message.
Scopes scopes
cart_readcart_writecustomer_orders_readcustomer_profile_readcustomer_profile_writecustomer_addresses_readcustomer_addresses_writewishlist_readAn access token can call only the GraphQL operations bound to its scopes. Every other operation is refused with a graphql-authorization error. Catalog, store, and CMS queries do not need a scope.
Step 2: Configure the storefront settings storefront-settings
Shopper MCP Server receives the storefront URL and the policy URLs for each store view. Commerce uses the sign-in URL to send shoppers to the right sign-in page.
-
In the Commerce Admin, go to Stores > Settings > Configuration > Adobe Services > Shopper MCP.
-
Select the store view in the Scope selector.
-
Expand the Storefront section and review the values. Empty fields show a suggested value.
table 0-row-2 1-row-2 2-row-2 3-row-2 4-row-2 Field Description Storefront URL Home page of the storefront where shoppers continue their cart. Sign-in URL Storefront page where shoppers sign in to link their account with an AI agent. See Step 3. [PaaS only]{class="badge informative" title="Applies to Adobe Commerce on Cloud projects (Adobe-managed PaaS infrastructure) and on-premises projects only."} The suggested value is the native login page ( customer/account/login), orcustomer/loginwhen the Fastly CDN module is configured with a service ID and API token and the Fastly service routes to Edge Delivery Services.Privacy Policy URL Privacy policy page of the storefront. Terms of Service URL Terms of service page of the storefront. All values must be absolute
httpsURLs. {width="500" modal="regular"}
-
Click Save Config.
Until you save, the storefront URL and the sign-in URL use the suggested values. The privacy policy and terms of service URLs are published only after you save.
Step 3: Prepare the sign-in page sign-in-page
The sign-in page is where the agent sends the shopper. The page receives the OAuth 2.0 request parameters (response_type, client_id, redirect_uri, scope, state, code_challenge, code_challenge_method) in its query string.
Follow the guide for your storefront:
Route the OAuth 2.0 paths in Fastly fastly
You can set the authorization server’s issuer in Stores > Configuration > Adobe Services > OAuth2 > Issuer. If you leave the field blank, the server uses the store view’s secure base URL.
If Fastly serves both your Edge Delivery Services storefront and Adobe Commerce on the same domain, configure Fastly to route requests for the following paths to Adobe Commerce:
/oauth2ac/*: authorization endpoint/rest/V1/oauth2ac/*: token, revocation, and introspection endpoints/.well-known/oauth-authorization-server: authorization server metadata/.well-known/oauth2ac/jwks: signing keys
If Adobe Commerce runs on a different domain than the storefront, set Issuer to the storefront domain and route the same paths from the storefront CDN to Adobe Commerce. The metadata builds every endpoint from the issuer.
Keep the cache headers that Adobe Commerce sends: token responses are not cacheable, and the metadata and signing keys are cacheable for a short time.
Step 4: Activate Shopper MCP activate
Activation registers your store with the Shopper MCP Server, so that AI agents can find your storefronts and sign in your shoppers.
-
In the Commerce Admin, go to System > Agentic Commerce > Shopper MCP.
-
Click Activate.
Status changes to Active, and Last published shows the date and time of activation. The Registry entry lists the published endpoints and store views.
{width="500" modal="regular"}
To apply updates after you add or change store views or change the storefront settings, click Republish.
To deactivate the Shopper MCP, click Deactivate. Deactivating does not remove your store from the registry.
The Commerce Services Connector environment determines the registry: production keys publish to production, and sandbox keys publish to sandbox.
Step 5: Verify the setup verify
-
Open the authorization server metadata and confirm that it returns
200with your issuer, endpoints, and scopes:table 0-row-2 1-row-2 2-row-2 Deployment Metadata URL Adobe Commerce on cloud infrastructure or on-premises [PaaS only]{class="badge informative" title="Applies to Adobe Commerce on Cloud projects (Adobe-managed PaaS infrastructure) and on-premises projects only."} https://<store-domain>/.well-known/oauth-authorization-serverAdobe Commerce as a Cloud Service [SaaS only]{class="badge positive" title="Applies to Adobe Commerce as a Cloud Service projects only (Adobe-managed SaaS infrastructure)."} https://<tenant-base-url>/public/oauth2ac/metadata -
Confirm that the Shopper MCP page shows Active.
-
In a non-production environment, connect an AI agent, ask it to show your cart, and sign in when it sends you to the storefront. Confirm that the agent then returns your cart.
The metadata lists the token, revocation, and introspection endpoints, the signing keys (JWKS), and the supported client authentication methods (client_secret_basic, client_secret_post).