Salesforce MCP Sample Integration
Description
# Salesforce MCP Sample Integration This project provides a basic example of integrating with Salesforce using the Model Context Protocol (MCP). It allows interaction with Salesforce features like sending emails and deploying Apex code through MCP tools. ## Prerequisites *…
About
# Salesforce MCP Sample Integration This project provides a basic example of integrating with Salesforce using the Model Context Protocol (MCP). It allows interaction with Salesforce features like sending emails and deploying Apex code through MCP tools. ## Prerequisites * Node.js and npm (or yarn) installed. * A…
Details
- Author
- lciesielski
- GitHub stars
- 6
- Downloads
- 186
- Categories
- Search
Jump to
- Integrates Salesforce with MCP tools
- Send emails via Salesforce
- Deploy Apex code
- Uses JWT Bearer Flow authentication
- Node.js based with npm/yarn
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Salesforce MCP Sample IntegrationCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install dependencies with npm install (or yarn install), then configure Salesforce credentials by creating a utils/credentials.js file that exports getSalesforceCredentials() using JWT Bearer Flow authentication. Update the sample claude_desktop_config.json with your paths and credentials, then run the server with node server.js.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"salesforce mcp sample integration": {
"mcp-salesforce-example": {
"command": "node",
"args": [
"server.js"
]
}
}
}
}
McpServers
{
"mcp-salesforce-example": {
"command": "node",
"args": [
"server.js"
]
}
}
Salesforce MCP Sample Integration
This project provides a basic example of integrating with Salesforce using the Model Context Protocol (MCP). It allows interaction with Salesforce features like sending emails and deploying Apex code through MCP tools.
Prerequisites
Node.js and npm (or yarn) installed.
A Salesforce org where you can create a Connected App.
Setup
1. Install Dependencies:
npm install
# or
yarn install
2. Configure Salesforce Credentials:
You MUST create a credentials.js file inside a utils folder (./utils/credentials.js).
This file needs to export a function getSalesforceCredentials() which returns your Salesforce connection details necessary for JWT Bearer Flow authentication.
Important: Ensure you have a Connected App configured in Salesforce for JWT authentication, allowing the appropriate scopes and pre-authorizing the relevant user profile.
utils/credentials.js Example:
import fs from 'fs';
import path from 'path';
// You might load these from environment variables, a config file, etc.
export function getSalesforceCredentials() {
// --- IMPLEMENT YOUR LOGIC HERE to securely load credentials ---
const loginUrl = "YOUR_SALESFORCE_LOGIN_URL"; // e.g., https://login.salesforce.com or https://yourdomain.my.salesforce.com
const username = "YOUR_SALESFORCE_USERNAME";
const clientId = "YOUR_CONNECTED_APP_CONSUMER_KEY";
// Load your private key used to sign the JWT assertion
// Ensure the key is formatted correctly, including BEGIN/END lines.
const privateKey = fs.readFileSync(path.resolve(__dirname, 'path/to/your/server.key'), 'utf8');
// Example: const privateKey = process.env.SF_PRIVATE_KEY;
if (!loginUrl || !username || !clientId || !privateKey) {
throw new Error("Missing required Salesforce credentials in utils/credentials.js");
}
return {
loginUrl,
username,
clientId,
privateKey
};
}
3. Configuration File:
The repository includes a sample claude_desktop_config.json file that can be used as a template for configuring your MCP server.
* Update the paths and credentials in this file according to your environment setup.
Running the Server
node server.js
Demo
https://github.com/user-attachments/assets/08c8015a-bc57-4c5e-9f3d-4a9d9d310f4c
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.

