Salesforce is a customer relationship management (CRM) platform that lets sales, service, and marketing teams manage accounts, contacts, leads, opportunities, cases, tasks, and events in a single system of record.
It can be connected to Agen.co two ways, matching the Official / In-house filter in the connector picker:
- Official — Agen.co connects to a Salesforce Hosted MCP Server, so your AI agents use the tools Salesforce exposes to MCP clients, including custom tools your admins build from Apex and Flows.
- In-house — Agen.co wraps the Salesforce REST API through its own integration layer, with tools for Accounts, Contacts, Leads, Opportunities, Cases, Tasks, Events, SOQL, and SOSL.
Prerequisites
Prerequisites
- A Salesforce administrator (System Administrator or equivalent) who can create an External Client App and turn on MCP servers in Setup.
- Salesforce Hosted MCP Servers available in your org: MCP Servers appears under API Catalog in Setup. If it doesn't, ask your Salesforce account team to enable Hosted MCP Servers for your org.
- An org edition with API access, for example Developer, Enterprise, or Unlimited.
- In the Agen.co portal, go to Connectors → My connectors and click Add connector.
- Search for
Salesforceand select it. At the top of the Add Salesforce panel, keep Official selected. - Copy both read-only URLs at the bottom of the panel:
- Callback URL: completes the initial OAuth handshake between Agen.co and your External Client App.
- Gateway callback URL: used by the Agen.co MCP gateway for per-user authorization at runtime.
Leave this panel open. You return to it after creating the External Client App. See How to get your Redirect URL for what these URLs are.
Salesforce MCP servers are off by default, and a client can't connect to one that is off, even with a valid sign-in.
- In Salesforce, open Setup. In the Quick Find box, enter
MCP Servers, then select MCP Servers under API Catalog. - Turn on the server your agents need, for example SObject Reads. It can take up to 2 minutes to become active.
Salesforce Hosted MCP Servers accept only an External Client App. Connected Apps aren't supported.
In Setup, enter
external clientin the Quick Find box, select External Client App Manager, and click New External Client App.Fill in Basic Information: a name (for example,
Agen.co MCP) and a contact email. Leave Distribution State asLocal.Expand API (Enable OAuth Settings) and select Enable OAuth. In Callback URL, paste both URLs you copied from Agen.co, one per line.
Under OAuth Scopes, move these two scopes to Selected OAuth Scopes:
Scope What it allows Access MCP servers (mcp_api)Calling the Salesforce Hosted MCP Servers you turned on Perform requests at any time (refresh_token)Issuing a refresh token, so users stay connected without signing in again Under Security, select Issue JSON Web Token (JWT)-based access tokens for named users. Keep Require secret for Web Server Flow, Require secret for Refresh Token Flow, and Require Proof Key for Code Exchange (PKCE) selected, because Agen.co signs in with the client secret and PKCE. Clear the other options. Without JWT-based access tokens, sign-in can succeed while every tool call fails.
Click Create. A new External Client App can take up to 30 minutes before Salesforce accepts it.
Open the app's Settings tab, expand OAuth Settings, and click Consumer Key and Secret. Salesforce may ask for a verification code sent to your email. Copy the Consumer Key and Consumer Secret.
- Return to the Add Salesforce panel you left open and fill in the fields:
| Field | Required | Description |
|---|---|---|
| Instance Slug | Yes | Namespaces this instance. It prefixes each imported tool as slug__tool, so a second instance of the same connector needs its own slug. Prefilled with salesforce. Use lowercase kebab-case. You can change it later from the connector's settings. |
| Hosted MCP server | Yes | The part of the server URL after https://api.salesforce.com/platform/mcp/v1/, for example platform/sobject-reads or platform/sobject-all. For a custom server, use custom/<server name>. For a sandbox or scratch org, add sandbox/ in front, for example sandbox/platform/sobject-reads. Pasting the full server URL also works. |
| Client ID | Yes | The Consumer Key of your External Client App. |
| Client Secret | Yes | The Consumer Secret of your External Client App. |
- Click Connect. Salesforce opens in a new tab. Sign in and click Allow.
- Back in Agen.co, the panel shows Select the tools to import from Salesforce. with a toggle for each tool, all on by default. Turn off any tool you don't want, then click Add. The connector is created and its tools imported only when you click Add, even if the Salesforce tab reported success.
- After you create a policy for the tools, the first tool call a user makes returns a one-time authorization link instead of data. The user opens it and signs in with their own Salesforce account. This per-user step uses the Gateway callback URL you registered, and each user does it once.
One instance connects to one hosted MCP server. To give agents a second server, such as SObject Mutations next to SObject Reads, add another Salesforce instance with its own slug.
The tools depend on the server you connect. Every tool call runs as the signed-in user, so field-level security, object permissions, and sharing rules apply.
| Server | What it covers |
|---|---|
| SObject Reads | Reading, querying, and searching records, with no changes |
| SObject All | Creating, reading, updating, and deleting records, plus query and search |
| SObject Mutations / SObject Deletes | Creating and updating records, or deleting them |
| Custom servers | Apex actions, Flows, and Named Queries your admins expose as MCP tools |
| Other standard servers | Data 360, Tableau Next, CRM Analytics, Salesforce CMS content, and more. See the Salesforce servers reference for the full list |
Enabling the Salesforce connector isn't enough on its own. Tool calls remain denied until you create a policy that grants access to the specific tools you want to expose.
Integrating Salesforce with Frontegg lets your application read and write CRM records (Accounts, Contacts, Leads, Opportunities, Cases, Tasks, Events), run SOQL queries and SOSL searches, upsert records by external ID, and execute composite multi-step requests against the Salesforce REST API on behalf of an authenticated user.
The integration uses the OAuth 2.0 Web Server flow against login.salesforce.com, with offline access for refresh tokens. You provide a Client ID, Client Secret, and your Salesforce MyDomain in the Frontegg portal — the MyDomain is used to address the org-specific REST API host (https://{your-mydomain}.my.salesforce.com).
Prerequisites
Prerequisites
- A Salesforce org with admin permissions to create External Client Apps (Developer Edition, Enterprise, Unlimited, or Performance Edition).
- The user creating the app must have the Customize Application and Manage Connected Apps permissions.
Sign in to Salesforce, open Setup, and in the left sidebar navigate to Company Settings → My Domain. Copy the value shown under My Domain Name — this is the subdomain prefix of your org URL (for example, acme from https://acme.my.salesforce.com).
You will paste this value into the Salesforce MyDomain field in the Frontegg portal.

Developer Edition orgs
Developer Edition orgs
If you are using a free Developer Edition org, your MyDomain typically includes .develop — for example, acme.develop from https://acme.develop.my.salesforce.com. Use the full subdomain prefix shown under My Domain Name, including .develop if present.
In Setup, open Apps → App Manager. In the top-right corner, click New External Client App.

In the Basic Information section, enter:
- External Client App Name — a descriptive name, for example
Frontegg Integration. The API Name is generated automatically. - Contact Email — an email address that Salesforce will associate with this app.
- Leave Distribution State as
Local.

Expand the API (Enable OAuth Settings) section and check Enable OAuth. Then enter your Frontegg Redirect URL in the Callback URL field:
https://YOUR_MCP_GATEWAY_URL/integration-callback

In the OAuth Scopes dual list, move the following three scopes from Available OAuth Scopes to Selected OAuth Scopes (select each scope and click the right-arrow button):
| Scope | Description |
|---|---|
Access the identity URL service (id, profile, email, address, phone) | Identifies the authenticated user and exposes the id claim used by Frontegg. |
Manage user data via APIs (api) | Grants read/write access to the Salesforce REST API for all integration tools (Accounts, Contacts, Leads, Opportunities, Cases, Tasks, Events, queries, composite). |
Perform requests at any time (refresh_token, offline_access) | Issues a refresh token so Frontegg can keep the integration connected without re-prompting the user. |

Web Server flow with PKCE
Web Server flow with PKCE
Salesforce enables Require secret for Web Server Flow, Require secret for Refresh Token Flow, and Require Proof Key for Code Exchange (PKCE) by default. Leave these settings as-is — the Frontegg integration uses the standard OAuth 2.0 Web Server flow with PKCE.
Click Create at the bottom of the form. Salesforce takes you to the app detail page.
Open the Settings tab, expand OAuth Settings, and click Consumer Key and Secret. Salesforce may ask you to verify your identity by entering a code emailed to your account address.
After verification, the Consumer Details page displays:
- Consumer Key — paste this into the Client ID field in the Frontegg portal.
- Consumer Secret — paste this into the Client Secret field in the Frontegg portal.

Keep your credentials secure
Keep your credentials secure
Treat the Consumer Secret as a password. Never share it or commit it to version control.
Open the Frontegg portal and navigate to [ENVIRONMENT] → Integrations → Salesforce, then enter:
- Client ID — the Consumer Key value from the previous step.
- Client Secret — the Consumer Secret value from the previous step.
- Salesforce MyDomain — the subdomain you copied earlier (for example,
acme). - Select the required scopes.
- Click Save.