Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/unregister-placeholder-tools.md
Comment thread
yhsieh1 marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@salesforce/b2c-dx-mcp': patch
---

Unregister placeholder tools and update README for preview release

- Remove placeholder tools (PWA Kit, Storefront Next) so users only see implemented tools at startup
- Update README: preview release wording, accurate tool tables, credential notes, example prompts
- Fix package license to Apache-2.0
2 changes: 1 addition & 1 deletion docs/mcp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: MCP Server for Salesforce B2C Commerce - AI-assisted development to

The B2C DX MCP Server enables AI assistants (like Cursor, Claude Desktop, and others) to help with B2C Commerce development tasks. It provides toolsets for **SCAPI**, **CARTRIDGES**, **MRT**, **PWAV3**, and **STOREFRONTNEXT** development.

> ⚠️ **Active Development**: This package is under active development. Some tools are currently **placeholder implementations** that return mock responses. Tool implementations will be added incrementally.
> ⚠️ **Preview Release**: This package is in preview. Tools are functional but require `--allow-non-ga-tools` to enable. Additional tools will be added in future releases.

## Overview

Expand Down
19 changes: 3 additions & 16 deletions docs/mcp/toolsets.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Available toolsets and tools in the B2C DX MCP Server for SCAPI, CA

The B2C DX MCP Server provides five toolsets with specialized tools for different B2C Commerce development workflows.

> **Note:** Some tools are currently placeholder or early release implementations. Use `--allow-non-ga-tools` flag to enable them.
> **Note:** Tools require `--allow-non-ga-tools` to enable (preview release).

## Overview

Expand Down Expand Up @@ -53,21 +53,14 @@ Managed Runtime operations for PWA Kit and Storefront Next deployments.

PWA Kit v3 development tools for building headless storefronts.

**Status:** 🚧 Placeholder
**Status:** 🚧 Early Access (PWA Kit-specific tools planned)

**Auto-enabled for:** PWA Kit v3 projects (detected by `@salesforce/pwa-kit-*` dependencies)

### Tools

| Tool | Description | Documentation |
|------|-------------|---------------|
| `pwakit_create_storefront` | Create a new PWA Kit storefront project | — |
| `pwakit_create_page` | Create a new page component in the PWA Kit project | — |
| `pwakit_create_component` | Create a React component in the PWA Kit project | — |
| `pwakit_get_dev_guidelines` | Get PWA Kit development guidelines and best practices | — |
| `pwakit_recommend_hooks` | Recommend appropriate React hooks for PWA Kit use cases | — |
| `pwakit_run_site_test` | Run site tests for PWA Kit project | — |
| `pwakit_install_agent_rules` | Install AI agent rules for PWA Kit development | — |
| [`scapi_schemas_list`](./tools/scapi-schemas-list) | List or fetch SCAPI schemas (standard and custom). Use apiFamily: "custom" for custom APIs. | [View details](./tools/scapi-schemas-list) |
| [`scapi_custom_apis_status`](./tools/scapi-custom-apis-status) | Get registration status of custom API endpoints (active/not_registered). Remote only, requires OAuth. | [View details](./tools/scapi-custom-apis-status) |
| [`mrt_bundle_push`](./tools/mrt-bundle-push) | Build, push bundle (optionally deploy) | [View details](./tools/mrt-bundle-push) |
Expand All @@ -86,13 +79,12 @@ Salesforce Commerce API discovery and exploration.
|------|-------------|---------------|
| [`scapi_schemas_list`](./tools/scapi-schemas-list) | List or fetch SCAPI schemas (standard and custom). Use apiFamily: "custom" for custom APIs. | [View details](./tools/scapi-schemas-list) |
| [`scapi_custom_apis_status`](./tools/scapi-custom-apis-status) | Get registration status of custom API endpoints (active/not_registered). Remote only, requires OAuth. | [View details](./tools/scapi-custom-apis-status) |
| `scapi_customapi_scaffold` | Scaffold a new custom SCAPI API (not yet implemented) | — |

## STOREFRONTNEXT

Storefront Next development tools for building modern storefronts.

**Status:** 🚧 Placeholder
**Status:** 🚧 Early Access

**Auto-enabled for:** Storefront Next projects (detected by `@salesforce/storefront-next*` dependencies)

