experience-app-mcp-generate
Installation
SKILL.md
Set Up Custom MCP for an Experience Site
End-to-end recipe: ExternalClientApplication (ECA) → custom hosted MCP server → tools and prompts → deploy → optional HXL widgets + Custom Lightning Types + MCP widget resources → activate → verify → optional client delivery. The Experience Site scopes naming and discovery; the MCP server is org-level.
Supports Aura Experience Sites with local ExperienceBundle source. The inventory checks the selected site's view components to determine source support.
Shared rules
<skill-dir>means the absolute directory containing thisSKILL.md. Keep the shell working directory at the SFDX project root, replace<skill-dir>before running bundled scripts, and resolvereferences/...links relative to thisSKILL.md.- Run Phase 0 before every entry path, including repair, resume, and preview/activate-only requests. Proceed only on
decision: continue. - Reconcile with existing state before creating or changing anything. Reuse compatible ECAs, servers, and tool bindings by default. On interruption, use the progress check.
McpServerDefinitionand related runtime records are Tooling API objects. Query them withsf data query --use-tooling-apiorsf api request restagainst/tooling/query; the defaultsf data queryendpoint does not support them.- For authoring, create a missing
sfdx-project.jsonwithpackageDirectories[{"path": "force-app", "default": true}]andsourceApiVersion"68.0". Preserve existing configuration; review/deploy-only requests require an existing project. <default-package>is thepathof thepackageDirectoriesentry with"default": true, or the first entry when none is marked. Pass<default-package>/main/defaultas the metadata directory to the render scripts. Phase 1 still inspects every package directory for the site.- Track the exact metadata files created or changed during the run. Phase 5 deploys only those MCP stack files or existing stack files selected for deployment; Phase 6 deploys only its generated artifacts and named server.
- Handle preflight results as specified in Phase 0. For later failures, stop and report what changed. Read the relevant section of
references/troubleshooting.mdbefore proposing recovery.