sf-agentforce-mcp-actions
Skill15 starsChanged 7 months agoMITView on GitHub
MCP Server actions for Agentforce — registry, auth, prebuilt servers, Apex integration. Use when configuring MCP as an Agentforce action type. Do NOT use for building MCP servers.
In this repository58 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- asideSkill
- checkpointSkill
- configure-sccSkill
- continuous-agent-loopSkill
- mcp-server-patternsSkill
- model-routeSkill
- prompt-optimizerSkill
- refactor-cleanSkill
- resume-sessionSkill
- save-sessionSkill
- search-firstSkill
- security-scanSkill
- sessionsSkill
- sf-2gp-security-reviewSkill
- sf-agentforce-developmentSkill
- sf-apex-async-patternsSkill
- sf-apex-best-practicesSkill
- sf-apex-constraintsSkill
- sf-apex-cursorSkill
- sf-apex-enterprise-patternsSkill
- sf-apex-testingSkill
- sf-api-designSkill
- sf-approval-processesSkill
- sf-aura-developmentSkill
- sf-build-fixSkill
- sf-cli-referenceSkill
- sf-data-modelingSkill
- sf-debuggingSkill
- sf-deployment-constraintsSkill
- sf-deploymentSkill
- sf-devops-ci-cdSkill
- sf-docs-lookupSkill
- sf-e2e-testingSkill
- sf-experience-cloudSkill
- sf-flow-developmentSkill
- sf-governor-limitsSkill
- sf-harness-auditSkill
- sf-helpSkill
- sf-integrationSkill
- sf-lwc-constraintsSkill
- sf-lwc-developmentSkill
- sf-lwc-testingSkill
- sf-metadata-managementSkill
- sf-platform-events-cdcSkill
- sf-quickstartSkill
- sf-security-constraintsSkill
- sf-securitySkill
- sf-soql-constraintsSkill
- sf-soql-optimizationSkill
- sf-tdd-workflowSkill
- sf-testing-constraintsSkill
- sf-trigger-constraintsSkill
- sf-trigger-frameworksSkill
- sf-visualforce-developmentSkill
- strategic-compactSkill
- update-docsSkill
- update-platform-docsSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 40
After registration, tools appear in Agentforce Asset Library and can be added to topics.
- Distinctive: line 140
If an MCP action fails in Agent Script:
- Distinctive: line 142
Check server connectivity: Verify endpoint URL is reachable from Salesforce
- Distinctive: line 143
Check auth: Ensure Named Credential + External Credential are configured
- Very specific: line 146
Test standalone: Use sf mcp test or direct HTTP to verify the server responds
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agentforce MCP Server Actions
How to use Model Context Protocol (MCP) servers as Agentforce action types. For building MCP servers, see mcp-server-patterns.
When to Use
- Registering an MCP server for use in Agentforce topics
- Configuring auth, rate limits, or tool discovery for MCP actions
- Using prebuilt Salesforce MCP servers (DX, Heroku, MuleSoft)
- Setting up Hosted MCP (Pilot) for zero-infrastructure endpoints
- Debugging MCP action resolution in Agent Script
Overview
MCP exposes external tools to Agentforce via JSON-RPC 2.0 over HTTP/SSE. An MCP server declares tools (with names, descriptions, parameters, return types), and Agentforce discovers them at connection time. Each tool becomes an available agent action.
Setup
1. Register in MCP Server Registry
Setup > MCP Servers > New MCP Server
| Field | Value |
| Name | Descriptive name (e.g., "Weather API") |
| Endpoint URL | Server URL (HTTPS required for production) |
| Auth | OAuth 2.0 with Integration User |
| Transport | HTTP/SSE (standard) |
After registration, tools appear in Agentforce Asset Library and can be added to topics.
2. Add to Agent Script
In Agent Script, MCP tools are referenced like any other action. The target: field is not needed — MCP tools are auto-discovered from the server's tool manifest.
topic weather:
actions:
get_weather:
description: "Get current weather for a city"
inputs:
city: string
description: "City name"
is_required: True
outputs:
temperature: number
description: "Temperature in Fahrenheit"
is_displayable: True
reasoning:
actions:
weather: @actions.get_weather
with city = ...3. Classic Setup (Agent Builder UI)
Setup > Agentforce > Agent Assets > Add Action > select MCP tool from Asset Library.
Auth
- OAuth 2.0 with Integration User (least privilege)
- FLS and sharing rules enforced on the Integration User
- External credentials managed via Named Credentials
- Token refresh handled automatically by the platform
Rate Limits
| Limit | Value |
| Requests per minute per server | ~50 |
| Timeout per tool call | 120 seconds (matches agent timeout) |
| Max payload size | Platform-dependent |
Tool Discovery
On connection, the MCP server returns its tool manifest:
{
"tools": [
{
"name": "get_weather",
"description": "Get current weather conditions",
"inputSchema": {
"type": "object",
"properties": {
"city": { "type": "string", "description": "City name" }
},
"required": ["city"]
}
}
]
}Agentforce uses tool names and descriptions for LLM routing — keep them clear and specific.
Prebuilt MCP Servers
| Server | Purpose | Setup |
| Salesforce DX MCP Server | Deploy, test, manage scratch orgs from AI assistants | @salesforce/mcp npm package |
| Heroku Platform | Manage Heroku apps, dynos, add-ons | Built-in connector |
| MuleSoft | API orchestration, integration flows | MuleSoft Anypoint connector |
Hosted MCP (Pilot)
Fully managed cloud endpoints — zero infrastructure. Pre-built for core CRM and B2C Commerce APIs.
- No server to deploy — Salesforce hosts the MCP endpoint
- Admin setup only — enable in Setup, configure permissions
- Pre-built tools for standard CRM operations (account lookup, case creation, etc.)
- B2C Commerce tools for product catalog, order management
Debugging
If an MCP action fails in Agent Script:
- Check server connectivity: Verify endpoint URL is reachable from Salesforce
- Check auth: Ensure Named Credential + External Credential are configured
- Check tool name: The action name in Agent Script must match the tool name in the server manifest
- Check rate limits: Monitor for 429 responses in MCP Server logs
- Test standalone: Use
sf mcp testor direct HTTP to verify the server responds
Related
- Skill:
mcp-server-patterns— building MCP servers (Node SDK) - Skill:
sf-agentforce-development— Agent Script patterns - Reference: @../_reference/AGENTFORCE_PATTERNS.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

