All integrations

Salesforce

Query and manage CRM records — accounts, contacts, opportunities, leads, and custom objects via SOQL and REST.

OAuth 8 tools

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)

  1. In Salesforce Setup, open External Client App Manager and create a new app.
  2. 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)
  3. Select OAuth scopes: api and refresh_token (Perform requests at any time).
  4. Enable Authorization Code and Credentials Flow.
  5. Copy the Consumer Key and Consumer Secret into the hub environment:
    • SALESFORCE_CLIENT_ID
    • SALESFORCE_CLIENT_SECRET

User connect flow

  1. Sign in to stackgate.ai.
  2. Go to My Integrations and open Salesforce.
  3. Click Activate, then Connect Salesforce.
  4. Choose Production (Developer Edition and production orgs) or Sandbox (full sandbox orgs).
  5. 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/salesforce with 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_limits or 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.