Skip to content

Commit c10c86e

Browse files
@W-20598954 MCP docs edits from PR reviewers
1 parent a3cc122 commit c10c86e

6 files changed

Lines changed: 69 additions & 71 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Issues labelled `good first contribution`.
4444

4545
# Running the MCP server from source
4646

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).
4848

4949
# Contribution Checklist
5050

docs/mcp/installation.md

Lines changed: 1 addition & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ This guide covers installing and configuring the B2C DX MCP Server for various M
1212
- A B2C Commerce project (for project-specific toolsets)
1313
- MCP client (Cursor, Claude Desktop, or compatible client)
1414

15-
## Installation Methods
16-
17-
### Option 1: Published Package
18-
19-
Once published to npm, you can use `npx`:
15+
## Install via npm (Recommended)
2016

2117
```json
2218
{
@@ -29,23 +25,6 @@ Once published to npm, you can use `npx`:
2925
}
3026
```
3127

32-
### Option 2: Development Build (Local)
33-
34-
For local development or testing, use the development build directly:
35-
36-
```json
37-
{
38-
"mcpServers": {
39-
"b2c-dx": {
40-
"command": "node",
41-
"args": ["/path/to/packages/b2c-dx-mcp/bin/dev.js", "--working-directory", "${workspaceFolder}", "--allow-non-ga-tools"]
42-
}
43-
}
44-
}
45-
```
46-
47-
Replace `/path/to/packages/b2c-dx-mcp/bin/dev.js` with the actual path to your cloned repository.
48-
4928
## Cursor Configuration
5029

5130
Cursor supports the `${workspaceFolder}` variable, which automatically resolves to your current workspace directory.
@@ -221,44 +200,6 @@ If no B2C markers are found:
221200
Projects with multiple markers (e.g., cartridges + PWA Kit) get combined toolsets. For example:
222201
- Cartridges + PWA Kit → CARTRIDGES, PWAV3, MRT, SCAPI
223202

224-
## Testing the MCP Server Locally
225-
226-
### MCP Inspector
227-
228-
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.
261-
262203
## Troubleshooting
263204

264205
### Server Not Starting

docs/mcp/tools/cartridge-deploy.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ Supports two authentication methods:
3434

3535
| Parameter | Type | Required | Default | Description |
3636
|-----------|------|----------|---------|-------------|
37-
| `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. |
3939
| `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. |
4040
| `reload` | boolean | No | `false` | Whether to reload the code version after deployment. When `true`, the tool triggers a code version reload on the instance. |
4141

@@ -77,9 +77,8 @@ Use the MCP tool to deploy cartridges excluding test_cartridge and bm_extensions
7777

7878
Returns a deployment result object containing:
7979

80-
- `cartridges` - Array of cartridge names that were deployed
80+
- `cartridges` - Array of cartridge mappings that were deployed (each with name, src, dest)
8181
- `codeVersion` - Code version name used for deployment
82-
- `hostname` - Instance hostname where cartridges were deployed
8382
- `reloaded` - Whether the code version was reloaded (if `reload: true`)
8483

8584
## Requirements

docs/mcp/tools/mrt-bundle-push.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ Use the MCP tool to push the bundle from ./dist directory to Managed Runtime.
7777
Returns a push result object containing:
7878

7979
- `bundleId` - Unique identifier for the pushed bundle
80-
- `project` - MRT project slug
81-
- `environment` - Target environment (if deployed)
80+
- `projectSlug` - MRT project slug
81+
- `target` - Target environment (if deployed)
8282
- `deployed` - Whether the bundle was deployed (if `deploy: true`)
8383
- `message` - Deployment message (if provided)
8484

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Contributing to B2C DX MCP
2+
3+
For general contributing guidelines, see the [root CONTRIBUTING.md](../../CONTRIBUTING.md).
4+
5+
## Development Build (Local)
6+
7+
For local development or testing, use the development build directly:
8+
9+
```json
10+
{
11+
"mcpServers": {
12+
"b2c-dx": {
13+
"command": "node",
14+
"args": ["/path/to/packages/b2c-dx-mcp/bin/dev.js", "--working-directory", "${workspaceFolder}", "--allow-non-ga-tools"]
15+
}
16+
}
17+
}
18+
```
19+
20+
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.

packages/b2c-dx-mcp/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ AI assistants (like Cursor, Claude Desktop) automatically decide which MCP tools
9090

9191
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.
9292

93-
**Good prompts:**
93+
**Prompt examples:**
9494
- ✅ "I'm new to Storefront Next. Use the MCP tool to show me the critical rules I need to know."
9595
- ✅ "I need to build a product detail page. Use the MCP tool to show me best practices for data fetching and component patterns."
9696
- ✅ "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
114114

115115
##### PWA Kit Development
116116

117-
**Good prompts:**
117+
**Prompt examples:**
118118
- ✅ "I'm starting a new PWA Kit project. Use the MCP tool to get the development guidelines."
119119
- ✅ "Use the MCP tool to create a new product listing page component in my PWA Kit project."
120120
- ✅ "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
153153

154154
##### Cartridge Deployment
155155

156-
**Good prompts:**
156+
**Prompt examples:**
157157
- ✅ "Use the MCP tool to deploy my cartridges to the sandbox instance."
158158
- ✅ "Use the MCP tool to deploy only the app_storefront_base cartridge to production."
159159
- ✅ "Use the MCP tool to deploy cartridges from the ./cartridges directory and reload the code version."
160160

161161
##### MRT Bundle Operations
162162

163-
**Good prompts:**
163+
**Prompt examples:**
164164
- ✅ "Use the MCP tool to build and push my Storefront Next bundle to staging."
165165
- ✅ "Use the MCP tool to push the bundle from ./build directory to Managed Runtime."
166166
- ✅ "Use the MCP tool to deploy my PWA Kit or Storefront Next bundle to production with a deployment message."

0 commit comments

Comments
 (0)