@salesforce/b2c-dx-mcp 0.4.9 → 0.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -11
- package/dist/commands/mcp.d.ts +3 -3
- package/dist/commands/mcp.js +4 -4
- package/dist/registry.js +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -5,45 +5,64 @@ MCP (Model Context Protocol) server for Salesforce B2C Commerce developer experi
|
|
|
5
5
|
> [!NOTE]
|
|
6
6
|
> This project is currently in **Developer Preview**. Tools are functional but require `--allow-non-ga-tools` to enable. Additional tools will be added in future releases.
|
|
7
7
|
|
|
8
|
-
This MCP server enables AI assistants (Cursor, Claude
|
|
8
|
+
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.
|
|
9
9
|
|
|
10
10
|
Full documentation: [https://salesforcecommercecloud.github.io/b2c-developer-tooling/mcp/](https://salesforcecommercecloud.github.io/b2c-developer-tooling/mcp/)
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
|
-
**Prerequisites:** Node.js 22.0.0 or higher, MCP client (Cursor, Claude
|
|
14
|
+
**Prerequisites:** Node.js 22.0.0 or higher, MCP client (Cursor, Claude Code, GitHub Copilot, or compatible)
|
|
15
15
|
|
|
16
|
-
**Cursor** (
|
|
16
|
+
**Cursor** (project-level configuration - recommended):
|
|
17
17
|
|
|
18
18
|
```json
|
|
19
19
|
{
|
|
20
20
|
"mcpServers": {
|
|
21
|
-
"b2c-dx": {
|
|
21
|
+
"b2c-dx-mcp": {
|
|
22
22
|
"command": "npx",
|
|
23
|
-
"args": ["-y", "@salesforce/b2c-dx-mcp", "--
|
|
23
|
+
"args": ["-y", "@salesforce/b2c-dx-mcp@latest", "--allow-non-ga-tools"]
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
> **Note:** Project-level configuration (`.cursor/mcp.json`) automatically detects your project location. For user-level configuration, add `--project-directory "${workspaceFolder}"` to the args array.
|
|
30
|
+
|
|
31
|
+
**GitHub Copilot / VS Code**:
|
|
30
32
|
|
|
31
33
|
```json
|
|
32
34
|
{
|
|
33
|
-
"
|
|
34
|
-
"b2c-dx": {
|
|
35
|
+
"servers": {
|
|
36
|
+
"b2c-dx-mcp": {
|
|
37
|
+
"type": "stdio",
|
|
35
38
|
"command": "npx",
|
|
36
|
-
"args": ["-y", "@salesforce/b2c-dx-mcp", "--
|
|
39
|
+
"args": ["-y", "@salesforce/b2c-dx-mcp@latest", "--allow-non-ga-tools"]
|
|
37
40
|
}
|
|
38
|
-
}
|
|
41
|
+
},
|
|
42
|
+
"inputs": []
|
|
39
43
|
}
|
|
40
44
|
```
|
|
41
45
|
|
|
46
|
+
> **Note:** GitHub Copilot/VS Code uses `"servers"` (not `"mcpServers"`) and requires `"type": "stdio"` for stdio-based servers.
|
|
47
|
+
|
|
48
|
+
**Claude Code**:
|
|
49
|
+
|
|
50
|
+
Claude Code supports MCP servers via CLI installation:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Project scope (recommended)
|
|
54
|
+
cd /path/to/your/project
|
|
55
|
+
claude mcp add --transport stdio --scope project b2c-dx-mcp -- npx -y @salesforce/b2c-dx-mcp@latest --allow-non-ga-tools
|
|
56
|
+
|
|
57
|
+
# User scope
|
|
58
|
+
claude mcp add --transport stdio --scope user b2c-dx-mcp -- npx -y @salesforce/b2c-dx-mcp@latest --allow-non-ga-tools
|
|
59
|
+
```
|
|
60
|
+
|
|
42
61
|
See the [Installation Guide](https://salesforcecommercecloud.github.io/b2c-developer-tooling/mcp/installation) for detailed setup.
|
|
43
62
|
|
|
44
63
|
## Configuration
|
|
45
64
|
|
|
46
|
-
|
|
65
|
+
**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.
|
|
47
66
|
|
|
48
67
|
| Environment Variable | Description |
|
|
49
68
|
|---------------------|-------------|
|
package/dist/commands/mcp.d.ts
CHANGED
|
@@ -113,9 +113,9 @@ export default class McpServerCommand extends BaseCommand<typeof McpServerComman
|
|
|
113
113
|
* - `this.telemetry` - Telemetry instance (auto-initialized from package.json config)
|
|
114
114
|
*
|
|
115
115
|
* oclif provides standard config paths via `this.config`:
|
|
116
|
-
* - `this.config.configDir` - User config (~/.config/b2c
|
|
117
|
-
* - `this.config.dataDir` - User data (~/.local/share/b2c-
|
|
118
|
-
* - `this.config.cacheDir` - Cache (~/.cache/b2c
|
|
116
|
+
* - `this.config.configDir` - User config (~/.config/b2c)
|
|
117
|
+
* - `this.config.dataDir` - User data (~/.local/share/b2c) - shared with b2c-cli for plugin discovery
|
|
118
|
+
* - `this.config.cacheDir` - Cache (~/.cache/b2c)
|
|
119
119
|
* These can be exposed to Services if needed for features like telemetry or caching.
|
|
120
120
|
*/
|
|
121
121
|
run(): Promise<void>;
|
package/dist/commands/mcp.js
CHANGED
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
* | `--json` | - | Output logs as JSON lines |
|
|
56
56
|
* | `--lang` | - | Language for messages |
|
|
57
57
|
*
|
|
58
|
-
* **Note on `--project-directory`**: Many MCP clients (Cursor, Claude
|
|
58
|
+
* **Note on `--project-directory`**: Many MCP clients (Cursor, Claude Code) spawn servers from the
|
|
59
59
|
* user's home directory (`~`) rather than the project directory. This flag is used for:
|
|
60
60
|
* - Auto-discovery (detecting project type when no `--toolsets` or `--tools` are provided)
|
|
61
61
|
* - Scaffolding tools (creating files in the correct project location)
|
|
@@ -283,9 +283,9 @@ export default class McpServerCommand extends BaseCommand {
|
|
|
283
283
|
* - `this.telemetry` - Telemetry instance (auto-initialized from package.json config)
|
|
284
284
|
*
|
|
285
285
|
* oclif provides standard config paths via `this.config`:
|
|
286
|
-
* - `this.config.configDir` - User config (~/.config/b2c
|
|
287
|
-
* - `this.config.dataDir` - User data (~/.local/share/b2c-
|
|
288
|
-
* - `this.config.cacheDir` - Cache (~/.cache/b2c
|
|
286
|
+
* - `this.config.configDir` - User config (~/.config/b2c)
|
|
287
|
+
* - `this.config.dataDir` - User data (~/.local/share/b2c) - shared with b2c-cli for plugin discovery
|
|
288
|
+
* - `this.config.cacheDir` - Cache (~/.cache/b2c)
|
|
289
289
|
* These can be exposed to Services if needed for features like telemetry or caching.
|
|
290
290
|
*/
|
|
291
291
|
async run() {
|
package/dist/registry.js
CHANGED
|
@@ -100,7 +100,7 @@ async function performAutoDiscovery(flags, reason) {
|
|
|
100
100
|
// Warn if project directory wasn't explicitly configured
|
|
101
101
|
if (!flags.projectDirectory) {
|
|
102
102
|
logger.warn({ cwd: projectDirectory }, 'No --project-directory flag or SFCC_PROJECT_DIRECTORY env var provided. ' +
|
|
103
|
-
'MCP clients like Cursor and Claude
|
|
103
|
+
'MCP clients like Cursor and Claude Code often spawn servers from ~ instead of the project directory. ' +
|
|
104
104
|
'Set --project-directory or SFCC_PROJECT_DIRECTORY for reliable auto-discovery.');
|
|
105
105
|
}
|
|
106
106
|
const detectionResult = await detectWorkspaceType(projectDirectory);
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/b2c-dx-mcp",
|
|
3
3
|
"description": "MCP server for B2C Commerce developer experience tools",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.11",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": "SalesforceCommerceCloud/b2c-developer-tooling",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"oclif": {
|
|
31
31
|
"bin": "b2c-dx-mcp",
|
|
32
|
-
"dirname": "b2c
|
|
32
|
+
"dirname": "b2c",
|
|
33
33
|
"commands": {
|
|
34
34
|
"strategy": "single",
|
|
35
35
|
"target": "./dist/commands/mcp.js"
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"yaml": "2.8.1",
|
|
81
81
|
"postcss": "8.5.6",
|
|
82
82
|
"zod": "3.25.76",
|
|
83
|
-
"@salesforce/b2c-tooling-sdk": "0.8.
|
|
83
|
+
"@salesforce/b2c-tooling-sdk": "0.8.1"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@eslint/compat": "^1",
|