Skip to main content

Salesforce MCP Server

The Salesforce MCP server lets your AI agents interact with your Salesforce CRM data. Agents can query records using SOQL, search across objects with SOSL, inspect object schemas, and retrieve individual records — all read-only and scoped to the authenticated user's permissions.

Capabilities

ToolWhat It Does
Get API limitsCheck current org API usage limits and remaining capacity
List objectsList all object types available in the org
Describe objectRetrieve metadata and field definitions for a specific object
Get recordFetch a single record by its ID
Query records (SOQL)Run a SOQL query and return matching records with pagination
Query next pageFetch the next page of a paginated SOQL result
Search records (SOSL)Run a full-text search across multiple objects

📝 Note: All Salesforce tools are read-only. The agent cannot create, update, or delete records.

OAuth Setup

The Salesforce MCP server uses OAuth to authenticate on behalf of each user. To enable this integration, you need to create a Connected App in Salesforce and provide the credentials to Devs.ai.

Step 1: Create a Connected App

  1. Log in to Salesforce and go to Setup.
  2. Search for App Manager in the Quick Find box.
  3. Click New Connected App.
  4. Enter a name (for example, "Devs AI") and a contact email.
  5. Under API (Enable OAuth Settings), check Enable OAuth Settings.

Step 2: Configure OAuth Settings

  1. Enter the Callback URL provided by your Devs.ai platform administrator.
  2. Add the following OAuth Scopes:
ScopeWhat It Enables
apiAccess to Salesforce REST API endpoints
refresh_tokenAllow the platform to refresh tokens automatically
  1. Click Save. Salesforce may take a few minutes to activate the app.

Step 3: Get Your Credentials

  1. After the Connected App is created, go to App Manager and find your app.
  2. Click View (or the dropdown arrow > View).
  3. Under API (Enable OAuth Settings), copy the Consumer Key (Client ID) and click to reveal and copy the Consumer Secret (Client Secret).

Step 4: Configure in Devs.ai

  1. Navigate to Organization > Connectors in Devs.ai.
  2. Find the Salesforce template and click Enable.
  3. Select OAuth as the authentication type.
  4. Enter your Consumer Key (Client ID) and Consumer Secret (Client Secret) from Step 3.
  5. Select the tools you want to make available.
  6. Click Save.

When a user first interacts with an agent connected to Salesforce, they will be prompted to authorize access to their Salesforce account.

OAuth Configuration Reference

FieldValue
Authorization URLhttps://login.salesforce.com/services/oauth2/authorize
Token URLhttps://login.salesforce.com/services/oauth2/token
Scopesapi, refresh_token

📝 Note: If your organization uses a custom Salesforce domain (My Domain), the authorization and token URLs use your domain instead of login.salesforce.com.

Additional Resources

⌘J