Salesforce MCP — Auth Setup
Salesforce uses OAuth access tokens and an instance URL to authenticate API requests to your org.
1. Get your credentials
- Open the Salesforce Connected App guide (opens Salesforce Help — we never see your token)
- Create a Connected App in your org under Setup > App Manager > New Connected App
- Enable OAuth settings, set the callback URL, and select required OAuth scopes
- Use the OAuth flow to obtain an access token and note your org's instance URL (e.g.,
https://yourorg.my.salesforce.com)
2. Set environment variables
macOS / Linux — add to ~/.zshrc or ~/.bashrc:
export SALESFORCE_ACCESS_TOKEN=YOUR_ACCESS_TOKEN_HERE
export SALESFORCE_INSTANCE_URL=YOUR_INSTANCE_URL_HERE
Then run source ~/.zshrc (or open a new terminal).
Windows — run in Command Prompt (then restart):
setx SALESFORCE_ACCESS_TOKEN "YOUR_ACCESS_TOKEN_HERE"
setx SALESFORCE_INSTANCE_URL "YOUR_INSTANCE_URL_HERE"
3. Verify
npx claude-skills doctor
You should see ✅ next to the Salesforce MCP entry. If you see ❌, confirm the variables are set: echo $SALESFORCE_ACCESS_TOKEN.
4. Restart Claude Code
Quit and reopen Claude Code (or run /mcp list inside Claude Code to confirm the Salesforce MCP appears).

