You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ Issues labelled `good first contribution`.
44
44
45
45
# Running the MCP server from source
46
46
47
-
When developing the B2C DX MCP package (`packages/b2c-dx-mcp`), use `node` with the path to `bin/dev.js` in args. Build to latest (`pnpm run build` from the repo root) so changes that require a rebuild are reflected when you run the server.
47
+
For information on running the MCP server from source and local development, see [packages/b2c-dx-mcp/CONTRIBUTING.md](packages/b2c-dx-mcp/CONTRIBUTING.md).
Use MCP Inspector to browse tools and test them in a web UI:
229
-
230
-
```bash
231
-
cd packages/b2c-dx-mcp
232
-
pnpm run inspect:dev
233
-
```
234
-
235
-
This runs TypeScript directly (no build needed). Open the localhost URL shown in the terminal, click **Connect**, then **List Tools** to see available tools.
236
-
237
-
### IDE Integration
238
-
239
-
Configure your IDE to use the local MCP server. Add this to your IDE's MCP configuration:
240
-
241
-
```json
242
-
{
243
-
"mcpServers": {
244
-
"b2c-dx-local": {
245
-
"command": "node",
246
-
"args": [
247
-
"/full/path/to/packages/b2c-dx-mcp/bin/dev.js",
248
-
"--toolsets", "all",
249
-
"--allow-non-ga-tools"
250
-
]
251
-
}
252
-
}
253
-
}
254
-
```
255
-
256
-
> **Note:** When developing the B2C DX MCP package (`packages/b2c-dx-mcp`), use `node` with the path to `bin/dev.js` in args. Build to latest (`pnpm run build` from the repo root) so changes that require a rebuild are reflected when you run the server.
257
-
>
258
-
> **Note:** Make sure the script is executable: `chmod +x /full/path/to/packages/b2c-dx-mcp/bin/dev.js`
259
-
>
260
-
> **Note:** Restart the MCP server in your IDE to pick up code changes.
|`directory`| string | No |Current working directory | Path to directory to search for cartridges. The tool recursively searches for `.project` files to identify cartridges. |
38
-
|`cartridges`| string[]| No | All found cartridges | Array of cartridge names to include in the deployment. Use this to selectively deploy specific cartridges when you have multiple cartridges but only want to update some. |
37
+
|`directory`| string | No |Working directory from --working-directory flag or SFCC_WORKING_DIRECTORY env var (falls back to process.cwd())| Path to directory to search for cartridges. The tool recursively searches for `.project` files to identify cartridges. |
38
+
|`cartridges`| string[]| No | All found cartridges | Array of cartridge names to include in the deployment. Use this to selectively deploy specific cartridges when you have multiple cartridges but only want to update some. If not specified, all cartridges found in the directory are deployed. |
39
39
|`exclude`| string[]| No | None | Array of cartridge names to exclude from the deployment. Use this to skip deploying certain cartridges, such as third-party or unchanged cartridges. Applied after the include filter. |
40
40
|`reload`| boolean | No |`false`| Whether to reload the code version after deployment. When `true`, the tool triggers a code version reload on the instance. |
41
41
@@ -77,9 +77,8 @@ Use the MCP tool to deploy cartridges excluding test_cartridge and bm_extensions
77
77
78
78
Returns a deployment result object containing:
79
79
80
-
-`cartridges` - Array of cartridge names that were deployed
80
+
-`cartridges` - Array of cartridge mappings that were deployed (each with name, src, dest)
81
81
-`codeVersion` - Code version name used for deployment
82
-
-`hostname` - Instance hostname where cartridges were deployed
83
82
-`reloaded` - Whether the code version was reloaded (if `reload: true`)
Replace `/path/to/packages/b2c-dx-mcp/bin/dev.js` with the actual path to your cloned repository.
21
+
22
+
## Testing the MCP Server Locally
23
+
24
+
### MCP Inspector
25
+
26
+
Use MCP Inspector to browse tools and test them in a web UI:
27
+
28
+
```bash
29
+
cd packages/b2c-dx-mcp
30
+
pnpm run inspect:dev
31
+
```
32
+
33
+
This runs TypeScript directly (no build needed). Open the localhost URL shown in the terminal, click **Connect**, then **List Tools** to see available tools.
34
+
35
+
### IDE Integration
36
+
37
+
Configure your IDE to use the local MCP server. Add this to your IDE's MCP configuration:
38
+
39
+
```json
40
+
{
41
+
"mcpServers": {
42
+
"b2c-dx-local": {
43
+
"command": "node",
44
+
"args": [
45
+
"/full/path/to/packages/b2c-dx-mcp/bin/dev.js",
46
+
"--toolsets", "all",
47
+
"--allow-non-ga-tools"
48
+
]
49
+
}
50
+
}
51
+
}
52
+
```
53
+
54
+
> **Note:** When developing the B2C DX MCP package (`packages/b2c-dx-mcp`), use `node` with the path to `bin/dev.js` in args. Build to latest (`pnpm run build` from the repo root) so changes that require a rebuild are reflected when you run the server.
55
+
>
56
+
> **Note:** Make sure the script is executable: `chmod +x /full/path/to/packages/b2c-dx-mcp/bin/dev.js`
57
+
>
58
+
> **Note:** Restart the MCP server in your IDE to pick up code changes.
Copy file name to clipboardExpand all lines: packages/b2c-dx-mcp/README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,7 +90,7 @@ AI assistants (like Cursor, Claude Desktop) automatically decide which MCP tools
90
90
91
91
The `storefront_next_development_guidelines` tool provides critical architecture rules and best practices. **Use this tool first** when starting new Storefront Next development or when you need architecture guidance.
92
92
93
-
**Good prompts:**
93
+
**Prompt examples:**
94
94
- ✅ "I'm new to Storefront Next. Use the MCP tool to show me the critical rules I need to know."
95
95
- ✅ "I need to build a product detail page. Use the MCP tool to show me best practices for data fetching and component patterns."
96
96
- ✅ "I need to build a checkout form with authentication and validation. Use the MCP tool to show me how to handle form submissions, authentication, and internationalized error messages."
@@ -114,7 +114,7 @@ The `storefront_next_development_guidelines` tool provides critical architecture
114
114
115
115
##### PWA Kit Development
116
116
117
-
**Good prompts:**
117
+
**Prompt examples:**
118
118
- ✅ "I'm starting a new PWA Kit project. Use the MCP tool to get the development guidelines."
119
119
- ✅ "Use the MCP tool to create a new product listing page component in my PWA Kit project."
120
120
- ✅ "Use the MCP tool to recommend React hooks for fetching product data in PWA Kit."
@@ -153,14 +153,14 @@ Get registration status of custom API endpoints deployed on the instance (remote
153
153
154
154
##### Cartridge Deployment
155
155
156
-
**Good prompts:**
156
+
**Prompt examples:**
157
157
- ✅ "Use the MCP tool to deploy my cartridges to the sandbox instance."
158
158
- ✅ "Use the MCP tool to deploy only the app_storefront_base cartridge to production."
159
159
- ✅ "Use the MCP tool to deploy cartridges from the ./cartridges directory and reload the code version."
160
160
161
161
##### MRT Bundle Operations
162
162
163
-
**Good prompts:**
163
+
**Prompt examples:**
164
164
- ✅ "Use the MCP tool to build and push my Storefront Next bundle to staging."
165
165
- ✅ "Use the MCP tool to push the bundle from ./build directory to Managed Runtime."
166
166
- ✅ "Use the MCP tool to deploy my PWA Kit or Storefront Next bundle to production with a deployment message."
0 commit comments