Configure Credentials for the Custom API Discovery MCP Tool
Configure the B2C Commerce instance credentials so that the Custom API Discovery MCP Tool, scapi_custom_api_discovery, can authenticate to your B2C Commerce instance. Choose one of the available methods to configure your B2C Commerce credentials.
Method 2: Auto-Discovery of Local Custom API Files
If SFCC_CARTRIDGE_PATH isn’t set, the tool automatically searches for api.json and schema.yaml files starting from PWA_STOREFRONT_APP_PATH and traversing up through parent directories until it reaches the filesystem root or home directory (maximum of 10 levels). At each directory level, it searches recursively down through subdirectories, up to 10 levels deep.
The MCP server searches for local custom API files in this order.
B2C Commerce credentials in the dw.json file or environment variables.
The SFCC_CARTRIDGE_PATH environment variable. The MCP server searches recursively up to 10 levels deep in subdirectories.
The PWA_STOREFRONT_APP_PATH environment variable and up to 5 parent directories. Searches recursively up to 10 levels deep in subdirectories at each level.