Agentforce MCP Tools
Model Context Protocol (MCP) is the foundational technology that enables Agentforce's agentic capabilities. MCP transforms how AI agents interact with development tools by providing a standardized interface for tool discovery, execution, and results integration. Understanding MCP helps you leverage Agentforce's full potential and troubleshoot issues when they arise.
MCP serves as a universal translator between AI models and development tools. Just as USB provides a standard way to connect different devices to your computer, MCP provides a standard way for AI agents to connect with various development tools and services.
Here's how MCP works in Agentforce:
- Tool Discovery: Agentforce discovers the tools that are available in your environment.
- Intelligent Selection: When you make a request, Agentforce determines which tools are needed.
- Execution: Agentforce executes the appropriate tools in the right sequence.
- Results Integration: Tool results are integrated into a coherent response.
The integration of MCP brings several key benefits. It provides a standardized interface for accessing all development tools and services, while also enabling dynamic discovery of the tools available in your environment. MCP is also context-aware, integrating deeply with your project structure and org metadata to deliver more relevant results.
The out-of-the-box Salesforce DX MCP Server included with Agentforce Vibes is designed specifically for Salesforce development workflows. It provides several key benefits:
- Accurate Context: Tools understand Salesforce metadata, org structure, and development patterns.
- Secure Integration: All tools operate within Salesforce's trusted security boundary. Developers can work confidently without compromising safety.
- Optimized Workflows: Tools are designed for common Salesforce development tasks.
- Consistent Experience: All tools follow Salesforce conventions and best practices.
To enable the Salesforce DX MCP Server:
-
Click Vibes Icon: Look for the Agentforce Vibes icon ([
]) in the Activity Bar. -
Switch to Act Mode
- In the chat interface, locate the mode selector.
- Switch from standard chat, and toggle from Plan to Act mode. See Agentforce Plan and Act Modes.
-
Enable MCP Servers Click "Enable MCP Servers" to install and enable the Salesforce DX server. Toggle Salesforce DX MCP server on.
The Salesforce DX MCP server is installed and enabled by default in Code Builder.
Check that your MCP server is connected:
- 🟢 Green indicator: Server connected and functioning.
- 🟡 Yellow indicator: Connection in progress.
- 🔴 Red indicator: Connection failed (requires troubleshooting).
If you're working with more than one MCP server, control which servers are active by clicking the server icon, opening Manage MCP Servers, and then toggling servers off and on.
For local VS Code users, MCP servers are disabled by default. To use them you must explicitly enable them.
Try these prompts to verify your setup:
-
Test Org Connection
-
Test Tool Execution
-
Test Project Context
MCP servers have a list of tools that are identified as GA and NON-GA. GA tools are activated by default. You can choose to activate the NON-GA tools:
- To open the
a4d_mcp_settings.jsonfile, click settings in the MCP tools panel and then click Configure MCP Servers. - Add
--allow-non-ga-toolsflag and save. For example -
- Run Developer: Reload Window.
You can now use NON-GA tools.
Be aware of these current MCP limitations.
- Server Dependencies: MCP functionality depends on properly-configured servers.
- Server Installs: Installing MCP servers from the third-party Marketplace (not supported by Salesforce) depends on the LLM interpreting the server’s GitHub README, which is non-deterministic and token-heavy. We recommend adding the configuration directly to the
a4d_mcp_settings.jsonfile instead. - There's roughly a 20 tool limit on the number of tools you can run at the same time. Edit the json file to select the right tools for your workflow. For the Salesforce DX MCP Server, you can select tools you want to run. Other MCP servers can be turned off to reduce the tool burden.