Create
Salesforce Agentforce
This guide walks you through setting up a Webex MCP server in Agentforce.
Before configuring, you'll need OAuth 2.0 credentials. See OAuth 2.0 setup instructions in the main guide.
anchorPrerequisites
anchorThe MCP in Agentforce requires the graph-based Atlas reasoning engine. We recommend starting in a sandbox org with a new agent so you can safely test your agent's performance.
Creating Dev Orgs for Testing and Security Review Use the following Trialforce Template Id (0TTao000002ECzR) to create Developer Edition orgs that can be used for testing and security review. Dev orgs will have a 120 day lifespan.
Login to your PBO > Environment Hub > Create Org > Test/Demo > enter Trialforce Id.
- Set up Einstein generative AI
- Enable Agentforce
- Create an agent in the legacy Agentforce Builder. MCP in Agentforce doesn't currently support agents created in the new Agentforce Builder (beta) in Agentforce Studio.
anchorUpdate the Reasoning Engine for Your Agent
anchorAgents created in the legacy Agentforce Builder use the previous reasoning engine by default and must be updated to use the graph-based reasoning engine.
- Install Salesforce CLI
- Authorize the org you want to use to register MCP servers
- If your agent is active, deactivate it
- Query for existing agents in the org:
sf data query -q "SELECT Id, PlannerType, DeveloperName FROM GenAiPlannerDefinition"
- Copy the ID (
16j) of the agent you want to update - Update the planner type:
sf data update record -v PlannerType=Atlas__ConcurrentMultiAgentOrchestration -s GenAiPlannerDefinition -i {16j ID}
- Verify the planner type is now
Atlas__ConcurrentMultiAgentOrchestrationby re-running the query from step 4
anchorRegister the MCP Server
anchor- From Setup, in the Quick Find box, enter Agentforce, then select Agentforce Registry
- Click New
- Enter a server name, description, and URL
- Select OAuth 2.0 as the authentication method and provide:
- Identity Provider URL: The URL of your authorization server endpoint
- Scope (optional): Permissions required by the MCP server, as a comma-separated list
- Client ID: The Client ID from your Webex Integration
- Client Secret: The Client secret from your Webex Integration
- Click Create and Continue
Salesforce creates a connection with the server and sends a ping to validate the connection. It also creates a named credential, external credential, and permission set for authentication.
- Select the server tools you want agents to be able to use, then click Next
- Save your changes
anchorAdd an MCP Tool Action to Your Agent
anchor- From Setup, enter Agentforce in Quick Find, then select Agentforce Agents
- Open the agent you want to use with an MCP server tool in Agentforce Builder
- If your agent is active, deactivate it
- From the Topics tab, add an MCP tool action to a topic:
- Existing topic: Click the topic name → This Topic's Actions → New → Add from Asset Library
- New topic: Click New → New Topic, complete all required fields, and select actions from the asset library
- Add topic instructions to tell your agent how it should use your action, then save
Before activating your agent, carefully test your agent to verify that your MCP tool action performs as expected. Adjust your topic's instructions based on your results.
anchorImportant Notes
anchor- Agentforce currently supports only the Client Credential Grant flow. They plan to support the Authorization Code flow by mid to early March. However, it will only accommodate service account use cases. There is no ETA for when they will provide per-user authentication support.