
A Model Context Protocol (MCP) server for interacting with Salesforce Commerce Cloud (SFCC) APIs.
概览
A Model Context Protocol (MCP) server for interacting with Salesforce Commerce Cloud (SFCC) APIs. - Dynamic endpoint registration based on endpoints.json configuration - Automatic handling of path and query parameters - Support for both GET and POST requests - OCAPI authentication using client credentials flow - Support for SFCC Data API endpoints, including product search - : HTTP-based server with OAuth authentication - : Each session can use different SFCC credentials and API endpoints - : Multiple clients can connect to different SFCC instances simultaneously - : GitHub Actions integration for Google App Engine deployment - : Automated versioning and deployment workflows Create a .env file in the project root directory with the following variables: To use the SFCC Data APIs, you need to configure an API client in SFCC with the proper permissions: 1. In SFCC Account Manager, go to API Client 2. Create a new API client or edit an existing one 3.
README
以下为原文 README 节选,完整内容请查看原文。
SFCC MCP Server
A Model Context Protocol (MCP) server for interacting with Salesforce Commerce Cloud (SFCC) APIs.
Features
- Dynamic endpoint registration based on
endpoints.jsonconfiguration - Automatic handling of path and query parameters
- Support for both GET and POST requests
- OCAPI authentication using client credentials flow
- Support for SFCC Data API endpoints, including product search
- Remote mode: HTTP-based server with OAuth authentication
- Per-session configuration: Each session can use different SFCC credentials and API endpoints
- Multi-tenant support: Multiple clients can connect to different SFCC instances simultaneously
- Automated deployment: GitHub Actions integration for Google App Engine deployment
- Version management: Automated versioning and deployment workflows
Installation
# Install dependencies
npm install
# Build the server
npm run build
Configuration
Create a .env file in the project root directory with the following variables:
# SFCC API Configuration
SFCC_API_BASE=https://your-instance.api.commercecloud.salesforce.com/
# Admin API Credentials (Client credentials flow)
SFCC_ADMIN_CLIENT_ID=your_admin_client_id
SFCC_ADMIN_CLIENT_SECRET=your_admin_client_secret
OCAPI Configuration
To use the SFCC Data APIs, you need to configure an API client in SFCC with the proper permissions:
API Client
- In SFCC Account Manager, go to API Client
- Create a new API client or edit an existing one
- Configure the OAuth settings:
- OAuth Client ID: (your client ID)
- OAuth Client Secret: (your client secret)
- Default scopes: Include the scopes needed for your endpoints
- Token Endpoint Auth Method:
client_secret_post
- Configure API client roles:
- Assign appropriate roles to access the required data
Business Manager
- In SFCC Business Manager, go to Administration > Site Development > Open Commerce API Settings
- See
ocapi-bm-config.jsonfor the configuration example
MCP Configuration for VSCode
- Open Command Palette (
Ctrl/Cmd + Shift + P) - Type “MCP” and choose
MCP: Add Server... - Choose
Command (stdio) Manual Install - Type
node /build/index.jsfor the command (replace path placeholder before submit) - Name the MCP (e.g., “sfcc”)
- Choose to configure for User or Workspace
This will create a new server definition either in your user settings.json or in workspace .vscode/mcp.json
{
"servers": {
"sfcc": {
"type": "stdio",
"command": "node",
"args": [
"/build/index.js"
]
}
}
}
Now you can monitor/start/restart/stop your server through MCP: List Servers command. Work with tools by switching to Agent mode in GitHub Copilot Chat
Usage
Start the server:
node build/index.js
Endpoint Configuration
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →