---
schema_version: "1"
id: 1092def5e83faff477a10ddfa7842bcd3fd41bd1706dac571b34301378ed8d66
title: Agentic B2C Developer Toolkit
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/b2c-commerce/guides/b2c-developer-tooling.md
canonical_url: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/b2c-developer-tooling.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: d3e3e620bf35adc673aeb29f5a6585185d95d40b25e450bd60716e392b3cb55e
products:
  - Composable Storefront
  - Salesforce APIs
---
# Agentic B2C Developer Toolkit

Build, debug, deploy, and manage Salesforce B2C Commerce from your terminal, editor, or AI assistant. The Agentic B2C Developer Toolkit supports developers building storefronts and integrations, and administrators managing their sites.

- **B2C CLI:** Deploy cartridges, manage code versions, run jobs, configure SLAS and eCDN, and manage Managed Runtime environments and On-Demand Sandboxes. Use the same commands interactively or in automation.
- **IDE Extension:** Work with cartridges, logs, and the script debugger in VS Code and compatible editors.
- **B2C MCP:** Connect your assistant to B2C Commerce tools, official documentation search, and workflow skills. Investigate issues, debug live cartridge code, or work with B2C Commerce data through SCAPI Admin APIs.
- **Agent Skills:** Give your assistant B2C Commerce development guidance, CLI workflows, Storefront Next patterns, and operational runbooks. Use skills through the MCP or install them separately.

## Run the B2C CLI

Run commands with `npx`, without a global installation:

```bash
npx @salesforce/b2c-cli --help
npx @salesforce/b2c-cli setup
```

Or install the CLI to use the shorter `b2c` command:

```bash
npm install -g @salesforce/b2c-cli
b2c setup
```

For prerequisites and other installation options, see [Install the B2C CLI](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/installation.html).

## Configuration and Authentication

Use `b2c setup` for guided configuration, or supply settings through `dw.json`, environment variables, and command flags. The CLI, MCP, and IDE Extension share B2C Commerce configuration. Configure one instance or name multiple instances and select one with `--instance`. For configuration information, see [Configuration](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/configuration.html).

For SCAPI administrative commands, create an [Account Manager API client](https://developer.salesforce.com/docs/commerce/commerce-api/guides/authorization-for-admin-apis.md). In Account Manager, assign the client the **Salesforce Commerce API** role, select each instance that the client needs to access through SCAPI, and add the scopes required by the task. For example, listing eCDN zones requires the `sfcc.cdn-zones` scope.

The following shell examples use placeholder values. Replace them with your credentials and your realm's [short code](https://developer.salesforce.com/docs/commerce/commerce-api/guides/base-url.md). Keep credentials out of source control.

```bash
export SFCC_CLIENT_ID='your-account-manager-client-id'
export SFCC_CLIENT_SECRET='your-account-manager-client-secret'
export SFCC_SHORTCODE='your-short-code'

npx @salesforce/b2c-cli ecdn zones list --tenant-id abcd_stg
```

`--tenant-id` accepts a tenant ID such as `abcd_stg` or its organization ID, `f_ecom_abcd_stg`. The CLI requests the access token for the command; you don't need to obtain or paste a bearer token first.

SLAS client administration uses the **SLAS Organization Administrator** role. Managed Runtime commands that use an API key accept `MRT_API_KEY`, available from [Runtime Admin Account Settings](https://runtime.commercecloud.com/account/settings). Cartridge and WebDAV operations can also require an instance hostname, username, and WebDAV access key, depending on the authentication method.

See [Configuration](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/configuration.html) for project and global `dw.json` files, multiple instances, and environment variables. See [Authentication](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/authentication.html) for client roles, scopes, OCAPI permissions, and WebDAV access. [Safety Mode](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/safety.html) can restrict supported write and delete operations across the CLI, MCP, and IDE Extension.

## Connect Your AI Assistant

Install the [B2C MCP](https://salesforcecommercecloud.github.io/b2c-developer-tooling/mcp/) through an agent plugin in supported clients. For example, in Claude Code:

```bash
claude plugin marketplace add SalesforceCommerceCloud/b2c-developer-tooling
claude plugin install b2c-dx-mcp@b2c-developer-tooling --scope project
```

See the [B2C MCP guide](https://salesforcecommercecloud.github.io/b2c-developer-tooling/mcp/) for complete setup instructions and supported AI assistants. The plugins use the open [Agent Plugins](https://agent-plugins.org/) standard. For clients that require manual MCP configuration, use `npx` with arguments `--yes @salesforce/b2c-dx-mcp` as the local server command.

The MCP provides official B2C Commerce documentation search, live cartridge debugging, log investigation, deployment tools, and general-purpose SCAPI Admin API access. Your assistant can combine API requests and summarize the results, such as reviewing products and their category assignments. Available actions depend on the credentials and permissions you configure.

It also makes the `b2c`, `b2c-cli`, `storefront-next`, and `b2c-ops` skill collections available to your assistant through MCP tools. You don't need to separately install the skills plugins. You can still [install Agent Skills separately](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/b2c-developer-tooling-agent-skills.md) if you want skills without an MCP connection or as native skills in your assistant.

Example requests:

> Find the official guidance for Custom API authorization, then help me diagnose why my endpoint isn't registered.

> Investigate failed orders on my sandbox. Summarize the affected period, supporting evidence, and next steps before making changes.

Operational skills help your assistant correlate evidence and prepare a handoff to your team or Salesforce Support. See [Operations and Administration](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/operations.html).

## Explore the Tools

- [CLI command reference](https://salesforcecommercecloud.github.io/b2c-developer-tooling/cli/): Code, jobs, sandboxes, SLAS, eCDN, Managed Runtime, and more.
- [IDE Extension](https://salesforcecommercecloud.github.io/b2c-developer-tooling/vscode-extension/): Installation, cartridge development, and debugging.
- [MCP tools](https://salesforcecommercecloud.github.io/b2c-developer-tooling/mcp/toolsets.html): Capabilities and access requirements.
- [Agent Skills](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/b2c-developer-tooling-agent-skills.md): Skill collections and standalone installation.
- [TypeScript SDK](https://salesforcecommercecloud.github.io/b2c-developer-tooling/api/): Build custom tooling or inspect the behavior of the official tools.
- [GitHub repository](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling): Source code, contributions, and issue reporting.
