Skip to content
Development
Skill

/experience-app-mcp-generate

Create, extend, deploy, review readiness for, or activate an App MCP, a Salesforce custom hosted MCP server for an Aura Experience Site. Trigger when the user wants to expose an Experience UI or backend action to agents, create local ECA and server metadata, add eligible global

From plugin
sf-skills
1.2k200 skills6 agents15 commands4 MCP

Claude Code

$ npx -y skills add forcedotcom/sf-skills --skill experience-app-mcp-generate --agent claude-code

SKILL.md

experience-app-mcp-generate.SKILL.md
name: experience-app-mcp-generate
description: "Create, extend, deploy, review readiness for, or activate an App MCP, a Salesforce custom hosted MCP server for an Aura Experience Site. Trigger when the user wants to expose an Experience UI or backend action to agents, create local ECA and server metadata, add eligible global invocable Apex or autolaunched Flow tools, add Prompt Builder templates as MCP prompts or tools, preview or perform server activation, deploy the existing MCP stack, or review its readiness. For server setup, offer optional HXL widgets for eligible Apex-backed tools through platform-mcp-tool-widget-coordinate. For a standalone request to generate Custom Lightning Types or widgets for an Apex-backed MCP tool, route directly to platform-mcp-tool-widget-coordinate; do not trigger this skill for HXL generation alone. Do not trigger for remote MCP registration or generic Apex and Flow work unrelated to Experience Site agent access."
metadata:
  relatedSkills:
  - experience-app-mcp-delivery-generate
  - platform-apex-generate
  - platform-mcp-tool-widget-coordinate
  version: "1.0"
  minApiVersion: "68.0"
  domains:
  - "Experience"
  cliTools:
  - tool:
    - "node"
    semver: ">=18.0.0"
  - tool:
    - "sf"
    semver: ">=2.0.0"

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 this `SKILL.md`. Keep the shell working directory at the SFDX project root, replace `<skill-dir>` before running bundled scripts, and resolve `references/...` links relative to this `SKILL.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](#check-progress--after-phase-2-or-on-resume).
  • `McpServerDefinition` and related runtime records are Tooling API objects. Query them with `sf data query --use-tooling-api` or `sf api request rest` against `/tooling/query`; the default `sf data query` endpoint does not support them.
  • For authoring, create a missing `sfdx-project.json` with `packageDirectories` `[{"path": "force-app", "default": true}]` and `sourceApiVersion` `"68.0"`. Preserve existing configuration; review/deploy-only requests require an existing project.
  • `<default-package>` is the `path` of the `packageDirectories` entry with `"default": true`, or the first entry when none is marked. Pass `<default-package>/main/default` as 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.md` before proposing recovery.

Review or deploy an existing stack

Run Phase 0, recover confirmed site/server/ECA identities, then use the progress check and [existing-stack review](references/mcp-objects.md#existing-stack-review). For readiness/review requests, inspect and report findings and unknowns only; do not create files, retrieve, repair, deploy, activate, or audit end-user permissions. For deployment requests, reconcile existing files and intended bindings, then continue at Phase 5 using applicable prior approvals; author only explicitly requested missing changes. Script success or file presence does not establish readiness.

Repair existing ECA or MCP metadata

For ECA files, run the renderer in read-only comparison mode:

node "<skill-dir>/scripts/render_eca.mjs" <default-package>/main/default <ECA_DEV_NAME> --check

Follow the report's field findings, `expectedValues`, and `nextActions`. To resolve `unverifiedFields`, rerun the Phase 2 render command with confirmed inputs plus `--check`. Differences are baseline findings, not automatic errors or permission to change intentional overrides. For field ownership, read [references/eca-fields.md](references/eca-fields.md).

For MCP repairs, read `assets/__MCP_SERVER_NAME__.mcpServerDefinition-meta.xml` and [references/mcp-objects.md](references/mcp-objects.md). Patch only approved root-field differences; preserve tools, prompts, resources, and relationships. Use `merge_tools.mjs` for binding changes.

Phase 0 — Preflight

IMPORTANT: Set `<skill-named>` to `true` only if the user's request explicitly names `experience-app-mcp-generate`; otherwise use `false`. Do not count the agent's own skill selection or messages.

node "<skill-dir>/scripts/preflight.mjs" <target-org-alias> --skill-named <skill-named>

Read the JSON `decision`:

  • `continue`: follow the requested entry path; authoring starts at Phase 1. Proceed without mentioning preflight or explaining why it can't be skipped.
  • `skip`: immediately exit this skill and pursue the original request another way. Say nothing about this skill, its check, or the result.
  • `disabled`: say only the returned `userMessage`, without error details; exit this skill and pursue the original request another way.
  • `needs_input` or `error`: show only `userMessage` and `nextAction`, obtain corrections and rerun preflight. Proceed only on `continue`; never infer entitlement from
Read more
@forcedotcom
Ships withsf-skills

This repository provides Salesforce agent skills, plugins, and sample apps for building applications.

1.2k200 skills6 agents4 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.2k
Star history of forcedotcom/sf-skills on GitHub, a chart by star-history.com

Other skills on sf-skills.

agentforce-observe

agentforce-observe

Analyze production Agentforce agent behavior using session traces and Data Cloud, and manage Agent Health Monitoring (AHM)…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc3w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react10d252k
@facebook@facebookInstall Skill

Questions about experience-app-mcp-generate.

Which coding agents can use experience-app-mcp-generate?
experience-app-mcp-generate installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.