mcp-salesforce

mcp-salesforce

MCP server with basic demonstration of interactions with your Salesforce instance

5
Stars
5
Forks
0
Releases

Overview

This project demonstrates a minimal MCP server that integrates with Salesforce by using the Model Context Protocol. It showcases how to perform common Salesforce actions through MCP tooling, including sending emails and deploying Apex code from an MCP-driven workflow. The server is built with Node.js and requires a Salesforce org with a configured Connected App to enable JWT Bearer Flow authentication. To get started, install dependencies, place a credentials loader at utils/credentials.js that exports getSalesforceCredentials(), and configure a sample claude_desktop_config.json to point to your environment. The credentials.js loader should provide loginUrl, username, clientId, and a privateKey, enabling the server to authenticate without interactive login. After configuring, run the server with node server.js. The README provides guidance on creating the Connected App with appropriate scopes and pre-authorizing the relevant user profile. A demo asset and a YouTube video are linked for quick verification of the workflow.

Details

Owner
lciesielski
Language
JavaScript
License
MIT License
Updated
2025-12-07

Features

MCP-based Salesforce integration

Demonstrates using the Model Context Protocol to communicate with a Salesforce instance from a Node.js server.

Email sending through Salesforce

Illustrates enabling email-related interactions within the MCP workflow to publish or trigger emails in Salesforce.

Apex code deployment via MCP tools

Shows how Apex deployment can be executed through MCP-driven commands within the sample server.

JWT Bearer Flow authentication

Uses JWT Bearer Flow for server-to-Salesforce authentication, requiring a connected app and private key.

Connected App guidance

Includes guidance for configuring the Salesforce Connected App with appropriate OAuth scopes and pre-authorization.

Credentials loader utility

Provides a utils/credentials.js pattern that exports getSalesforceCredentials() to load connection details securely.

Config template for MCP server

Includes a sample claude_desktop_config.json to configure paths and credentials for the MCP server.

Run-ready Node.js server

Offers a runnable server.js with npm/yarn setup commands and clear run instructions.

Audience

DevelopersLearn MCP-based Salesforce integration setup and configuration for deployments with sample credentials.

Tags

SalesforceMCPJWT Bearer FlowConnected AppEmailApexNode.jsOAuthIntegration