Skip to content

forcedotcom/sf-skills / skills/experience-app-mcp-delivery-generate

experience-app-mcp-delivery-generate

Verified

Package and deliver an existing Salesforce hosted MCP server/App MCP for an Experience Site as an MCP configuration file or a Claude plugin repository. Discover the serving URL and External Client Application client ID, generate client configuration, optionally bundle skills in a plugin, and provide local testing and private GitHub handoff instructions. Plugin packaging supports Claude only; reject requests for Codex, ChatGPT, or other plugin platforms. Use for connecting clients and packaging delivery, not for creating or activating the Salesforce MCP server.

scripts/generate_mcp_config.mjs

View on GitHub
#!/usr/bin/env node
// Preview or create a standalone connection file without plugin metadata or org writes.
import fs from "node:fs";
import path from "node:path";
import { createMcpConfig } from "./mcp_config.mjs";

try {
  const args = process.argv.slice(2);
  if (args.length !== 1 && !(args.length === 2 && args[1] === "--write")) throw new Error("Usage: generate_mcp_config.mjs <CONFIG_JSON> [--write]");
  const config = JSON.parse(fs.readFileSync(args[0], "utf8"));
  if (typeof config.destination !== "string" || !path.isAbsolute(config.destination)) throw new Error("destination must be an absolute path to a new MCP configuration file");
  const destination = path.resolve(config.destination);
  // lstat also detects dangling symlinks; exclusive creation protects against races.
  try {
    fs.lstatSync(destination);
    throw new Error("Destination already exists; select a new file");
  } catch (error) { if (error.code !== "ENOENT") throw error; }
  const mcpConfig = createMcpConfig(config);
  if (args[1] === "--write") {
    fs.mkdirSync(path.dirname(destination), { recursive: true });
    fs.writeFileSync(destination, JSON.stringify(mcpConfig, null, 2) + "\n", { flag: "wx", mode: 0o644 });
  }
  console.log(JSON.stringify({ status: args[1] === "--write" ? "created" : "preview", destination, mcpConfig, runtimeVerified: false }, null, 2));
} catch (error) {
  console.log(JSON.stringify({ status: "blocked", error: error.message }, null, 2));
  process.exitCode = 1;
}
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall