Skip to content

Commit 34adcfb

Browse files
authored
Merge branch 'develop' into improve-e2e-stability
2 parents b211df3 + faa913a commit 34adcfb

File tree

12 files changed

+1897
-9
lines changed

12 files changed

+1897
-9
lines changed

packages/pwa-kit-mcp/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- Added Hooks Recommendation tool [#3388](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3388)
55
- Added Agent Guidelines. [#3366](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3366)
66
- Added Explore SCAPI SHOP API Tool [#3385](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3385)
7+
- Added Custom APIs Discovery. [##3387](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3387)
78

89
## v0.3.0 (Sep 25, 2025)
910
- Added telemetry for MCP tools. [#3327](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/3327)

packages/pwa-kit-mcp/README.md

Lines changed: 70 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,20 @@ The PWA Kit MCP Server offers the following intelligent tools tailored to Salesf
4545
Runs performance and accessibility audits on a provided site URL.
4646
*Example: `https://pwa-kit.mobify-storefront.com`*
4747

48-
* ** `pwakit_install_agent_rules` **:
48+
* **`pwakit_install_agent_rules`**:
4949
Adds an Agent Guidelines rule file to your project that helps the AI make better use of the PWA Kit MCP Server.
5050
*Example: `Install the Agent MCP Tool Usage Guidelines`*
5151

52-
* ** `pwakit_explore_scapi_shop_api` **:
52+
* **`pwakit_explore_scapi_shop_api`**:
5353
Explore and document the out of box SCAPI API endpoints, parameters, and usage examples.
5454
*Example: `How do I get a product?`*
55+
56+
* **`scapi_custom_api_discovery`**:
57+
Discovers custom SCAPI APIs registered on BM, and fetches the schema of those APIs. Requires credential configuration described in the 🔧 Configuration Options section.
58+
*Note: Ensure your API Client has access to your instance and has 'sfcc.custom-apis' as allowed scope*
59+
60+
*Custom API DX Endpoint Documentation*: [https://developer.salesforce.com/docs/commerce/commerce-api/references/custom-apis?meta=getEndpoints](https://developer.salesforce.com/docs/commerce/commerce-api/references/custom-apis?meta=getEndpoints)
61+
5562

5663

5764
## ▶️ Running the MCP Server
@@ -82,6 +89,56 @@ The PWA Kit MCP Server offers the following intelligent tools tailored to Salesf
8289
```
8390
_NOTE: Replace `{{path-to-app-directory}}` with the absolute path to your generated project's `app` subfolder. For example: `"/Users/username/mcp-server-folder/mystorefront/app"`._
8491

92+
### 🔧 Configuration Options
93+
94+
The MCP server supports two ways to configure your Salesforce Commerce Cloud credentials:
95+
96+
#### Option 1: dw.json Configuration File (Recommended)
97+
98+
Create a `dw.json` file under your project root directory with your SFCC credentials:
99+
100+
```json
101+
{
102+
"hostname": "https://your-instance.dx.commercecloud.salesforce.com",
103+
"instance-id": "your-instance-id",
104+
"client-id": "your-client-id",
105+
"client-secret": "your-client-secret",
106+
"org-id": "your-org-id",
107+
"short-code": "your-short-code"
108+
}
109+
```
110+
111+
If `dw.json` doesn't live directly under your project root directory, then update your `mcp.json` to point to the `dw.json` file path:
112+
113+
```json
114+
{
115+
"mcpServers": {
116+
"pwa-kit": {
117+
"command": "npx",
118+
"args": ["-y", "@salesforce/pwa-kit-mcp", "--dw-json", "/path/to/your/dw.json"],
119+
"env": {
120+
"PWA_STOREFRONT_APP_PATH": "{{path-to-app-directory}}"
121+
}
122+
}
123+
}
124+
}
125+
```
126+
127+
#### Option 2: Environment Variables
128+
129+
Use environment variables to set SFCC credentials:
130+
131+
```
132+
SFCC_HOSTNAME=https://your-instance.dx.commercecloud.salesforce.com
133+
SFCC_ORG_ID=your-org-id
134+
SFCC_SHORT_CODE=your-short-code
135+
SFCC_INSTANCE_ID=your-instance-id
136+
SFCC_CLIENT_ID=your-client-id
137+
SFCC_CLIENT_SECRET=your-client-secret
138+
```
139+
140+
**Note:** Environment variables take precedence over`dw.json` values if both are provided.
141+
85142
## 📊 Telemetry
86143

87144
The server collects minimal, anonymous usage data to improve reliability and the developer experience.
@@ -98,10 +155,13 @@ The server collects minimal, anonymous usage data to improve reliability and the
98155

99156
These are the available flags that you can pass to the `args` option.
100157

101-
| Flag Name | Description | Required? |Notes |
158+
| Flag Name | Description | Required? | Notes |
102159
| -----------------| -------| ------- | ----- |
103-
| `--no-telemetry` | Boolean flag to disable telemetry, the automatic collection of data for monitoring and analysis. | No | Telemetry is enabled by default, so specify this flag to disable it. |
104-
| `"-y", "@salesforce/mcp"` | Tells `npx` to automatically install the `@salesforce/mcp` package instead of asking permission. | Yes | Don't change this.
160+
| `"-y", "@salesforce/pwa-kit-mcp"` | Tells `npx` to automatically install the `@salesforce/pwa-kit-mcp` package instead of asking permission. | Yes | Don't change this. |
161+
| `"--dw-json", "/path/to/dw.json"` | Path to a `dw.json` configuration file containing SFCC credentials. Use this flag if `dw.json` does not live under your project root directory. | No | Alternative to environment variables. |
162+
| `--no-telemetry` | Boolean flag to disable telemetry, the automatic collection of data for monitoring and analysis. | No | Telemetry is enabled by default, so specify this flag to disable it. |
163+
164+
105165

106166
Once saved, Cursor will:
107167

@@ -140,7 +200,11 @@ from the command pallet and editing your `pwa-kit` entry to look like the entry
140200
"mcpServers": {
141201
"pwa-kit": {
142202
"command": "node",
143-
"args": ["{{path-to-app-mono-repo}}/packages/pwa-kit-mcp/dist/server/server.js"],
203+
"args": [
204+
"{{path-to-app-mono-repo}}/packages/pwa-kit-mcp/dist/server/server.js",
205+
"--dw-json",
206+
"{{path-to-dw.json}}"
207+
],
144208
"env": {
145209
"PWA_STOREFRONT_APP_PATH": "{{path-to-app-directory}}"
146210
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"hostname": "https://your-instance.dx.commercecloud.salesforce.com",
3+
"instance-id": "your_instance_id",
4+
"client-id": "your-client-id-here",
5+
"client-secret": "your-client-secret-here",
6+
"org-id": "your_org_id",
7+
"short-code": "your-short-code"
8+
}

0 commit comments

Comments
 (0)