Salesforce
Query and manage CRM records — accounts, contacts, opportunities, leads, and custom objects via SOQL and REST.
Overview
Connect Salesforce to give AI clients access to your CRM data — accounts, contacts, opportunities, leads, tasks, and custom objects.
Prerequisites
- A Salesforce org with API access (Developer Edition, Professional, Enterprise, or Unlimited)
- A stackgate.ai account
- A Salesforce External Client App (or Connected App) with OAuth enabled
Getting credentials
Platform setup (stackgate.ai operators)
- In Salesforce Setup, open External Client App Manager and create a new app.
- Under API (Enable OAuth Settings), enable OAuth and add your callback URL:
- Production hub:
https://stackgate.ai/oauth/salesforce/callback - Local dev:
https://mcp-center.test/oauth/salesforce/callback(or your Herd URL)
- Production hub:
- Select OAuth scopes: api and refresh_token (Perform requests at any time).
- Enable Authorization Code and Credentials Flow.
- Copy the Consumer Key and Consumer Secret into the hub environment:
SALESFORCE_CLIENT_IDSALESFORCE_CLIENT_SECRET
User connect flow
- Sign in to stackgate.ai.
- Go to My Integrations and open Salesforce.
- Click Activate, then Connect Salesforce.
- Choose Production (Developer Edition and production orgs) or Sandbox (full sandbox orgs).
- Approve the OAuth prompt — stackgate.ai stores your tokens securely.
No manual API keys are required for end users.
Using with AI clients
- Dedicated endpoint:
POST /mcp/salesforcewith a Sanctum bearer token - Private gateway: one config for all integrations — use
salesforce__*namespaced tools
See Documentation for HTTP authentication and private gateway setup.
Troubleshooting
- 422 integration not configured — complete the OAuth connect flow in My Integrations.
- Invalid session / auth errors — disconnect and reconnect Salesforce. Ensure you chose the correct environment (Production vs Sandbox).
- API limit exceeded — your Salesforce org has hit its rolling 24-hour REST API allocation. Use
get_api_limitsor ask your org admin to raise limits. - Write failures — the connected user's Salesforce profile must have create/edit permission on the target object and fields.
Available tools
-
describe_global
List all sObjects available in the connected Salesforce org.
-
describe_object
Describe a Salesforce sObject, including fields, relationships, and permissions.
-
query_records
Run a SOQL query against the connected Salesforce org.
-
get_record
Fetch a single Salesforce record by sObject type and Id.
-
search_records
Run a SOSL search across multiple Salesforce objects.
-
get_api_limits
Get remaining Salesforce org API limits for the rolling 24-hour period.
-
create_record
Create a Salesforce record for the given sObject type.
-
update_record
Update fields on an existing Salesforce record.
MCP endpoint:
https://stackgate.ai/mcp/salesforce
(HTTP) or via the
private gateway.
Related workflows
Multi-integration playbooks that use Salesforce to solve concrete business outcomes.