Secure Salesforce access for AI agents

Query, search, and manage Salesforce records via SOQL/SOSL and object CRUD, using Salesforce's official Platform MCP server

Salesforce integration connects your agents to Salesforce records – Accounts, Contacts, Opportunities, Cases, and any custom object – via SOQL/SOSL search and object CRUD.

Server URL: https://api.salesforce.com/platform/mcp/v1/platform/sobject-all

Credential modes

Salesforce supports bring your own app only. It does not support dynamic client registration for this MCP server, so your organization registers its own External Client App in Salesforce and supplies the client ID and secret. See Credential modes for how the modes compare.

Before you begin

  • A Salesforce account that can open Salesforce Setup, create External Client Apps, and activate MCP servers.
  • Administrator access to your Agent Authority workspace, to add the resource.

Setup

Setup moves between two consoles. You copy a redirect URI in the Agent Authority console, register an app and activate the MCP server in Salesforce, then return to the console and paste the credentials. Keep both tabs open as you work.

1. Copy the redirect URI

  1. In the Agent Authority console, go to Resources → Add Resource.
  2. Click Salesforce.
  3. Click Copy next to Redirect URI.
Salesforce credentials form in the Agent Authority console, showing Redirect URI with a Copy button, Client ID, Client Secret, and Token Endpoint Authentication
Copy the Redirect URI here, then come back for the Client ID and Client Secret in step 4

Salesforce is bring-your-own-app only, so clicking it opens the credentials form directly, with no credential mode to choose.

The URI includes your tenant's region, so copy it rather than typing it. It takes the form https://oauth.aisecurity.services.<region>.connect.secureauth.com/auth/callback.

Leave this tab open. You return to it in step 4.

2. Register an External Client App in Salesforce

  1. Sign in at login.salesforce.com.
  2. Open Setup from the gear icon.
  3. Go to Platform Tools → Apps → External Client Apps → External Client App Manager.
  4. Click New External Client App.
  5. In the Basic Information section, complete the required fields.
  6. Expand API (Enable OAuth Settings) and select the Enable OAuth checkbox.
  7. In Callback URL, paste the redirect URI you copied in step 1.
  8. Add both of these OAuth scopes:
    • Access Salesforce hosted MCP servers (mcp_api)
    • Perform requests at any time (refresh_token, offline_access)
  9. Under Security, select only these checkboxes:
    • Require Proof Key for Code Exchange (PKCE) extension for Supported Authorization Flows
    • Enable Refresh Token Rotation
    • Issue JSON Web Token (JWT)-based access tokens for named users
    • Limit Idle Refresh Token Time-to-Live (TTL) to 30 Days
  10. Save the app.
  11. Open the app.
  12. In OAuth Settings → App Settings, click Consumer Key and Secret.
  13. Copy the Consumer Key and the Consumer Secret.

Those Security settings match how the gateway behaves. It always uses Proof Key for Code Exchange (PKCE), an OAuth safeguard that stops anyone from reusing a stolen authorization code.

3. Activate the MCP server

  1. Still in Salesforce Setup, go to Platform Tools → Integrations → API Catalog → MCP Servers.
  2. Click sobject-all.
  3. Click Activate.

4. Finish in the console

  1. Go back to the Salesforce form in the Agent Authority console.
  2. In Client ID, paste the Consumer Key.
  3. In Client Secret, paste the Consumer Secret.
  4. Leave Token Endpoint Authentication on Auto-detect.
  5. Click Add.
  6. Sign in to Salesforce when the gateway redirects you, through your SSO if configured.
  7. Review the requested access and click Allow.

You return to the console with your Salesforce account connected.

Verify the connection

The gateway syncs the available Salesforce tools automatically. To confirm the connection works end to end, ask your agent to run a request, for example:

Get Salesforce user info

If your Salesforce user, role, and profile details come back, the connection is working.

How users connect

Access is per user. Each additional user connects their own Salesforce account the first time their agent calls a Salesforce tool: the gateway returns a sign-in link, the user authorizes once, and the tools work from then on.

Salesforce's own role, profile, and field-level security settings control what each user can reach. The gateway does not widen access beyond what the authenticated user could already do in Salesforce. Go to Connections to manage linked accounts.

Authorization goes through Salesforce's generic login gateway (login.salesforce.com), which redirects to the authenticating user's own My Domain during sign-in. This works the same way for every Salesforce org, with no per-org configuration.

Available tools

ToolDescription
soqlQueryExecute a SOQL query to retrieve records – the primary way to read data
findExecute a SOSL text search across multiple objects at once
getRelatedRecordsGet child records related to a parent record by traversing relationships
listRecentSobjectRecordsGet records of a given type the user recently viewed or modified
getObjectSchemaGet schema information for one or more objects, or an index of all objects
getUserInfoGet the current user's identity, role, and preferences
createSobjectRecordCreate a new record
updateSobjectRecordUpdate an existing record by ID
updateRelatedRecordUpdate a child record by navigating from a parent record through a relationship
deleteSobjectRecordPermanently delete a record by ID
deleteRelatedRecordDelete a child record by navigating from a parent record through a relationship

Required scopes

  • mcp_api: grants access to Salesforce's Platform MCP server. The Salesforce scope picker calls it Access Salesforce hosted MCP servers.
  • refresh_token: lets the gateway refresh the user's access token without asking them to sign in again. The Salesforce scope picker calls it Perform requests at any time, and selecting it grants refresh_token and offline_access together.

Policy examples

  • Read-only access: deny createSobjectRecord, updateSobjectRecord, updateRelatedRecord, deleteSobjectRecord, and deleteRelatedRecord
  • Search and read without writes: allow soqlQuery, find, getRelatedRecords, listRecentSobjectRecords, getObjectSchema, getUserInfo
  • Block deletes only: deny deleteSobjectRecord and deleteRelatedRecord

Next steps

  • Create a policy – start from the read-only pattern in Policy examples above.
  • Connections – manage the Salesforce accounts your users have linked.

On this page