mcp-salesforce-example
Documentation
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 install2. Configure Salesforce Credentials:
`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:
Running the Server
node server.jsDemo
https://github.com/user-attachments/assets/08c8015a-bc57-4c5e-9f3d-4a9d9d310f4c
Frequently asked questions
What is mcp-salesforce-example?
mcp-salesforce-example is a Model Context Protocol (MCP) server listed in the TrackMCP directory.
How do I install mcp-salesforce-example?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is mcp-salesforce-example open source?
Yes — it is hosted on GitHub at https://github.com/lciesielski/mcp-salesforce-example and has 5 stars.
Related MCP tools
Adb-mcp is a proof of concept project to enabled AI control of Adobe tools (Adobe Photoshop and Adobe Premiere) by providing an interface to LLMs via the MCP...
The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.
An AI-powered task-management system you can drop into Cursor, Lovable, Windsurf, Roo, and others. Built for the Model Context Protocol to enhance AI capabiliti
Fay是一个帮助数字人(2.5d、3d、移动、pc、网页)或大语言模型(openai兼容、deepseek)连通业务系统的mcp框架。 JavaScript-based implementation. Trusted by 12000+ developers.
CTTF: MCP integration between Cursor and Figma, allowing Cursor Agentic AI to communicate with Figma for reading designs and modifying them programmatically.
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients. JavaScript-based implementation.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP