About Salesforce MCP Server
Salesforce MCP Server is a local development server for testing integrations that use Salesforce CLI commands. It mocks Apex test execution and org, package, and source management, with configurable endpoints and logging.
Key features
- 01Mock Salesforce CLI commands
- 02Apex test execution endpoints
- 03Org, package, and source management mocks
- 04Configurable endpoints and environment
- 05Logging and error handling
- 06API key authentication and request validation
Use cases
- 01Test software that invokes Salesforce CLI commands
- 02Develop against mocked Salesforce operations locally
MCP support
It is an MCP server for local development that exposes mocked Salesforce CLI operations to MCP clients.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMESalesforce MCP Server
A local development server that mocks Salesforce CLI commands for testing and development purposes.
Features
- Mock Salesforce CLI commands
- Local development environment
- Configurable endpoints
- Logging and error handling
- Security features (CORS, Helmet)
- Environment-based configuration
Prerequisites
- Node.js (v14 or higher)
- npm (v6 or higher)
Installation
- Clone the repository:
git clone <repository-url>
cd mcp-server
- Install dependencies:
npm install
- Configure environment variables:
cp .env.example .env
# Edit .env with your configuration
Usage
Development Mode
npm run dev
Production Mode
npm run build
npm start
Testing
npm test
Configuration
The server can be configured using environment variables in the .env file:
PORT: Server port (default: 6101)HOST: Server host (default: localhost)NODE_ENV: Environment (development/production)LOG_LEVEL: Logging level (info/debug/error)CORS_ORIGIN: CORS originAPI_KEY: API key for authenticationSF_LOGIN_URL: Salesforce login URLSF_API_VERSION: Salesforce API version
API Endpoints
The server mocks the following Salesforce CLI commands:
- Apex Test Execution
- Org Management
- Package Management
- Source Management
Security
- CORS is enabled and configurable
- Helmet is used for security headers
- API key authentication
- Request validation
- Error handling
Logging
Logs are written to:
- Console (development)
error.log(error logs)combined.log(all logs)
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.