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 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.

Setup

1. Copy the redirect URI

In the Agent Authority console, go to Resources → Add Resource and select Salesforce. Salesforce is bring-your-own-app only, so the credentials form opens as soon as you select it, with no mode to pick.

Copy the Redirect URI shown on the form. It 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 page open. You come back to it in step 4.

2. Register an External Client App in Salesforce

Register the OAuth client as an External Client App. Salesforce's older Connected Apps do not expose the MCP scope or the security settings this integration needs, so an app you create under App Manager → New Connected App cannot complete the connection.

Sign in at login.salesforce.com, open Setup, then go to Platform Tools → Apps → External Client Apps → External Client App Manager and click New External Client App.

Complete the required fields under Basic Information, then expand API (Enable OAuth Settings) and select Enable OAuth:

  • Set Callback URL to the Redirect URI shown on the Salesforce form in the Agent Authority console, using the Copy button next to it. It must use HTTPS.
  • Add the OAuth scope Access Salesforce hosted MCP servers (mcp_api)
  • Add the OAuth scope Perform requests at any time (refresh_token, offline_access)

The gateway always sends a client secret, and it always uses Proof Key for Code Exchange (PKCE), an OAuth safeguard that stops a stolen authorization code from being reused. Under Security, select all of the following to match:

  • Require secret for Web Server Flow
  • Require secret for Refresh Token Flow
  • Require Proof Key for Code Exchange (PKCE) extension for Supported Authorization Flows
  • Enable Refresh Token Rotation
  • Limit Idle Refresh Token Time-to-Live (TTL) to 30 days

Save the app. To get the credentials, open the app and click Consumer Key and Secret under Settings → OAuth Settings → App Settings, then copy both. Salesforce does not show these values on the app list.

3. Activate the MCP server

Still in Salesforce Setup, go to Platform Tools → Integrations → API Catalog → MCP Servers, open sobject-all, and activate it.

Salesforce ships this MCP server inactive. If you skip this step, the OAuth sign-in still succeeds and the resource still saves, but no Salesforce tools work.

4. Finish in the console

Back on the Salesforce form in the Agent Authority console, paste the Consumer Key into Client ID and the Consumer Secret into Client Secret. Leave Token Endpoint Authentication on Auto-detect. Then click Add.

The gateway sends you to Salesforce to sign in, through your SSO if configured, and authorize the app. 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