Expand All @@ -101,12 +93,7 @@ Storefront Next development tools for building modern storefronts.
| Tool | Description | Documentation |
|------|-------------|---------------|
| `storefront_next_development_guidelines` | Get Storefront Next development guidelines and best practices | — |
| `storefront_next_site_theming` | Configure and manage site theming for Storefront Next | — |
| `storefront_next_figma_to_component_workflow` | Convert Figma designs to Storefront Next components | — |
| `storefront_next_generate_component` | Generate a new Storefront Next component | — |
| `storefront_next_map_tokens_to_theme` | Map design tokens to Storefront Next theme configuration | — |
| [`storefront_next_page_designer_decorator`](./tools/storefront-next-page-designer-decorator) | Add Page Designer decorators to Storefront Next components | [View details](./tools/storefront-next-page-designer-decorator) |
| `storefront_next_generate_page_designer_metadata` | Generate Page Designer metadata for Storefront Next components | — |
| [`scapi_schemas_list`](./tools/scapi-schemas-list) | List or fetch SCAPI schemas (standard and custom). Use apiFamily: "custom" for custom APIs. | [View details](./tools/scapi-schemas-list) |
| [`scapi_custom_apis_status`](./tools/scapi-custom-apis-status) | Get registration status of custom API endpoints (active/not_registered). Remote only, requires OAuth. | [View details](./tools/scapi-custom-apis-status) |
| [`mrt_bundle_push`](./tools/mrt-bundle-push) | Build, push bundle (optionally deploy) | [View details](./tools/mrt-bundle-push) |
Expand Down
25 changes: 7 additions & 18 deletions packages/b2c-dx-mcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

MCP (Model Context Protocol) server for Salesforce B2C Commerce developer experience tools.

> ⚠️ **Active Development**: This package is under active development. Some tools are currently **placeholder implementations** that return mock responses. Tool implementations will be added incrementally.
> ⚠️ **Preview Release**: This package is in preview. Tools are functional but require `--allow-non-ga-tools` to enable. Additional tools will be added in future releases.

## Overview

Expand Down Expand Up @@ -184,6 +184,8 @@ Credentials can be provided via **config files** (recommended), **environment va
| **PWAV3** | `--project-directory` only (+ MRT config for deployments) |
| **STOREFRONTNEXT** | `--project-directory` only (+ MRT/CARTRIDGES config for those tools) |

> **Note:** SCAPI and CARTRIDGES use the same `hostname` (your B2C instance). All B2C credentials are typically stored together in `dw.json`.

**Option 1: Config files (recommended)**

