Step-by-Step Instructions to Obtain Salesforce ENV Values
You can authenticate with Salesforce using either Username/Password Authentication or OAuth 2.0 Client Credentials Flow. Choose the method best suited to your organization and follow the corresponding steps below.
1. Username/Password Authentication
Log in to your Salesforce account
Navigate to User Settings
- Click on your avatar (usually in the top right) and select “Settings.”
Find Your Salesforce Username
- Your username is displayed in "My Personal Information" → "Personal Information".
Get Your Salesforce Password
- Use the password you normally use to log in to Salesforce.
Reset/Get Your Salesforce Security Token
- In Settings, search for “Reset My Security Token.”
- Follow the instructions to reset; a new token will be sent to your email.
(Optional) Find Your Salesforce Instance URL
- After login, check your browser’s address bar (e.g., https://your-domain.my.salesforce.com). This is your instance URL.
- If not specified, you may use the default:
https://login.salesforce.com
.
2. OAuth 2.0 Client Credentials Flow
Log in to Salesforce as an Admin
- Use an admin account on your Salesforce instance.
Create a Connected App
- Go to “Setup” → “Apps” → “App Manager.”
- Click “New Connected App.”
Configure OAuth Settings
- Check the box “Enable OAuth Settings.”
- Set “Callback URL” to:
https://login.salesforce.com/services/oauth2/success
(or any valid redirect URI).
- Add the OAuth scope:
api
(and other scopes as needed).
- Under “OAuth Flows,” enable “Client Credentials Flow.”
Save and Retrieve Your App Credentials
- After saving, the “Consumer Key” is your Client ID.
- The “Consumer Secret” is your Client Secret (click “Manage Consumer Details” to reveal).
Find Your Salesforce Instance URL
- Use the domain as shown after login (e.g.,
https://your-domain.my.salesforce.com
). This is required for ENV.
3. Filling in the FastMCP Connection Interface
Once you have obtained the needed values, fill in the FastMCP connection interface as follows:
For Username/Password Authentication:
SALESFORCE_CONNECTION_TYPE
: User_Password
SALESFORCE_USERNAME
: Your Salesforce username
SALESFORCE_PASSWORD
: Your Salesforce password
SALESFORCE_TOKEN
: The security token emailed to you
SALESFORCE_INSTANCE_URL
: Your instance URL (optional if default)
For OAuth 2.0:
SALESFORCE_CONNECTION_TYPE
: OAuth_2.0_Client_Credentials
SALESFORCE_CLIENT_ID
: The Consumer Key from the Connected App
SALESFORCE_CLIENT_SECRET
: The Consumer Secret from the Connected App
SALESFORCE_INSTANCE_URL
: Your Salesforce instance URL (required)
Click your "Install Now" button and enter these values in the FastMCP connection setup interface.
Note: Keep your credentials and tokens secure! Do not share them or expose them in public repositories or screenshots.