MCP (Model Context Protocol) server for Salesforce B2C Commerce developer experience tools.
This MCP server enables AI assistants (Cursor, Claude Code, and others) to help with B2C Commerce development tasks. It provides toolsets for SCAPI, CARTRIDGES, MRT, PWAV3, and STOREFRONTNEXT development.
Full documentation: https://salesforcecommercecloud.github.io/b2c-developer-tooling/mcp/
Prerequisites: Node.js 22.0.0 or higher, MCP client (Cursor, Claude Code, GitHub Copilot, or compatible)
Cursor (project-level configuration - recommended):
{
"mcpServers": {
"b2c-dx-mcp": {
"command": "npx",
"args": ["-y", "@salesforce/b2c-dx-mcp@latest", "--allow-non-ga-tools"]
}
}
}Note: Project-level configuration (
.cursor/mcp.json) automatically detects your project location. For user-level configuration, add--project-directory "${workspaceFolder}"to the args array.
GitHub Copilot / VS Code:
{
"servers": {
"b2c-dx-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@salesforce/b2c-dx-mcp@latest", "--allow-non-ga-tools"]
}
},
"inputs": []
}Note: GitHub Copilot/VS Code uses
"servers"(not"mcpServers") and requires"type": "stdio"for stdio-based servers.
Claude Code:
Claude Code supports MCP servers via CLI installation:
# Project scope (recommended)
cd /path/to/your/project
claude mcp add --transport stdio --scope project b2c-dx-mcp -- npx -y @salesforce/b2c-dx-mcp@latest --allow-non-ga-tools
# User scope
claude mcp add --transport stdio --scope user b2c-dx-mcp -- npx -y @salesforce/b2c-dx-mcp@latest --allow-non-ga-toolsSee the Installation Guide for detailed setup.
Project-level configuration (recommended for Cursor and GitHub Copilot) automatically detects your project location. For user-level configuration or when using explicit paths, set --project-directory (or SFCC_PROJECT_DIRECTORY). MCP clients spawn from the home directory (~), not your project.
| Environment Variable | Description |
|---|---|
SFCC_PROJECT_DIRECTORY |
Project directory (enables auto-discovery and config loading) |
SFCC_SERVER |
B2C instance hostname |
SFCC_USERNAME |
Username for WebDAV |
SFCC_PASSWORD |
Password/access key for WebDAV |
SFCC_CLIENT_ID |
OAuth client ID |
SFCC_CLIENT_SECRET |
OAuth client secret |
MRT_API_KEY |
MRT API key (SFCC_MRT_API_KEY also supported) |
See the Configuration Guide for credentials, flags, and toolset selection.
| Toolset | Tools | Docs |
|---|---|---|
| CARTRIDGES | cartridge_deploy |
toolsets#cartridges |
| MRT | mrt_bundle_push |
toolsets#mrt |
| SCAPI | scapi_schemas_list, scapi_custom_apis_get_status, scapi_custom_api_generate_scaffold |
toolsets#scapi |
| STOREFRONTNEXT | sfnext_get_guidelines, sfnext_add_page_designer_decorator, sfnext_configure_theme, sfnext_start_figma_workflow, sfnext_analyze_component, sfnext_match_tokens_to_theme |
toolsets#storefrontnext |
| PWAV3 | pwakit_get_guidelines + SCAPI tools |
toolsets#pwav3 |
Deploy cartridges to a B2C Commerce instance. Details
- "Use the MCP tool to deploy my cartridges to the sandbox."
- "Use the MCP tool to deploy only app_storefront_base."
Build and push bundle to Managed Runtime. Details
- "Use the MCP tool to push my Storefront Next bundle to staging."
- "Use the MCP tool to deploy my PWA Kit bundle to production."
List or fetch SCAPI schemas (standard and custom). Details
- "Use the MCP tool to list all SCAPI schemas."
- "Use the MCP tool to get the OpenAPI schema for shopper-baskets v1."
Get custom API endpoint registration status. Details
- "Use the MCP tool to list custom API endpoints on my instance."
- "Use the MCP tool to show which custom APIs are active vs not registered."
Generate new custom SCAPI endpoint in a cartridge. Details
- "Use the MCP tool to scaffold a new custom API named my-products."
- "Use the MCP tool to create a custom admin API called customer-trips."
Get Storefront Next guidelines and best practices. Details
- "Use the MCP tool to show me critical Storefront Next rules."
- "Use the MCP tool to get data-fetching and component patterns."
Add Page Designer decorators to components. Details
- "Use the MCP tool to add Page Designer decorators to my component."
Get theming guidelines, questions, and WCAG color validation for Storefront Next. Details
- "Use the MCP tool to help me apply my brand colors to my Storefront Next site."
- "Use the MCP tool to validate my color combinations for accessibility."
Workflow orchestrator for Figma-to-component conversion. Parses Figma URL, returns step-by-step instructions for subsequent tool calls. Requires external Figma MCP server. Details — Figma Setup
- "Use the MCP tool to convert this Figma design to a Storefront Next component: [Figma URL with node-id]"
- "Use the MCP tool to create this homepage from the Figma design: [Figma URL with node-id]"
Analyze design and discovered components to recommend REUSE, EXTEND, or CREATE strategy. Details
- "Use the MCP tool to analyze the Figma design and recommend whether to reuse, extend, or create a component."
Map design tokens to existing theme tokens in app.css with confidence scores and suggestions. Details
- "Use the MCP tool to map these Figma design tokens to my theme."
Get PWA Kit v3 guidelines. Details
- "Use the MCP tool to get PWA Kit development guidelines."
Explicitly mention "Use the MCP tool" in your prompts for reliable tool usage. See Prompting Tips for best practices and more examples.
The MCP server collects anonymous usage telemetry by default. Disable with SF_DISABLE_TELEMETRY=true or SFCC_DISABLE_TELEMETRY=true in your MCP client's env config. See the MCP documentation for details.
Full documentation: https://salesforcecommercecloud.github.io/b2c-developer-tooling/
For MCP development, testing, and local setup, see CONTRIBUTING.md.
This project is licensed under the Apache License 2.0. See LICENSE.txt for full details.