MCP server for Salesforce B2C Commerce Cloud development assistance
io.github.taurgis/sfcc-dev-mcp (SFCC Development MCP Server)
The io.github.taurgis/sfcc-dev-mcp Model Context Protocol (MCP) server provides development assistance for Salesforce B2C Commerce Cloud. It exposes access to SFCC development tools, documentation, and runtime diagnostics, based on the serverโs described capabilities and excerpts.
๐ ๏ธ Key Features
Complete access to SFCC documentation, including searching API classes and methods
Enhanced access to SFRA documentation (Storefront Reference Architecture)
Provides runtime diagnostics alongside tools and documentation
๐ Use Cases
Search and explore SFCC API classes and methods during development
Access SFRA-related information while building or troubleshooting SFCC storefronts
Use runtime diagnostics for SFCC development troubleshooting
โก Developer Benefits
Centralized, protocol-based access to SFCC documentation and diagnostics
Developer-oriented retrieval of API and SFRA documentation content
โ ๏ธ Limitations
Details beyond documentation access and runtime diagnostics are not provided in the source excerpt
An AI-powered Model Context Protocol (MCP) server that provides comprehensive access to Salesforce B2C Commerce Cloud development tools, documentation, and runtime diagnostics.
โจ Key Features
๐ Complete SFCC Documentation Access - Search and explore all SFCC API classes and methods
๐งฑ ISML Template Reference - Complete ISML element documentation with examples and usage guidance
๐ Log Analysis Tools - Real-time error monitoring, debugging, and job log analysis for SFCC instances
โ๏ธ System Object Definitions - Explore custom attributes and site preferences
๐งช Script Debugger - Execute and inspect script-debugger endpoints in credentialed mode, including custom trigger URLs/paths for non-default storefront routes
๐ Cartridge Generation - Automated cartridge structure creation with workspace-bound path safety (writes stay inside workspace roots, or current working directory fallback when roots are unavailable; home-directory fallback is blocked)
๐งฉ Agent Skill Bootstrap - Install or merge AGENTS.md and bundled skills into the current project or a temp directory for AI assistants
โ Tool Argument Validation - Runtime schema validation enforces required fields, type checks, enum constraints, integer/numeric bounds, and strict unknown-key checks for object schemas (top-level and nested) before handler execution
โฑ๏ธ MCP Progress + Cancellation - Tool calls honor request cancellation signals and emit out-of-band notifications/progress updates when clients provide a progressToken
๐ Quick Start
Option 1: Documentation-Only Mode (No SFCC credentials needed)
Automatically discovers dw.json in your VS Code workspace folder(s), and refreshes when the client sends notifications/roots/list_changed
Note: The server no longer searches the current working directory by default, as MCP servers often start with cwd set to the user's home directory. The MCP workspace roots mechanism provides reliable project context.
๐ฏ Operating Modes
Mode
Tools Available
SFCC Credentials Required
Documentation-Only
18 tools
โ No
Full Mode
40 tools
โ Yes
Documentation-Only Mode
Perfect for learning and development, no SFCC instance required:
Complete SFCC API documentation (5 tools)
SFRA documentation (5 tools)
ISML template documentation (5 tools)
Cartridge generation (1 tool, writes constrained to workspace roots/cwd)
Agent instruction bootstrap (2 tools) to copy/merge AGENTS.md and skills, or disable future prompts
Full Mode
Complete development experience with live SFCC instance access:
All documentation-only features (18 tools)
Real-time log analysis and job logs (13 tools)
System object definitions (6 tools)
Code version management (2 tools)
Script debugger operations (1 tool)
๐๏ธ Architecture Overview
This server is built around a capability-gated, modular handler architecture that cleanly separates tool routing from domain logic:
Server Orchestration Modules (src/core/server-tool-catalog.ts, src/core/server-tool-call-lifecycle.ts, src/core/server-workspace-discovery.ts): Keeps server.ts focused by extracting capability-aware tool catalog logic, tools/call lifecycle (progress/cancellation/preflight), and workspace roots reconfiguration flow.
Tool Argument Validator (src/core/tool-argument-validator.ts): Enforces runtime argument shape at the MCP boundary for all tools (required fields, primitive/object/array types, enum checks, integer/numeric ranges, string patterns/length, and strict unknown-key checks for object schemas at top-level and nested levels) before tool dispatch.
OCAPI Query Coverage (src/core/tool-schemas/shared-schemas.ts): Shared search schemas include text_query, term_query, bool_query, filtered_query, and match_all_query so MCP boundary validation aligns with supported OCAPI query patterns.
Handlers (src/core/handlers/): Each category has a handler extending a common base for timing, structured logging, and error normalization, with config-driven wiring via ConfiguredClientHandler to reduce repetitive boilerplate (e.g. log-handler, docs-handler, isml-handler, system-object-handler).
Clients (src/clients/): Encapsulate domain operations (OCAPI, SFRA docs, ISML docs, modular log analysis, script debugger, cartridge generation, agent-instruction sync). 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.
Configuration Factory (src/config/configuration-factory.ts): Determines capabilities (canAccessLogs, canAccessOCAPI) based on provided credentials and filters exposed tools accordingly (principle of least privilege).
Shared Credential Validation (src/config/credential-validation.ts): Centralizes auth-pair completeness and hostname-format validation for both dw.json loading and runtime configuration creation.
Call-time Capability Guarding (src/core/server.ts): Rejects execution of tools that are unavailable in the current mode, so hidden tools are not callable via direct tools/call requests.
Call Lifecycle Signals (src/core/server.ts): tools/call handling supports cancellation via request abort signals and emits best-effort progress notifications when the caller provides _meta.progressToken.
Tool Error Sanitization (src/core/tool-error-response.ts): Sanitizes upstream execution errors before returning MCP tool responses, reducing accidental leakage of backend payload details.
Runtime WebDAV Verification (src/core/server.ts): For OAuth-only configurations (client-id/client-secret without username/password), log/job-log/script-debugger tool exposure is gated by a one-time WebDAV capability probe to avoid false-positive tool availability.
CLI Option Helpers (src/config/cli-options.ts): Centralizes command-line parsing and environment credential detection for predictable startup behavior.
Shared Path Security Policy (src/config/path-security-policy.ts): Reuses allow/block path rules across workspace-root discovery and secure dw.json loading.
Shared Abort Utility (src/utils/abort-utils.ts): Centralized timeout and abort-signal composition used by HTTP and debugger clients for consistent cancellation semantics and timer cleanup.
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.
Tip: Add -y (or --yes) to suppress the interactive prompt npx shows before downloading a package. This prevents AI clients (Claude Desktop, Copilot, Cursor) from hanging waiting for confirmation.
bash
# Test the server
npx -y sfcc-dev-mcp
# Use with your configuration
npx -y sfcc-dev-mcp --dw-json /path/to/your/dw.json
# Enable debug mode for detailed logging
npx -y sfcc-dev-mcp --debug
# Or with configuration file
npx -y sfcc-dev-mcp --dw-json /path/to/your/dw.json --debug
--debug accepts true/false, 1/0, or yes/no. Invalid values fail fast with a clear error message.
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 messages
sfcc-mcp-debug.log - Detailed debug information (only when --debug is enabled)
sfcc-mcp-error.log - Error messages and stack traces
sfcc-mcp-warn.log - Warning messages
Finding Your Log Directory
javascript
// The exact path varies by system - to find yours:
node -e "console.log(require('os').tmpdir() + '/sfcc-mcp-logs')"
๐งช Release Flow (Maintainers)
This repository now uses Changesets for npm releases.
When a change should ship in a new sfcc-dev-mcp version, add a changeset from the repository root:
bash
npm run changeset
Check pending release state against main before merging:
bash
npm run release:status
The release workflow on main creates or updates a release pull request from pending changesets. Merging that release pull request publishes the npm package through npm trusted publishing (GitHub Actions OIDC), waits for npm propagation, reruns MCP tests against the published NPX artifact, and then publishes the same version to the MCP Registry.
npm run version-packages also syncs server.json with the package version so validate:server-json keeps passing in the release PR.
Package publication now uses GitHub Actions OIDC trusted publishing, so no separate npm publish secret is required.
You can run the same validation locally:
bash
# Ensure docs-site tool catalog stays in sync with runtime tool definitions
npm run validate:tools-sync
# Ensure docs-site skills catalog stays in sync with bundled skills
npm run validate:skills-sync
# Ensure MCP registry metadata stays in sync with package.json
npm run validate:server-json
# In a separate terminal, start the mock server first for full-mode MCP tests
npm run test:mock-server:start
# Uses latest published version by default
npm run test:mcp:published-npx
# Or pin a specific published version
bash ./scripts/test-published-npx.sh 1.0.21
In GitHub Actions, the publish workflow manages the mock server lifecycle automatically.
๐งโ๐ป "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"
๐ค Retrieves related SFCC classes and methods, then proposes a concrete hook implementation pattern
๐ Security Notes
Local Development Focus: Designed for individual developer use on local machines
Credential Protection: dw.json files should never be committed to version control
Network Security: All API calls use HTTPS with proper authentication
No Data Storage: Server doesn't persist any SFCC data locally
๐ฎ Future Plans
We're continuously improving the SFCC Development MCP Server with exciting new features planned:
๐ฏ Upcoming Enhancements
๐ง Smarter Log Fetching - Enhanced log analysis with intelligent filtering, pattern recognition, and contextual error correlation
๐ Deployment Tools - Integration with SFCC deployment processes and code version management
๐ค We Welcome Your Contributions!
Have ideas for new features or improvements? We'd love to hear from you!
๐ก Feature Requests: Open an issue to discuss your ideas
๐ Bug Reports: Help us improve by reporting any issues you encounter
๐ง Pull Requests: Contribute code, documentation, or examples
๐ Documentation: Help expand our guides and best practices