---
schema_version: "1"
id: 87f2f14644bbe845db88502aeb14c39964a1883fc2bde701c8455b7a7bc9a2d7
title: MCP for Agentforce
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/agent_mcp.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.agent_mcp.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: b30f47f688ae1f1fe6e9a185f36ddd3c4bed2204e4adfdcbaf356e9e49e327dc
description: MCP for Agentforce brings enhanced agent interoperability to Agentforce. Seamlessly register and use third-party tools in Agentforce, so your agents can do more for your customers and employees across systems.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# MCP for Agentforce

MCP for Agentforce brings enhanced agent interoperability to Agentforce. Seamlessly register and use third-party tools in Agentforce, so your agents can do more for your customers and employees across systems.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions. <a href="https://help.salesforce.com/s/articleView?id=ai.agent_setup_explore_types.htm&amp;release=264.0.0&amp;type=5" title="Learn about agent types and default templates for specific clouds and common use cases.">Required add-on licenses vary by agent type.</a></td></tr></tbody></table>

## What Is MCP?

Model context protocol (MCP) is an open standard for how AI models connect to external systems, including their tools. Anthropic, which developed the protocol, suggests thinking about MCP like USB-C ports: “Just as USB-C provides a standardized way to connect your devices to various peripherals and accessories, MCP provides a standardized way to connect AI models to different data sources and tools.”

## How Does MCP Work?

Let’s say you want an Agentforce agent to retrieve a loan risk score from a third-party banking service for a contact associated with a Salesforce account. Without MCP, you need to manually integrate the two systems and handle all API connectivity, authentication, data access, and code. MCP acts as a translator between systems, so this complex manual work is done for you. The agent is able to use Salesforce data to search for the user’s details with the third-party banking service. It can then use the loan risk score to determine its next steps in the conversation.

The MCP protocol relies on servers, clients, and hosts.

- An MCP server is created by service providers like Salesforce, MuleSoft, and third-party service providers. A server contains all of the assets that an external system makes available, including tools, prompts, and resources.
    - Tools are similar to agent actions—they’re executable functions that an LLM can call to perform actions in external systems.
    - Prompts are natural language instructions from the server to an LLM to guide behavior.
    - Resources are data that servers can access, such as data feeds, files, or other information.
- An MCP client connects to one or more servers to access the external system’s tools and data. Think of a client as a retriever of functionality and information.
- An MCP host is the app that coordinates this process. The host provides an interface for using the tools and data from the MCP server and manages the MCP client.

![A visualization of Agentforce, MCP servers, and server assets](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/generative_ai/images/agent_mcp_overview.png)

We’ve built an MCP client into Agentforce. That way, you can easily register and manage MCP servers and your agents can securely access and use server tools. For an overview, take the [MCP for Agentforce: Quick Look](https://trailhead.salesforce.com/content/learn/modules/mcp-for-agentforce-quick-look).

## Trust and MCP for Agentforce

At Salesforce, trust is our #1 value. Because Agentforce is the host and client, you can trust MCP for Agentforce.

MCP for Agentforce is secured by the same security and compliance controls as the rest of Agentforce, including Agentforce Trust Layer and our zero data retention policy. Your Salesforce data stays in Salesforce.

We provide automatic checks against common security threats.

- Invisible characters: Invisible characters can hide malicious instructions. When you register an MCP server in Agentforce Registry, we check for invisible characters in the names and descriptions of the server and tools, and we warn you before you complete registration.
- Rug pulls: A rug pull occurs when a previously safe MCP server or tool is updated by the publisher to include malicious instructions. Rug pulls occur after the server is registered. We capture server and tool definitions, including input and output schemas, at registration and tool allowlisting. These definitions represent stable contracts, not just run-time data, so we can scan for changes at the beginning of each agent session and whenever an agent calls a server tool. When we detect changes, we automatically block use of the out-of-sync server or tool at run time by removing the associated MCP tool actions from the agent’s logic and reasoning. We block only the affected actions, so we don’t otherwise interrupt your agent.

[Agentforce Gateway](https://help.salesforce.com/s/articleView?id=ai.agentforce_gateway_policies.htm&release=264.0.0&type=5 "Use Agentforce gateway policies to protect connections to your external APIs and Model Context Protocol (MCP) servers. Control access, set usage limits, and ensure compliance.") provides another layer of protection, enabling you to control access, set usage limits, and ensure compliance. In Agentforce Gateway, you can create and apply policies to govern MCP server usage and behavior, including rules for specific agents and MCP tools. You can apply policies manually or automatically by rules.

Like other Agentforce features, MCP for Agentforce is powered by generative AI. Generative AI can produce inaccurate responses. Test and review responses carefully.

## Testing and Observability

In agent previews in Agentforce Builder and in Agentforce Testing Center, MCP tool actions are identified and can be tested end-to-end, just like other agent actions.

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_tip.png)

Tip

We scan for changes in server and tool definitions at run time. When we detect a change, we remove the associated MCP tool actions from the agent’s logic and reasoning.

Use trace data in Agentforce Builder to identify when MCP tool actions are out of sync. Look for Transition to Subagent and Available Actions events. When your agent transitions to a subagent that includes MCP tool actions, in-sync MCP tool actions are included in the Available Actions event. Out-of-sync MCP tool actions are excluded.

To temporarily turn off server and tool validation as part of agent debugging, [add a custom header](https://help.salesforce.com/s/articleView?id=xcloud.nc_create_custom_headers.htm&type=5&language=en_US) to the named credential associated with the server registration. For the name, enter x-sfdc-mcp-feature-no-tool-validation. For the value, enter true. This advanced debugging option makes it possible to run out-of-sync MCP tool actions (for example, if you suspect the validation process is incorrectly breaking them) and log the validation errors. Only use this header for testing and debugging scenarios, and remove it before activating an agent with MCP tool actions associated with the server.

The Session Tracing Data Model (STDM) captures MCP for Agentforce activity data for use in Agent Analytics.

- **[Requirements for MCP for Agentforce](https://help.salesforce.com/s/articleView?id=ai.agent_mcp_requirements.htm&release=264.0.0&type=5)**  
    Review the requirements to make sure you’re ready to register and use MCP servers in Agentforce.
- **[Considerations for MCP for Agentforce](https://help.salesforce.com/s/articleView?id=ai.agent_mcp_considerations.htm&release=264.0.0&type=5)**  
    Carefully review the current considerations and limitations for MCP for Agentforce.
- **[Connect Agentforce Solutions to MCP Servers](https://help.salesforce.com/s/articleView?id=ai.agent_mcp_connect.htm&release=264.0.0&type=5)**  
    The process for connecting Agentforce solutions to an MCP server depends on the source of the server. Connect third-party MCP servers by using the Agentforce Registry. Connect Mulesoft and Salesforce-hosted servers by using API Catalog.
- **[Add an MCP Tool Action to Your Agent](https://help.salesforce.com/s/articleView?id=ai.agent_mcp_tool_action_add.htm&release=264.0.0&type=5)**  
    Add the agent action that references your MCP tool to an agent from the asset library, so your agent can call the tool in conversation.
- **[MCP for Agentforce Troubleshooting](https://help.salesforce.com/s/articleView?id=ai.agent_mcp_troubleshoot.htm&release=264.0.0&type=5)**  
    Solve common issues with Agentforce solutions that integrate with MCP for Agentforce.