B2C credentials — [`dw.json`](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/configuration.html#configuration-file) in your project root:
Expand Down Expand Up @@ -254,7 +256,7 @@ See [Flag Reference](#flag-reference) for all available flags and env vars.

Use `--toolsets all` to enable all toolsets, or select specific ones with `--toolsets CARTRIDGES,MRT`.

> **Note:** All tools are currently placeholder implementations. Use `--allow-non-ga-tools` flag to enable them.
> **Note:** Tools require `--allow-non-ga-tools` to enable (preview release).

#### CARTRIDGES
Cartridge development, deployment, and code version management.
Expand All @@ -274,17 +276,10 @@ Managed Runtime operations for PWA Kit and Storefront Next deployments.

#### PWAV3
PWA Kit v3 development tools for building headless storefronts.
- **Status:** 🚧 Placeholder
- **Status:** 🚧 Early Access (PWA Kit-specific tools planned)

| Tool | Description |
|------|-------------|
| `pwakit_create_storefront` | Create a new PWA Kit storefront project |
| `pwakit_create_page` | Create a new page component in PWA Kit project |
| `pwakit_create_component` | Create a new React component in PWA Kit project |
| `pwakit_get_dev_guidelines` | Get PWA Kit development guidelines and best practices |
| `pwakit_recommend_hooks` | Recommend appropriate React hooks for PWA Kit use cases |
| `pwakit_run_site_test` | Run site tests for PWA Kit project |
| `pwakit_install_agent_rules` | Install AI agent rules for PWA Kit development |
| `scapi_schemas_list` | List or fetch SCAPI schemas (standard and custom). Use apiFamily: "custom" for custom APIs. |
| `scapi_custom_apis_status` | Get registration status of custom API endpoints (active/not_registered). Remote only, requires OAuth. |
| `mrt_bundle_push` | Build, push bundle (optionally deploy) |
Expand All @@ -297,21 +292,15 @@ Salesforce Commerce API discovery and exploration.
|------|-------------|
| `scapi_schemas_list` | List or fetch SCAPI schemas (standard and custom). Use apiFamily: "custom" for custom APIs. |
| `scapi_custom_apis_status` | Get registration status of custom API endpoints (active/not_registered). Remote only, requires OAuth. |
| `scapi_customapi_scaffold` | Scaffold a new custom SCAPI API (not yet implemented) |

#### STOREFRONTNEXT
Storefront Next development tools for building modern storefronts.
- **Status:** 🚧 Placeholder
- **Status:** 🚧 Early Access

| Tool | Description |
|------|-------------|
| `storefront_next_development_guidelines` | Get Storefront Next development guidelines and best practices |
| `storefront_next_site_theming` | Configure and manage site theming for Storefront Next |
| `storefront_next_figma_to_component_workflow` | Convert Figma designs to Storefront Next components |
| `storefront_next_generate_component` | Generate a new Storefront Next component |
| `storefront_next_map_tokens_to_theme` | Map design tokens to Storefront Next theme configuration |
| `storefront_next_page_designer_decorator` | Add Page Designer decorators to Storefront Next components |
| `storefront_next_generate_page_designer_metadata` | Generate Page Designer metadata for Storefront Next components |
| `scapi_schemas_list` | List or fetch SCAPI schemas (standard and custom). Use apiFamily: "custom" for custom APIs. |
| `scapi_custom_apis_status` | Get registration status of custom API endpoints (active/not_registered). Remote only, requires OAuth. |
| `mrt_bundle_push` | Build, push bundle (optionally deploy) |
Expand Down Expand Up @@ -446,7 +435,7 @@ Configure your IDE to use the local MCP server. Add this to your IDE's MCP confi
Send raw MCP protocol messages:

```bash
# List all tools (--allow-non-ga-tools required for placeholder tools)
# List all tools (--allow-non-ga-tools required for preview tools)
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node bin/dev.js --toolsets all --allow-non-ga-tools

# Call a specific tool
Expand Down
2 changes: 1 addition & 1 deletion packages/b2c-dx-mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "MCP server for B2C Commerce developer experience tools",
"version": "0.4.2",
"author": "Salesforce",
"license": "MIT",
"license": "Apache-2.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two Qs:

  • is it a problem to have multiple licenses in one mono-repo?
  • do we need a LICENSE file similar to packages/b2c-vs-extension/LICENSE

Copy link
Copy Markdown
Contributor Author

@yhsieh1 yhsieh1 Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I do not see a problem to have multiple licenses on mono-repo. Each package can have its own license and we all use Apache-2.0 in this repo.
  • Since all package has the same license and we have root license.txt there is no need for separated LICENSE file for each package. package.json is enough for npm – The "license" field in package.json is what npm uses. A separate LICENSE file is not required for publishing.

"repository": "SalesforceCommerceCloud/b2c-developer-tooling",
"keywords": [
"salesforce",
Expand Down
2 changes: 1 addition & 1 deletion packages/b2c-dx-mcp/src/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ async function registerTools(tools: McpTool[], server: B2CDxMcpServer, allowNonG
}

// Register the tool
// TODO: Telemetry - Tool registration includes timing/error tracking
// Register the tool (invocations are tracked by B2CDxMcpServer)
server.addTool(tool.name, tool.description, tool.inputSchema, async (args) => tool.handler(args));
}
}
5 changes: 1 addition & 4 deletions packages/b2c-dx-mcp/src/tools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
*
* This module exports all available tools and utilities.
* Tools use the @salesforce/b2c-tooling-sdk operations layer directly.
*
* > ⚠️ **PLACEHOLDER - ACTIVE DEVELOPMENT**
* > Tools are currently placeholder implementations that return mock responses.
* > Actual implementations are coming soon. Use `--allow-non-ga-tools` flag to enable.
* Use `--allow-non-ga-tools` flag to enable tools (preview release).
*
* @module tools
*/
Expand Down
133 changes: 10 additions & 123 deletions packages/b2c-dx-mcp/src/tools/pwav3/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,138 +8,25 @@
* PWA Kit v3 toolset for B2C Commerce.
*
* This toolset provides MCP tools for PWA Kit v3 development.
*
* > ⚠️ **PLACEHOLDER - ACTIVE DEVELOPMENT**
* > Tools in this module are placeholder implementations that return mock responses.
* > Actual implementations are coming soon. Use `--allow-non-ga-tools` flag to enable.
* PWA Kit-specific tools are planned for future releases.
* mrt_bundle_push (from MRT toolset) is available for PWAV3 projects.
*
* @module tools/pwav3
*/

import {z} from 'zod';
import type {McpTool, Toolset} from '../../utils/index.js';
import type {McpTool} from '../../utils/index.js';
import type {Services} from '../../services.js';
import {createToolAdapter, jsonResult} from '../adapter.js';

/**
* Common input type for placeholder tools.
*/
interface PlaceholderInput {
message?: string;
}

/**
* Common output type for placeholder tools.
*/
interface PlaceholderOutput {
tool: string;
status: string;
message: string;
input: PlaceholderInput;
timestamp: string;
}

/**
* Creates a placeholder tool for PWA Kit development.
*
* Placeholder tools log invocations and return mock responses until
* the actual implementation is available.
*
* @param name - Tool name
* @param description - Tool description
* @param toolsets - Toolsets this tool belongs to
* @param loadServices - Function that loads configuration and returns Services instance
* @returns The configured MCP tool
*/
function createPlaceholderTool(
name: string,
description: string,
toolsets: Toolset[],
loadServices: () => Services,
): McpTool {
return createToolAdapter<PlaceholderInput, PlaceholderOutput>(
{
name,
description: `[PLACEHOLDER] ${description}`,
toolsets,
isGA: false,
requiresInstance: false,
inputSchema: {
message: z.string().optional().describe('Optional message to echo'),
},
async execute(args) {
// Placeholder implementation
const timestamp = new Date().toISOString();

return {
tool: name,
status: 'placeholder',
message: `This is a placeholder implementation for '${name}'. The actual implementation is coming soon.`,
input: args,
timestamp,
};
},
formatOutput: (output) => jsonResult(output),
},
loadServices,
);
}

/**
* Creates all tools for the PWAV3 toolset.
*
* Note: mrt_bundle_push is defined in the MRT toolset with
* toolsets: ["MRT", "PWAV3", "STOREFRONTNEXT"] and will
* automatically appear in PWAV3.
* PWA Kit-specific tools are not yet implemented. mrt_bundle_push is defined
* in the MRT toolset with toolsets: ["MRT", "PWAV3", "STOREFRONTNEXT"] and
* automatically appears in PWAV3 for bundle deployment.
*
* @param loadServices - Function that loads configuration and returns Services instance
* @returns Array of MCP tools
* @param _loadServices - Function that loads configuration and returns Services instance
* @returns Array of MCP tools (empty until PWA Kit tools are implemented)
*/
export function createPwav3Tools(loadServices: () => Services): McpTool[] {
return [
// PWA Kit development tools
createPlaceholderTool(
'pwakit_create_storefront',
'Create a new PWA Kit storefront project',
['PWAV3'],
loadServices,
),
createPlaceholderTool(
'pwakit_create_page',
'Create a new page component in PWA Kit project',
['PWAV3'],
loadServices,
),
createPlaceholderTool(
'pwakit_create_component',
'Create a new React component in PWA Kit project',
['PWAV3'],
loadServices,
),
createPlaceholderTool(
'pwakit_get_dev_guidelines',
'Get PWA Kit development guidelines and best practices',
['PWAV3'],
loadServices,
),
createPlaceholderTool(
'pwakit_recommend_hooks',
'Recommend appropriate React hooks for PWA Kit use cases',
['PWAV3'],
loadServices,
),
createPlaceholderTool('pwakit_run_site_test', 'Run site tests for PWA Kit project', ['PWAV3'], loadServices),
createPlaceholderTool(
'pwakit_install_agent_rules',
'Install AI agent rules for PWA Kit development',
['PWAV3'],
loadServices,
),
createPlaceholderTool(
'pwakit_explore_scapi_shop_api',
'Explore SCAPI Shop API endpoints and capabilities',
['PWAV3'],
loadServices,
),
];
export function createPwav3Tools(_loadServices: () => Services): McpTool[] {
return [];
}
12 changes: 0 additions & 12 deletions packages/b2c-dx-mcp/src/tools/storefrontnext/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,3 @@ The tool automatically searches for components in these locations (in order):
Component discovery uses the project directory resolved from `--project-directory` flag or `SFCC_PROJECT_DIRECTORY` environment variable (via Services). This ensures searches start from the correct project directory, especially when MCP clients spawn servers from the home directory.

**See also**: [Detailed documentation](./page-designer-decorator/README.md) for complete usage guide, architecture details, and examples.

## Placeholder Tools

The following tools are placeholders awaiting implementation:

- `storefront_next_site_theming` - Configure and manage site theming for Storefront Next
- `storefront_next_figma_to_component_workflow` - Convert Figma designs to Storefront Next components
- `storefront_next_generate_component` - Generate a new Storefront Next component
- `storefront_next_map_tokens_to_theme` - Map design tokens to Storefront Next theme configuration
- `storefront_next_generate_page_designer_metadata` - Generate Page Designer metadata for Storefront Next components

Use `--allow-non-ga-tools` flag to enable placeholder tools.
Loading
Loading