Salesforce MCP Sample Integration
lciesielski
README
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
-
Install Dependencies:
npm install # or yarn install
-
Configure Salesforce Credentials:
- You MUST create a
credentials.js
file inside autils
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 }; }
- You MUST create a
-
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.
- The repository includes a sample
Running the Server
node server.js
Demo
https://github.com/user-attachments/assets/08c8015a-bc57-4c5e-9f3d-4a9d9d310f4c
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
Jira-Context-MCP
MCP server to provide Jira Tickets information to AI coding agents like Cursor

Linear MCP Server
A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.