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
@@ -6,54 +6,9 @@ MCP (Model Context Protocol) server for Salesforce B2C Commerce Cloud developer
6
6
7
7
This package provides an MCP server that exposes B2C Commerce developer tools for AI assistants. Built with [oclif](https://oclif.io/) for robust CLI handling with auto-generated help and environment variable support.
8
8
9
-
## Installation
10
-
11
-
```bash
12
-
npm install -g @salesforce/b2c-dx-mcp
13
-
```
14
-
15
-
## Configuration
16
-
17
-
Tools that interact with B2C Commerce instances (e.g., MRT, SCAPI, cartridge deployment) require credentials, which can be provided via **environment variables**, a **`.env` file**, a **`dw.json` file**, or the **`--config`** flag. Local tools (e.g., scaffolding, development guidelines) work without configuration.
18
-
19
-
**Priority order** (highest to lowest):
20
-
1. Environment variables (`SFCC_*`) — includes `.env` file if present (shell env vars override `.env`)
21
-
2.`dw.json` file (auto-discovered or via `--config`)
22
-
23
-
### Option 1: Environment Variables
24
-
25
-
Set environment variables directly or create a `.env` file in your project root:
26
-
27
-
```bash
28
-
# .env file or shell exports
29
-
SFCC_HOSTNAME="your-sandbox.demandware.net"
30
-
SFCC_USERNAME="your.username"
31
-
SFCC_PASSWORD="your-access-key"
32
-
SFCC_CLIENT_ID="your-client-id"
33
-
SFCC_CLIENT_SECRET="your-client-secret"
34
-
SFCC_CODE_VERSION="version1"
35
-
```
36
-
37
-
### Option 2: dw.json File
38
-
39
-
Create a `dw.json` file in your project root (auto-discovered by searching upward from current working directory):
40
-
41
-
```json
42
-
{
43
-
"hostname": "your-sandbox.demandware.net",
44
-
"username": "your.username",
45
-
"password": "your-access-key",
46
-
"client-id": "your-client-id",
47
-
"client-secret": "your-client-secret",
48
-
"code-version": "version1"
49
-
}
50
-
```
51
-
52
-
> **Note:** Environment variables take precedence over `dw.json` values.
53
-
54
9
## Usage
55
10
56
-
Configure your AI assistant to use this MCP server.
11
+
Configure your AI assistant to use this MCP server. Since the package is not yet published to npm, use the local development setup below. See the [Development](#development) section for setup instructions.
> **Note:** Some tools appear in multiple toolsets (e.g., `mrt_bundle_push`, `scapi_discovery`). When using multiple toolsets, tools are automatically deduplicated.
169
147
170
148
171
149
## Development
@@ -228,10 +206,10 @@ For CLI-based testing:
228
206
229
207
```bash
230
208
# List all tools
231
-
npx mcp-inspector --cli node bin/run.js -s all --allow-non-ga-tools --method tools/list
209
+
npx mcp-inspector --cli node bin/run.js --toolsets all --allow-non-ga-tools --method tools/list
232
210
233
211
# Call a specific tool
234
-
npx mcp-inspector --cli node bin/run.js -s all --allow-non-ga-tools \
212
+
npx mcp-inspector --cli node bin/run.js --toolsets all --allow-non-ga-tools \
235
213
--method tools/call \
236
214
--tool-name sfnext_design_decorator
237
215
```
@@ -247,7 +225,7 @@ Configure your IDE to use the local server. Choose development mode (no build re
@@ -274,12 +252,53 @@ Send raw MCP protocol messages:
274
252
275
253
```bash
276
254
# List all tools
277
-
echo'{"jsonrpc":"2.0","id":1,"method":"tools/list"}'| node bin/run.js -s all
255
+
echo'{"jsonrpc":"2.0","id":1,"method":"tools/list"}'| node bin/run.js --toolsets all
278
256
279
257
# Call a specific tool
280
-
echo'{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"code_list","arguments":{}}}'| node bin/run.js -s all
258
+
echo'{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"cartridge_deploy","arguments":{}}}'| node bin/run.js --toolsets all
259
+
```
260
+
261
+
### Configuration
262
+
263
+
> **Note:** Configuration is not currently required as all tools are placeholder implementations. This section will be relevant once tools are fully implemented.
264
+
265
+
Tools that interact with B2C Commerce instances (e.g., MRT, SCAPI, cartridge deployment) require credentials, which can be provided via **environment variables**, a **`.env` file**, a **`dw.json` file**, or the **`--config`** flag. Local tools (e.g., scaffolding, development guidelines) work without configuration.
266
+
267
+
**Priority order** (highest to lowest):
268
+
1. Environment variables (`SFCC_*`) — includes `.env` file if present (shell env vars override `.env`)
269
+
2.`dw.json` file (auto-discovered or via `--config`)
270
+
271
+
#### Option 1: Environment Variables
272
+
273
+
Set environment variables directly or create a `.env` file in your project root:
274
+
275
+
```bash
276
+
# .env file or shell exports
277
+
SFCC_HOSTNAME="your-sandbox.demandware.net"
278
+
SFCC_USERNAME="your.username"
279
+
SFCC_PASSWORD="your-access-key"
280
+
SFCC_CLIENT_ID="your-client-id"
281
+
SFCC_CLIENT_SECRET="your-client-secret"
282
+
SFCC_CODE_VERSION="version1"
281
283
```
282
284
285
+
#### Option 2: dw.json File
286
+
287
+
Create a `dw.json` file in your project root (auto-discovered by searching upward from current working directory):
288
+
289
+
```json
290
+
{
291
+
"hostname": "your-sandbox.demandware.net",
292
+
"username": "your.username",
293
+
"password": "your-access-key",
294
+
"client-id": "your-client-id",
295
+
"client-secret": "your-client-secret",
296
+
"code-version": "version1"
297
+
}
298
+
```
299
+
300
+
> **Note:** Environment variables take precedence over `dw.json` values.
0 commit comments