Salesforce MCP Server logo

Salesforce MCP Server

by ganeshnt

A local development server that mocks Salesforce CLI commands for testing and development purposes. It provides a configurable environment for simulating Salesforce interactions without needing a live Salesforce org.

View on GitHub

Last updated: N/A

What is Salesforce MCP Server?

Salesforce MCP Server is a local development server designed to mimic Salesforce CLI commands. It allows developers to test and develop Salesforce integrations and commands in a controlled, offline environment.

How to use Salesforce MCP Server?

To use the server, clone the repository, install dependencies using npm install, configure environment variables in the .env file, and then run the server in development mode using npm run dev or in production mode using npm run build and npm start. You can then interact with the server as if it were the Salesforce CLI, using the mocked API endpoints.

Key features of Salesforce MCP Server

  • Mock Salesforce CLI commands

  • Local development environment

  • Configurable endpoints

  • Logging and error handling

  • Security features (CORS, Helmet)

  • Environment-based configuration

Use cases of Salesforce MCP Server

  • Testing Salesforce CLI integrations

  • Developing Salesforce commands offline

  • Simulating Salesforce API interactions

  • Automated testing of Salesforce deployments

FAQ from Salesforce MCP Server

What is the default port for the server?

The default port is 6101, but it can be configured using the PORT environment variable.

How do I configure the server?

The server is configured using environment variables in the .env file.

What Salesforce CLI commands are mocked?

The server mocks Apex Test Execution, Org Management, Package Management, and Source Management.

How do I enable CORS?

CORS is enabled by default and can be configured using the CORS_ORIGIN environment variable.

Where are the logs stored?

Logs are written to the console in development mode and to error.log (error logs) and combined.log (all logs) in production mode.