by lciesielski
Integrates with Salesforce to send emails and deploy Apex code using MCP tools.
Enables developers to connect a local Node.js server to a Salesforce org and perform actions such as sending emails and deploying Apex code through the Model Context Protocol (MCP) interface.
npm install
or yarn install
../utils/credentials.js
that exports a getSalesforceCredentials()
function returning login URL, username, client ID, and private key for JWT Bearer Flow authentication.claude_desktop_config.json
(or your own MCP config) to point to the correct credential paths.node server.js
.claude_desktop_config.json
).Q: Do I need a Salesforce Connected App? A: Yes, a Connected App with JWT authentication enabled is required.
Q: Which Node.js version is supported? A: Any recent LTS version (e.g., 18.x or 20.x) works.
Q: Can I run this on a cloud server?
A: Absolutely—just ensure the credentials.js
file is securely stored and the environment can reach your Salesforce org.
Q: How do I change the MCP configuration file?
A: Edit claude_desktop_config.json
to update paths, ports, or other MCP settings as needed.
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.
Install Dependencies:
npm install
# or
yarn install
Configure Salesforce Credentials:
credentials.js
file inside a utils
folder (./utils/credentials.js
).getSalesforceCredentials()
which returns your Salesforce connection details necessary for JWT Bearer Flow authentication.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
};
}
Configuration File:
claude_desktop_config.json
file that can be used as a template for configuring your MCP server.node server.js
https://github.com/user-attachments/assets/08c8015a-bc57-4c5e-9f3d-4a9d9d310f4c
Please log in to share your review and rating for this MCP.
Discover more MCP servers with similar functionality and use cases
by daytonaio
Provides a secure, elastic sandbox environment for executing AI‑generated code with isolated runtimes and sub‑90 ms provisioning.
by awslabs
Specialized servers that expose AWS capabilities through the Model Context Protocol, allowing AI assistants and other applications to retrieve up‑to‑date AWS documentation, manage infrastructure, query services, and perform workflow automation directly from their context.
by awslabs
AWS MCP Servers allow AI agents to interact with and manage a wide range of AWS services using natural language commands. They enable AI-powered cloud management, automated DevOps, and data-driven insights within the AWS ecosystem.
by cloudflare
Remote Model Context Protocol endpoints that let AI clients read, process, and act on data across Cloudflare services such as Workers, Radar, Observability, and more.
by supabase-community
Enables AI assistants to interact directly with Supabase projects, allowing them to query databases, fetch configuration, manage tables, and perform other project‑level operations.
by Azure
azure-mcp is a server that implements the Model Context Protocol (MCP) to connect AI agents with Azure services. It allows developers to interact with Azure resources like Storage, Cosmos DB, and the Azure CLI using natural language commands within their development environment.
by Flux159
MCP Server for Kubernetes management commands, enabling interaction with Kubernetes clusters to manage pods, deployments, and services.
by strowk
Provides a Golang‑based server that enables interaction with Kubernetes clusters via prompts, allowing listing of contexts, namespaces, resources, nodes, pods, events, logs, and executing commands inside pods.
by jamsocket
Run arbitrary Python code securely in persistent, stateful sandboxes that remain available indefinitely.