Connect through an MCP server
If a system runs an MCP server, add it to the gateway as an MCP server target that uses the system's OAuth client or API key, as in Add the system to the gateway. The server decides which tools it offers. The example on this page is a Salesforce hosted MCP server.
An MCP server target gets its Salesforce token through an OAuth client in AgentCore Identity. It can request a new token on every tool call, and can fail under load. For data that the stack's salesforce target already offers, call that target, which reuses a stored token.
To set up a Salesforce hosted MCP server, including the External Client App
settings it needs, see Hosted MCP Servers
A server that writes lets every guide and AI agent that uses the gateway write.