The SFCC Development MCP Server provides comprehensive tools for Salesforce B2C Commerce Cloud (SFCC) development, offering AI assistants and developers structured access to documentation, best practices, system object definitions, and log analysis.
Core Capabilities:
• SFCC Documentation Access: Retrieve detailed class information (properties, methods, descriptions), search for classes/methods by name, access raw documentation, and view complete lists of available SFCC classes
• Best Practices Consultation: Access guides for cartridge creation, OCAPI/SCAPI hooks, SFRA controllers, custom endpoints, performance, and security; search across all guides for specific topics; view detailed reference tables for hook endpoints and extension points
• System Object Definitions (requires OAuth credentials): Explore system objects (Product, Customer, Order), retrieve detailed attribute definitions including custom attributes and constraints, search site preferences across sites and preference groups, and discover attribute categories
• Log Analysis (requires credentials): Retrieve latest error/warning/info messages, get log activity summaries, search for specific patterns, and list available log files with metadata
• AI Assistant Enhancement: Provides structured data to improve AI accuracy and reduce hallucination for SFCC development tasks
Configuration Options: Supports documentation-only mode (no credentials required) and full mode (with SFCC credentials for advanced log analysis and system object features).
Provides comprehensive tools for Salesforce B2C Commerce Cloud (SFCC) development including log analysis and monitoring, SFCC API documentation querying, system object definitions access, and best practices guides for OCAPI hooks, SCAPI hooks, SFRA controllers, and custom endpoints
SFCC Development MCP Server
An AI-powered Model Context Protocol (MCP) server that provides comprehensive access to Salesforce B2C Commerce Cloud development tools, documentation, and best practices.
✨ Key Features
🔍 Complete SFCC Documentation Access - Search and explore all SFCC API classes and methods
📚 Best Practices Guides - Curated development guidelines for cartridges, hooks, controllers, and more
🏗️ SFRA Documentation - Enhanced access to Storefront Reference Architecture documentation
📊 Log Analysis Tools - Real-time error monitoring, debugging, and job log analysis for SFCC instances
⚙️ System Object Definitions - Explore custom attributes and site preferences
🚀 Cartridge Generation - Automated cartridge structure creation
🚀 Quick Start
Option 1: Documentation-Only Mode (No SFCC credentials needed)
Option 2: Full Mode (With SFCC credentials for log and job analysis)
Create a dw.json
file with your SFCC credentials:
🎯 Operating Modes
Mode | Tools Available | SFCC Credentials Required |
Documentation-Only | 15 tools | ❌ No |
Full Mode | 36 tools | ✅ Yes |
Documentation-Only Mode
Perfect for learning and development - no SFCC instance required:
Complete SFCC API documentation (5 tools)
Best practices guides (4 tools)
SFRA documentation (5 tools)
Cartridge generation (1 tool)
Full Mode
Complete development experience with live SFCC instance access:
All documentation-only features (15 tools)
Real-time log analysis (13 tools)
System object definitions (6 tools)
Code version management (2 tools)
� Architecture Overview
This server is built around a capability-gated, modular handler architecture that cleanly separates tool routing from domain logic:
Core Layers
Tool Definitions (
src/core/tool-definitions.ts
): Declarative schemas grouped by category (documentation, best practices, SFRA, logs, job logs, system objects, cartridge generation, code versions).Handlers (
src/core/handlers/*.ts
): Each category has a handler extending a common base for timing, structured logging, and error normalization (e.g.log-handler
,docs-handler
,system-object-handler
).Clients (
src/clients/
): Encapsulate domain operations (OCAPI, SFRA docs, best practices, modular log analysis). Handlers delegate to these so orchestration and computation remain separate.Services (
src/services/
): Dependency-injected abstractions for filesystem and path operations — improves testability and isolates side effects.Modular Log System (
src/clients/logs/
): Reader (range/tail optimization), discovery, processor (line → structured entry), analyzer (patterns & health), formatter (human output) for maintainable evolution.Configuration Factory (
src/config/configuration-factory.ts
): Determines capabilities (canAccessLogs
,canAccessOCAPI
) based on provided credentials and filters exposed tools accordingly (principle of least privilege).
Why This Matters
Extensibility: Adding a new tool usually means adding a schema + minimal handler logic (or a new handler if a new domain).
Security: Tools that require credentials are never exposed when capability flags are false.
Testability: Unit tests target clients & modules; integration/MCP tests validate handler routing and response structure.
Performance: Tail log reads + lightweight caching (
cache.ts
,log-cache.ts
) reduce unnecessary I/O.
Adding a New Tool (High-Level)
Add schema object to the correct exported array in
tool-definitions.ts
.Implement domain logic in a client/service (avoid bloating handlers).
Extend an existing handler or create a new one if it's a new category.
(Only for a new category) register the new handler inside
registerHandlers()
inserver.ts
.Discover actual response shape with
npx conductor query
before writing tests.Add Jest unit tests + YAML MCP tests (docs vs full mode if credentials required).
Update documentation (Development Guide + README counts if changed).
For a deeper internal view, see the Development Guide in the docs site.
�🤖 AI Interface Setup
Choose your preferred AI assistant:
Interface | Best For | Setup Guide |
Claude Desktop | Multi-turn conversations, debugging | |
GitHub Copilot | VS Code integration, inline suggestions | |
Cursor | Modern AI-powered editor |
📦 Installation
Using npx (Recommended)
Global Installation
🐛 Debug Mode & Logging
Enable Debug Logging
Log File Locations
The server writes logs to your system's temporary directory:
macOS:
/var/folders/{user-id}/T/sfcc-mcp-logs/
Linux:
/tmp/sfcc-mcp-logs/
Windows:
%TEMP%\sfcc-mcp-logs\
Log Files Created:
sfcc-mcp-info.log
- General application logs and startup messagessfcc-mcp-debug.log
- Detailed debug information (only when--debug
is enabled)sfcc-mcp-error.log
- Error messages and stack tracessfcc-mcp-warn.log
- Warning messages
Finding Your Log Directory
🧑💻 "Create a new SFCC controller for product search" 🤖 Generates complete controller with proper imports, route handling, and SFRA patterns
🧑💻 "What's wrong with my checkout flow? Check the logs"
🤖 Analyzes recent error logs, identifies issues, and suggests fixes
🧑💻 "Show me how to implement OCAPI hooks for order validation" 🤖 Provides best practices guide with complete hook implementation examples
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
Provides comprehensive access to Salesforce B2C Commerce Cloud development tools including SFCC API documentation, best practices guides, log analysis, and system object definitions. Enables AI assistants to help with SFCC development tasks through both documentation-only mode and full credential-based mode.
- ✨ Key Features
- 🚀 Quick Start
- 🎯 Operating Modes
- � Architecture Overview
- �🤖 AI Interface Setup
- 📦 Installation
- 🐛 Debug Mode & Logging
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityExposes Salesforce CLI functionality to LLM tools like Claude Desktop, allowing AI agents to execute Salesforce commands, manage orgs, deploy code, and query data through natural language.Last updated -52335
- AsecurityAlicenseAqualityProvides offline access to SAP documentation and real-time SAP Community content, integrating official documentation with community-driven solutions for comprehensive developer support.Last updated -570Apache 2.0
- -securityFlicense-qualityEnables AI assistants to interact with Dynamics 365 Commerce systems through 125+ tools covering customer management, sales orders, cart operations, product searches, inventory tracking, and store operations. Provides comprehensive mock data for development and testing purposes.Last updated -
- -securityFlicense-qualityEnables interaction with e-commerce storefronts through a standardized API. Provides access to product catalogs, inventory management, and customer operations for online retail platforms.Last updated -