IBM/salesforce-mcp-server
If you are the rightful owner of salesforce-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Salesforce MCP Server is a comprehensive Model Context Protocol server implementation that integrates Claude with Salesforce, providing over 61 specialized tools for complete Salesforce management.
Salesforce MCP Server
A comprehensive MCP (Model Context Protocol) server implementation that integrates Claude with Salesforce, providing 61+ specialized tools for complete Salesforce management. This server enables natural language interactions with your entire Salesforce ecosystem - from data operations to advanced DevOps workflows.
🔗 Links
- GitHub: https://github.ibm.com/kirtijha/salesforce-mcp-server
- NPM: https://www.npmjs.com/package/@kirtijha/salesforce-mcp-server
📦 Installation
Using npx (Recommended - No Installation Required)
The easiest way to use the server is with npx, which automatically runs the latest version without installing:
Configure your MCP client:
{
"mcpServers": {
"salesforce": {
"command": "npx",
"args": ["-y", "@kirtijha/salesforce-mcp-server"],
"env": {
"SALESFORCE_USERNAME": "your-username@company.com",
"SALESFORCE_PASSWORD": "your-password",
"SALESFORCE_SECURITY_TOKEN": "your-security-token",
"SALESFORCE_INSTANCE_URL": "https://your-instance.salesforce.com"
}
}
}
}
Global Installation
Install globally to use the server anywhere:
npm install -g @kirtijha/salesforce-mcp-server
Then configure your MCP client:
{
"mcpServers": {
"salesforce": {
"command": "salesforce-mcp-server",
"env": {
"SALESFORCE_USERNAME": "your-username@company.com",
"SALESFORCE_PASSWORD": "your-password",
"SALESFORCE_SECURITY_TOKEN": "your-security-token",
"SALESFORCE_INSTANCE_URL": "https://your-instance.salesforce.com"
}
}
}
}
HTTP Server Mode
Run as a standalone HTTP server for remote access or orchestration platforms:
# Set environment variables
export SF_USERNAME="your-username@company.com"
export SF_PASSWORD="your-password"
export SF_SECURITY_TOKEN="your-security-token"
export MCP_API_KEY="your-secure-api-key"
export PORT=3000
# Using npx
npx -y @kirtijha/salesforce-mcp-server --http
# Or if installed globally
salesforce-mcp-http
The server will be available at:
- MCP endpoint:
http://localhost:3000/mcp - Tools list:
http://localhost:3000/tools - Health check:
http://localhost:3000/health
See for detailed HTTP configuration.
Local Development Installation
For contributing or local development:
# Clone the repository
git clone https://github.ibm.com/kirtijha/salesforce-mcp-server.git
cd salesforce-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
⚡ Quick Start
📚 Configuration Examples
Using npx (Recommended)
🔵 IBM Bob IDE
Global Configuration (~/Library/Application Support/Bob-IDE/User/globalStorage/ibm.bob-code/settings/mcp_settings.json):
{
"mcpServers": {
"salesforce": {
"command": "npx",
"args": ["-y", "@kirtijha/salesforce-mcp-server"],
"env": {
"SALESFORCE_USERNAME": "your-username@company.com",
"SALESFORCE_PASSWORD": "your-password",
"SALESFORCE_SECURITY_TOKEN": "your-security-token",
"SALESFORCE_INSTANCE_URL": "https://your-instance.salesforce.com"
}
}
}
}
Project Configuration (<project>/.Bob/mcp.json):
{
"mcpServers": {
"salesforce": {
"command": "npx",
"args": ["-y", "@kirtijha/salesforce-mcp-server"],
"env": {
"SALESFORCE_USERNAME": "your-username@company.com",
"SALESFORCE_PASSWORD": "your-password",
"SALESFORCE_SECURITY_TOKEN": "your-security-token",
"SALESFORCE_INSTANCE_URL": "https://your-instance.salesforce.com"
}
}
}
}
🟣 Claude Desktop
Add to your claude_desktop_config.json (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"salesforce": {
"command": "npx",
"args": ["-y", "@kirtijha/salesforce-mcp-server"],
"env": {
"SALESFORCE_USERNAME": "your-username@company.com",
"SALESFORCE_PASSWORD": "your-password",
"SALESFORCE_SECURITY_TOKEN": "your-security-token",
"SALESFORCE_INSTANCE_URL": "https://your-instance.salesforce.com"
}
}
}
}
🟢 GitHub Copilot Chat (VS Code)
Project Configuration (<project>/.vscode/mcp.json):
{
"mcpServers": {
"salesforce": {
"command": "npx",
"args": ["-y", "@kirtijha/salesforce-mcp-server"],
"env": {
"SALESFORCE_USERNAME": "your-username@company.com",
"SALESFORCE_PASSWORD": "your-password",
"SALESFORCE_SECURITY_TOKEN": "your-security-token",
"SALESFORCE_INSTANCE_URL": "https://your-instance.salesforce.com"
}
}
}
}
Using Local Installation
If you've cloned the repository locally:
🔵 IBM Bob IDE (Local)
Configuration
Global Configuration (~/Library/Application Support/Bob-IDE/User/globalStorage/ibm.bob-code/settings/mcp_settings.json):
{
"mcpServers": {
"salesforce-main": {
"command": "node",
"args": ["/absolute/path/to/salesforce-mcp-server/dist/index.js"],
"env": {
"SALESFORCE_USERNAME": "your-username@company.com",
"SALESFORCE_PASSWORD": "your-password",
"SALESFORCE_SECURITY_TOKEN": "your-security-token",
"SALESFORCE_INSTANCE_URL": "https://your-instance.salesforce.com"
}
}
}
}
Project Configuration (<project>/.Bob/mcp.json):
{
"mcpServers": {
"salesforce-main": {
"command": "node",
"args": ["/absolute/path/to/salesforce-mcp-server/dist/index.js"],
"env": {
"SALESFORCE_USERNAME": "your-username@company.com",
"SALESFORCE_PASSWORD": "your-password",
"SALESFORCE_SECURITY_TOKEN": "your-security-token",
"SALESFORCE_INSTANCE_URL": "https://your-instance.salesforce.com"
}
}
}
}
Note: Replace
/absolute/path/to/with the actual path where you cloned the repository.
� Claude Desktop (Local)
Add to your claude_desktop_config.json (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"salesforce-main": {
"command": "node",
"args": ["/absolute/path/to/salesforce-mcp-server/dist/index.js"],
"env": {
"SALESFORCE_USERNAME": "your-username@company.com",
"SALESFORCE_PASSWORD": "your-password",
"SALESFORCE_SECURITY_TOKEN": "your-security-token",
"SALESFORCE_INSTANCE_URL": "https://your-instance.salesforce.com"
}
}
}
}
Note: Replace
/absolute/path/to/with the actual path where you cloned the repository.
🟢 GitHub Copilot Chat (VS Code, Local)
Project Configuration (<project>/.vscode/mcp.json):
{
"mcpServers": {
"salesforce-main": {
"command": "node",
"args": ["/absolute/path/to/salesforce-mcp-server/dist/index.js"],
"env": {
"SALESFORCE_USERNAME": "your-username@company.com",
"SALESFORCE_PASSWORD": "your-password",
"SALESFORCE_SECURITY_TOKEN": "your-security-token",
"SALESFORCE_INSTANCE_URL": "https://your-instance.salesforce.com"
}
}
}
}
Note: Replace
/absolute/path/to/with the actual path where you cloned the repository.
🟣 Claude Desktop
Configuration
Add to your claude_desktop_config.json (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"salesforce-main": {
"command": "node",
"args": ["/absolute/path/to/salesforce-mcp-server/dist/index.js"],
"env": {
"SALESFORCE_USERNAME": "your-username@company.com",
"SALESFORCE_PASSWORD": "your-password",
"SALESFORCE_SECURITY_TOKEN": "your-security-token",
"SALESFORCE_INSTANCE_URL": "https://your-instance.salesforce.com"
}
}
}
}
Note: Replace
/absolute/path/to/with the actual path where you cloned the repository.
🟢 GitHub Copilot Chat (VS Code)
Configuration
User-wide Configuration (~/.config/Code/User/settings.json):
{
"mcp.servers": {
"salesforce-main": {
"command": "node",
"args": ["/absolute/path/to/salesforce-mcp-server/dist/index.js"],
"env": {
"SALESFORCE_USERNAME": "your-username@company.com",
"SALESFORCE_PASSWORD": "your-password",
"SALESFORCE_SECURITY_TOKEN": "your-security-token",
"SALESFORCE_INSTANCE_URL": "https://your-instance.salesforce.com"
}
}
}
}
Project Configuration (<project>/.vscode/mcp.json):
{
"mcpServers": {
"salesforce-main": {
"command": "node",
"args": ["/absolute/path/to/salesforce-mcp-server/dist/index.js"],
"env": {
"SALESFORCE_USERNAME": "your-username@company.com",
"SALESFORCE_PASSWORD": "your-password",
"SALESFORCE_SECURITY_TOKEN": "your-security-token",
"SALESFORCE_INSTANCE_URL": "https://your-instance.salesforce.com"
}
}
}
}
Note: Replace
/absolute/path/to/with the actual path where you cloned the repository.
🧪 Testing the Server
Once configured, restart your IDE and test the connection:
# From the project directory, you can also run the server directly
node dist/index.js
The server will start and wait for MCP protocol messages via stdio.
🔧 Environment Variables
Configure your Salesforce connection using environment variables or in your IDE configuration:
| Variable | Description | Required | Example |
|---|---|---|---|
SALESFORCE_USERNAME | Your Salesforce username | Yes | user@company.com |
SALESFORCE_PASSWORD | Your Salesforce password | Yes | yourpassword |
SALESFORCE_SECURITY_TOKEN | Salesforce security token | Yes | yoursecuritytoken |
SALESFORCE_INSTANCE_URL | Your Salesforce instance URL | Yes | https://your-instance.salesforce.com |
SALESFORCE_API_VERSION | API version to use | No | 58.0 (default) |
SALESFORCE_LOGIN_URL | Login URL | No | https://login.salesforce.com (default) |
Features Included
Core Data & Schema Management
- Object and Field Management: Create and modify custom objects and fields using natural language
- Smart Object Search: Find Salesforce objects using partial name matches
- Detailed Schema Information: Get comprehensive field and relationship details for any object
- Flexible Data Queries: Query records with relationship support and complex filters
- Data Manipulation: Insert, update, delete, and upsert records with ease
- Cross-Object Search: Search across multiple objects using SOSL
- Bulk Operations: Handle large datasets efficiently with Salesforce Bulk API
- Data Import/Export: Transfer data in multiple formats (CSV, JSON, Excel)
Advanced Development & DevOps
- Apex Code Management: Read, create, and update Apex classes and triggers
- Anonymous Apex Execution: Run Apex code without creating permanent classes
- Debug Log Management: Enable, disable, and retrieve debug logs for users
- Test Execution: Run Apex tests and view code coverage reports
- Static Code Analysis: Analyze code quality, security, and performance
- Package Management: Create, install, and manage Salesforce packages
- Sandbox Management: Create, refresh, and manage sandbox environments
- Deployment Management: Monitor and manage deployments and change sets
User & Security Management
- User Management: Create, update, deactivate users and reset passwords
- Profile Management: Create, clone, and update user profiles
- Permission Sets: Manage permission sets and assignments
- Role Hierarchy: Create and manage role hierarchies
- Field-Level Security: Manage field permissions across profiles
- User Permission Analysis: View effective permissions for users
Workflow & Automation
- Flow Management: List, activate, and deactivate Salesforce Flows
- Workflow Rules: Manage and monitor workflow rule execution
- Process Builder: Control Process Builder processes
- Approval Processes: Manage approval process configurations
- Automation Monitoring: View status of running processes and failed automation
Communication & Content
- Email Management: Send emails using templates and track delivery
- Email Templates: Create and manage email templates
- File Management: Upload, download, share, and manage Salesforce files
- Chatter Integration: Post, comment, and manage Chatter feeds
- Knowledge Articles: Create, search, and manage Knowledge articles
Analytics & Monitoring
- Performance Monitoring: Monitor org performance and system health
- Error Monitoring: Track and analyze system errors and exceptions
- Usage Analytics: Analyze user behavior and feature adoption
- Audit Trail: Access setup changes and user activity logs
- Login Forensics: Advanced security investigation and threat detection
- Territory Management: Manage sales territories and assignments
Integration & External Systems
- REST API Callouts: Test and manage external REST integrations
- SOAP API Callouts: Handle SOAP web service integrations
- Platform Events: Publish and manage platform events for real-time integration
- Streaming API: Manage real-time data streaming and change data capture
- Heroku Connect: Manage bi-directional data synchronization with PostgreSQL
Business Operations
- Price Books: Manage product pricing and price book entries
- Forecasting: Handle sales forecasting and quota management
- Case Escalation: Manage case escalation rules and processes
- Duplicate Management: Find and merge duplicate records
- Data Backup: Schedule and manage data backups with restoration
Organization Management
- Org Limits: Monitor API limits, storage, and feature usage
- Dashboard Management: Manage dashboards and their components
- Report Management: Create, run, and schedule reports
- Connected Apps: Manage OAuth configurations and security settings
- Scratch Orgs: Create and manage development environments
Intuitive Error Handling
- Clear feedback with Salesforce-specific error details
- Comprehensive logging and debugging capabilities
- Graceful error recovery with meaningful messages
🔧 Tools (64 Total)
Click to expand/collapse all tools
Core Data & Schema Management
salesforce_search_objects
Search for standard and custom objects:
- Search by partial name matches
- Finds both standard and custom objects
- Example: "Find objects related to Account" will find Account, AccountHistory, etc.
salesforce_describe_object
Get detailed object schema information:
- Field definitions and properties
- Relationship details
- Picklist values
- Example: "Show me all fields in the Account object"
salesforce_query_records
Query records with relationship support:
- Parent-to-child relationships
- Child-to-parent relationships
- Complex WHERE conditions
- Example: "Get all Accounts with their related Contacts"
- Note: For queries with GROUP BY or aggregate functions, use salesforce_aggregate_query
salesforce_aggregate_query
Execute aggregate queries with GROUP BY:
- GROUP BY single or multiple fields
- Aggregate functions: COUNT, COUNT_DISTINCT, SUM, AVG, MIN, MAX
- HAVING clauses for filtering grouped results
- Date/time grouping functions
- Example: "Count opportunities by stage" or "Find accounts with more than 10 opportunities"
salesforce_dml_records
Perform data operations:
- Insert new records
- Update existing records
- Delete records
- Upsert using external IDs
- Example: "Update status of multiple accounts"
salesforce_search_all
Search across multiple objects:
- SOSL-based search
- Multiple object support
- Field snippets
- Example: "Search for 'cloud' across Accounts and Opportunities"
Object & Field Management
salesforce_manage_object
Create and modify custom objects:
- Create new custom objects
- Update object properties
- Configure sharing settings
- Example: "Create a Customer Feedback object"
salesforce_manage_field
Manage object fields:
- Add new custom fields
- Modify field properties
- Create relationships
- Automatically grants Field Level Security to System Administrator by default
- Use
grantAccessToparameter to specify different profiles - Example: "Add a Rating picklist field to Account"
salesforce_manage_field_permissions
Manage Field Level Security (Field Permissions):
- Grant or revoke read/edit access to fields for specific profiles
- View current field permissions
- Bulk update permissions for multiple profiles
- Example: "Grant System Administrator access to Custom_Field__c on Account"
Data Management & Operations
salesforce_bulk_operations
Perform bulk operations on large datasets:
- Insert, update, delete, upsert operations for thousands of records
- Export large datasets using Bulk API
- Optimized for high-volume data processing
- Example: "Bulk insert 10,000 accounts from CSV data"
salesforce_data_export
Export Salesforce data to various formats:
- CSV, JSON, and Excel export options
- Custom filtering and sorting
- Large dataset support with relationship fields
- Example: "Export all opportunities to CSV with custom fields"
salesforce_data_import
Import data into Salesforce from various formats:
- CSV and JSON import with validation
- Duplicate detection and error handling
- Batch processing with detailed error reporting
- Example: "Import contacts from CSV with validation"
salesforce_manage_duplicates
Find and merge duplicate records:
- Identify potential duplicates using matching rules
- Merge duplicate records with field mapping
- Configure duplicate detection rules
- Example: "Find and merge duplicate accounts by name"
salesforce_data_backup
Backup critical Salesforce data:
- Create full or incremental backups
- Schedule automated backups
- Export data in multiple formats with restoration capabilities
- Example: "Backup all Account data with weekly scheduling"
Development & Code Management
salesforce_read_apex
Read Apex classes:
- Get full source code of specific classes
- List classes matching name patterns
- View class metadata (API version, status, etc.)
- Support for wildcards (* and ?) in name patterns
- Example: "Show me the AccountController class" or "Find all classes matching AccountCont"
salesforce_write_apex
Create and update Apex classes:
- Create new Apex classes
- Update existing class implementations
- Specify API versions
- Example: "Create a new Apex class for handling account operations"
salesforce_read_apex_trigger
Read Apex triggers:
- Get full source code of specific triggers
- List triggers matching name patterns
- View trigger metadata (API version, object, status, etc.)
- Support for wildcards (* and ?) in name patterns
- Example: "Show me the AccountTrigger" or "Find all triggers for Contact object"
salesforce_write_apex_trigger
Create and update Apex triggers:
- Create new Apex triggers for specific objects
- Update existing trigger implementations
- Specify API versions and event operations
- Example: "Create a new trigger for the Account object"
salesforce_execute_anonymous
Execute anonymous Apex code:
- Run Apex code without creating a permanent class
- View debug logs and execution results
- Useful for data operations not directly supported by other tools
- Example: "Execute Apex code to calculate account metrics"
salesforce_manage_debug_logs
Manage debug logs for Salesforce users:
- Enable debug logs for specific users
- Disable active debug log configurations
- Retrieve and view debug logs
- Configure log levels (NONE, ERROR, WARN, INFO, DEBUG, FINE, FINER, FINEST)
- Example: "Enable debug logs for user@example.com"
Testing & Quality Assurance
salesforce_test_execution
Execute Apex tests and view code coverage:
- Run specific test classes or all tests
- View detailed test execution results
- Check code coverage reports for classes
- Example: "Run all tests and show coverage for AccountService class"
salesforce_static_analysis
Perform static analysis on Salesforce code:
- Analyze code quality, security, and performance issues
- Support for Apex classes, triggers, flows, and configurations
- Generate detailed reports with severity levels
- Example: "Analyze security issues in all Apex classes"
User & Security Management
salesforce_manage_users
Manage Salesforce users:
- Create new users with profiles and roles
- Update user details, profiles, roles
- Deactivate users safely
- Reset passwords with email notifications
- Example: "Create new sales users with Sales User profile"
salesforce_manage_profiles
Manage user profiles:
- Create new custom profiles
- Clone existing profiles with modifications
- Update profile settings and permissions
- Query profiles and their permissions
- Example: "Clone Standard User profile to create Sales Manager profile"
salesforce_manage_permission_sets
Manage permission sets:
- Create permission sets with specific permissions
- Assign/unassign permission sets to users
- Update permission set permissions
- Query permission sets and assignments
- Example: "Create API Access permission set and assign to integration users"
salesforce_manage_roles
Manage role hierarchy:
- Create new roles in the hierarchy
- Update role details and hierarchy structure
- Query roles and hierarchy relationships
- Assign roles to users
- Example: "Create Sales Manager role under VP Sales"
salesforce_view_user_permissions
View effective permissions for users:
- Check user's profile permissions
- List assigned permission sets
- View object and field-level permissions
- Analyze effective permissions from all sources
- Example: "Check all permissions for user@example.com"
Workflow & Automation
salesforce_manage_flows
Manage Salesforce Flows:
- List all flows with status information
- Get flow details and versions
- Activate or deactivate flows
- View flow execution history
- Example: "List all active flows" or "Deactivate problematic flow"
salesforce_manage_workflow_rules
Manage Workflow Rules:
- List all workflow rules with execution details
- Get workflow rule configuration and actions
- View workflow rule execution history
- Example: "List all active workflow rules for Account object"
salesforce_manage_process_builder
Manage Process Builder processes:
- List Process Builder processes with status
- Activate or deactivate processes
- Get detailed process information
- Example: "Activate lead conversion process"
salesforce_manage_approval_processes
Manage approval processes:
- List approval processes for objects
- Get detailed approval process configuration
- Activate or deactivate approval processes
- Example: "List all Account approval processes"
salesforce_view_automation_status
Monitor automation status and performance:
- View currently running processes and flows
- Check failed automation with error details
- Get automation performance statistics
- Monitor automation queue depth
- Example: "Check failed flows today" or "View running approval processes"
Communication & Content Management
salesforce_send_emails
Send emails through Salesforce:
- Send individual or mass emails
- Use email templates with merge fields
- Track email delivery and opens
- Send from specific users or org-wide addresses
- Example: "Send welcome email to new customers using template"
salesforce_manage_email_templates
Manage email templates:
- List all email templates by type/folder
- Create new email templates (Classic or Lightning)
- Update existing templates
- Get template content and metadata
- Example: "Create welcome email template with dynamic fields"
salesforce_file_management
Manage Salesforce Files and Content:
- Upload files to Salesforce (base64 encoded)
- Download file content
- Share files with users or groups
- List and manage files with metadata
- Example: "Upload document and share with sales team"
salesforce_chatter_posts
Manage Chatter posts and feeds:
- Create new Chatter posts to feeds
- Comment on existing posts
- Like or unlike posts
- Manage Chatter groups
- Example: "Post to company feed" or "Create team group"
salesforce_knowledge_articles
Manage Knowledge articles:
- Create new knowledge articles
- Search articles by keywords or categories
- Update and publish articles
- Manage article categories and versions
- Example: "Create FAQ article" or "Search support articles"
Analytics & Monitoring
salesforce_performance_monitoring
Monitor org performance and system health:
- Check system performance metrics
- Monitor API usage and limits
- Analyze storage usage and processing times
- Monitor concurrent user sessions
- Example: "Check API limits" or "Monitor storage usage"
salesforce_error_monitoring
Monitor and analyze errors:
- View recent errors and exceptions
- Analyze debug log errors
- Track error patterns over time
- Monitor system-level problems
- Example: "View recent exceptions" or "Analyze error trends"
salesforce_usage_analytics
Analyze user behavior and feature adoption:
- Track user login patterns and activity
- Analyze feature usage across the organization
- Generate adoption reports and insights
- Monitor user engagement metrics
- Example: "Show feature adoption trends" or "Analyze user login patterns"
salesforce_audit_trail
Access audit trail data:
- View setup changes and field history
- Track user activities and data changes
- Export audit data for compliance
- Generate compliance reports
- Example: "Show setup changes last month" or "Export audit trail"
salesforce_login_forensics
Advanced security investigation:
- Analyze authentication patterns
- Detect security threats and anomalies
- Geographic analysis of logins
- Device tracking and behavior analysis
- Example: "Investigate suspicious login patterns" or "Analyze failed login attempts"
Territory & Sales Management
salesforce_territory_management
Manage Territory Management 2.0:
- View territory hierarchy and structure
- Assign/remove users from territories
- Manage account-territory assignments
- View territory performance metrics
- Example: "View territory structure" or "Assign users to territories"
salesforce_forecasting
Handle sales forecasting:
- Manage forecast categories and quotas
- View forecast data and adjustments
- Configure forecasting settings
- Generate forecast reports
- Example: "View quarterly forecast data" or "Update sales quotas"
salesforce_price_books
Manage product pricing:
- Create and manage price books
- Add/update price book entries
- Configure product pricing strategies
- Manage standard and custom price books
- Example: "Create regional price book" or "Update product pricing"
Business Process Management
salesforce_case_escalation
Manage case escalation:
- Configure escalation rules and criteria
- Monitor escalated cases
- Manage escalation milestones and actions
- Track escalation performance
- Example: "Configure priority case escalation" or "Monitor escalated cases"
Integration & External Systems
salesforce_rest_callouts
Manage REST API callouts:
- Test REST endpoints from Salesforce
- View callout logs and responses
- Manage named credentials for authentication
- Check rate limits and analyze errors
- Example: "Test external API" or "View callout logs"
salesforce_soap_callouts
Manage SOAP web service callouts:
- Generate Apex classes from WSDL
- Make SOAP calls with authentication
- Handle SOAP headers and fault handling
- Parse WSDL and manage certificates
- Example: "Generate classes from WSDL" or "Make authenticated SOAP call"
salesforce_platform_events
Manage Platform Events:
- Publish custom platform events
- View event definitions and logs
- Monitor event volume and limits
- Manage Change Data Capture events
- Example: "Publish custom event" or "Monitor event volume"
salesforce_streaming_api
Manage Streaming API:
- Create and manage PushTopics
- Subscribe to Change Data Capture
- Handle Platform Events and Generic Events
- Configure replay settings
- Example: "Create PushTopic for Account changes" or "Subscribe to opportunity updates"
salesforce_heroku_connect
Manage Heroku Connect integration:
- Set up bi-directional data synchronization
- Configure object mapping between Salesforce and PostgreSQL
- Monitor sync status and performance
- Manage data transformations
- Example: "Set up account sync to PostgreSQL" or "Monitor sync performance"
DevOps & Environment Management
salesforce_package_management
Manage packages and versions:
- List all packages in the org
- Create new package versions
- Install/uninstall packages
- Get detailed package information
- Example: "List all packages" or "Install managed package"
salesforce_manage_sandboxes
Manage sandbox environments:
- List all sandboxes with status
- Create new sandboxes
- Refresh existing sandboxes
- Check sandbox creation/refresh status
- Example: "Create developer sandbox" or "Refresh staging environment"
salesforce_scratch_orgs
Manage scratch orgs for development:
- Create and delete scratch orgs
- Push/pull source code
- Deploy metadata and run tests
- Manage scratch org users
- Example: "Create scratch org for feature development" or "Deploy code to scratch org"
salesforce_deployment_status
Monitor deployment operations:
- Check deployment status and history
- Validate deployments before execution
- Cancel running deployments
- View detailed deployment results
- Example: "Check current deployment status" or "Validate change set"
salesforce_change_sets
Manage change sets for deployment:
- Create and configure change sets
- Add/remove components from change sets
- Deploy change sets between orgs
- Monitor change set status
- Example: "Create change set for metadata deployment" or "Deploy to production"
salesforce_connected_apps
Manage connected apps:
- List and configure connected apps
- Manage OAuth settings and policies
- Configure IP restrictions and certificates
- View app analytics and refresh tokens
- Example: "Configure OAuth app" or "Set IP restrictions"
Organization Management
salesforce_org_limits
Check organization limits and usage:
- Monitor API call limits and usage
- Check data and file storage limits
- View custom object and field limits
- Monitor user license usage
- Example: "Check API usage" or "Monitor storage consumption"
salesforce_manage_dashboards
Manage dashboards and components:
- List available dashboards with details
- View dashboard components and metadata
- Refresh dashboard data
- Manage dashboard sharing and subscriptions
- Example: "List all dashboards" or "Refresh sales dashboard"
salesforce_manage_reports
Manage reports:
- List reports by folder/type
- Run reports and get results
- Create basic report structures
- Schedule automated reports
- Example: "Run opportunity pipeline report" or "Schedule weekly sales report"
Advanced Analytics
salesforce_analytics_queries
Execute advanced analytics queries:
- Run complex analytical queries
- Access Einstein Analytics data
- Perform statistical analysis
- Generate business intelligence reports
- Example: "Run advanced sales analytics" or "Generate KPI dashboard data"
salesforce_execute_anonymous
Execute anonymous Apex code:
- Run Apex code without creating a permanent class
- View debug logs and execution results
- Useful for data operations not directly supported by other tools
- Example: "Execute Apex code to calculate account metrics" or "Run a script to update related records"
salesforce_manage_debug_logs
Manage debug logs for Salesforce users:
- Enable debug logs for specific users
- Disable active debug log configurations
- Retrieve and view debug logs
- Configure log levels (NONE, ERROR, WARN, INFO, DEBUG, FINE, FINER, FINEST)
- Example: "Enable debug logs for user@example.com" or "Retrieve recent logs for an admin user"
Installation
npm install -g @kirtijha/salesforce-mcp-server
Salesforce Authentication
You can connect to Salesforce using one of two authentication methods:
1. Username/Password Authentication (Default)
- Set up your Salesforce credentials
- Get your security token (Reset from Salesforce Settings)
2. OAuth 2.0 Client Credentials Flow
- Create a Connected App in Salesforce
- Enable OAuth settings and select "Client Credentials Flow"
- Set appropriate scopes (typically "api" is sufficient)
- Save the Client ID and Client Secret
- Important: Note your instance URL (e.g.,
https://your-domain.my.salesforce.com) as it's required for authentication
📚 Usage with Popular IDEs
🔵 IBM Bob IDE
Configuration
Add to your IBM Bob IDE configuration file:
Global Configuration (~/Library/Application Support/Bob-IDE/User/globalStorage/ibm.bob-code/settings/mcp_settings.json):
For Username/Password Authentication:
{
"mcpServers": {
"salesforce": {
"command": "npx",
"args": ["-y", "@kirtijha/salesforce-mcp-server"],
"env": {
"SALESFORCE_CONNECTION_TYPE": "User_Password",
"SALESFORCE_USERNAME": "your_username",
"SALESFORCE_PASSWORD": "your_password",
"SALESFORCE_TOKEN": "your_security_token",
"SALESFORCE_INSTANCE_URL": "org_url"
}
}
}
}
For OAuth 2.0 Client Credentials Flow:
{
"mcpServers": {
"salesforce": {
"command": "npx",
"args": ["-y", "@kirtijha/salesforce-mcp-server"],
"env": {
"SALESFORCE_CONNECTION_TYPE": "OAuth_2.0_Client_Credentials",
"SALESFORCE_CLIENT_ID": "your_client_id",
"SALESFORCE_CLIENT_SECRET": "your_client_secret",
"SALESFORCE_INSTANCE_URL": "https://your-domain.my.salesforce.com"
}
}
}
}
Project Configuration (<project>/.Bob/mcp.json):
Use the same JSON structure as above in your project's .Bob/mcp.json file.
Note: For OAuth 2.0 Client Credentials Flow, the
SALESFORCE_INSTANCE_URLmust be your exact Salesforce instance URL (e.g.,https://your-domain.my.salesforce.com).
🟣 Claude Desktop
Configuration
Add to your claude_desktop_config.json (~/Library/Application Support/Claude/claude_desktop_config.json):
For Username/Password Authentication:
{
"mcpServers": {
"salesforce": {
"command": "npx",
"args": ["-y", "@kirtijha/salesforce-mcp-server"],
"env": {
"SALESFORCE_CONNECTION_TYPE": "User_Password",
"SALESFORCE_USERNAME": "your_username",
"SALESFORCE_PASSWORD": "your_password",
"SALESFORCE_TOKEN": "your_security_token",
"SALESFORCE_INSTANCE_URL": "org_url"
}
}
}
}
For OAuth 2.0 Client Credentials Flow:
{
"mcpServers": {
"salesforce": {
"command": "npx",
"args": ["-y", "@kirtijha/salesforce-mcp-server"],
"env": {
"SALESFORCE_CONNECTION_TYPE": "OAuth_2.0_Client_Credentials",
"SALESFORCE_CLIENT_ID": "your_client_id",
"SALESFORCE_CLIENT_SECRET": "your_client_secret",
"SALESFORCE_INSTANCE_URL": "https://your-domain.my.salesforce.com"
}
}
}
}
Note: For OAuth 2.0 Client Credentials Flow, the
SALESFORCE_INSTANCE_URLmust be your exact Salesforce instance URL (e.g.,https://your-domain.my.salesforce.com). The token endpoint will be constructed as<instance_url>/services/oauth2/token.
🤖 GitHub Copilot Chat (VS Code)
Configuration
User-wide Configuration (~/.config/Code/User/settings.json):
For Username/Password Authentication:
{
"mcp.servers": {
"salesforce": {
"command": "npx",
"args": ["-y", "@kirtijha/salesforce-mcp-server"],
"env": {
"SALESFORCE_CONNECTION_TYPE": "User_Password",
"SALESFORCE_USERNAME": "your_username",
"SALESFORCE_PASSWORD": "your_password",
"SALESFORCE_TOKEN": "your_security_token",
"SALESFORCE_INSTANCE_URL": "org_url"
}
}
}
}
For OAuth 2.0 Client Credentials Flow:
{
"mcp.servers": {
"salesforce": {
"command": "npx",
"args": ["-y", "@kirtijha/salesforce-mcp-server"],
"env": {
"SALESFORCE_CONNECTION_TYPE": "OAuth_2.0_Client_Credentials",
"SALESFORCE_CLIENT_ID": "your_client_id",
"SALESFORCE_CLIENT_SECRET": "your_client_secret",
"SALESFORCE_INSTANCE_URL": "https://your-domain.my.salesforce.com"
}
}
}
}
Project Configuration (<project>/.vscode/mcp.json):
{
"mcpServers": {
"salesforce": {
"command": "npx",
"args": ["-y", "@kirtijha/salesforce-mcp-server"],
"env": {
"SALESFORCE_CONNECTION_TYPE": "User_Password",
"SALESFORCE_USERNAME": "your_username",
"SALESFORCE_PASSWORD": "your_password",
"SALESFORCE_TOKEN": "your_security_token",
"SALESFORCE_INSTANCE_URL": "org_url"
}
}
}
}
Note: For OAuth 2.0 Client Credentials Flow, the
SALESFORCE_INSTANCE_URLmust be your exact Salesforce instance URL (e.g.,https://your-domain.my.salesforce.com).
🌐 Remote Configuration and Execution
For details on remote deployment and HTTP-based execution, see .
Example Usage
Core Data Operations
Searching Objects
"Find all objects related to Accounts"
"Show me objects that handle customer service"
"What objects are available for order management?"
Getting Schema Information
"What fields are available in the Account object?"
"Show me the picklist values for Case Status"
"Describe the relationship fields in Opportunity"
Querying Records
"Get all Accounts created this month"
"Show me high-priority Cases with their related Contacts"
"Find all Opportunities over $100k"
Aggregate Queries
"Count opportunities by stage"
"Show me the total revenue by account"
"Find accounts with more than 10 opportunities"
"Calculate average deal size by sales rep and quarter"
"Get the number of cases by priority and status"
Data Management
Bulk Operations
"Bulk insert 10,000 accounts from CSV data"
"Update all opportunities in California region"
"Export all contacts to Excel with custom fields"
"Import leads from JSON with duplicate detection"
Data Quality
"Find duplicate accounts by name and email"
"Merge duplicate contacts preserving latest data"
"Backup all opportunity data with relationships"
"Schedule weekly backup of critical customer data"
Development & DevOps
Apex Code Management
"Show me all Apex classes with 'Controller' in the name"
"Get the full code for the AccountService class"
"Create a new Apex utility class for handling date operations"
"Update the LeadConverter class to add a new method"
Testing & Quality
"Run all tests and show coverage for AccountService class"
"Analyze security issues in all Apex classes"
"Check code complexity for triggers"
"Generate test coverage report for custom classes"
Environment Management
"Create developer sandbox for feature testing"
"Deploy change set to staging environment"
"Create scratch org with custom configurations"
"Monitor deployment status and validate changes"
User & Security Management
User Administration
"Create new sales users with Sales User profile"
"Clone Standard User profile to create custom Sales Manager profile"
"Grant System Administrator access to Custom_Field__c on Account"
"View all permissions for user@example.com"
Security & Permissions
"Create API Access permission set for integration users"
"Assign Sales Manager role to regional managers"
"Revoke field access for specific profiles"
"Audit user permissions across all profiles"
Workflow & Automation
Process Management
"List all active flows in the organization"
"Activate lead conversion process"
"Monitor failed automation processes today"
"Check approval process configuration for expenses"
Business Rules
"Configure case escalation rules for priority cases"
"Set up territory assignments for new sales regions"
"Create workflow rule for opportunity notifications"
"Manage price book entries for regional pricing"
Analytics & Monitoring
Performance & Health
"Check API usage and limits for this month"
"Monitor storage consumption across all objects"
"Analyze error trends over the last week"
"View system performance metrics"
User Analytics
"Show feature adoption trends across the organization"
"Analyze user login patterns for security audit"
"Generate compliance report for audit trail"
"Track knowledge article usage statistics"
Communication & Content
Email & Templates
"Send welcome email to new customers using template"
"Create dynamic email template with merge fields"
"Schedule weekly newsletter to all leads"
"Track email delivery rates and engagement"
Content Management
"Upload product documentation and share with sales team"
"Create FAQ knowledge article for support"
"Post quarterly results to company Chatter feed"
"Manage file permissions for sensitive documents"
Integration & External Systems
API Integration
"Test external REST API endpoint with authentication"
"Configure SOAP callout for legacy system integration"
"Publish platform event for real-time data sync"
"Set up Heroku Connect for PostgreSQL synchronization"
Real-time Data
"Create PushTopic for Account changes"
"Subscribe to opportunity updates via Streaming API"
"Monitor platform event volume and performance"
"Configure Change Data Capture for critical objects"
Advanced Operations
Custom Object Management
"Create a Customer Feedback object with rating fields"
"Add a Status picklist field to Custom_Object__c"
"Update sharing settings for the Service Request object"
"Configure field-level security for sensitive data"
Advanced Analytics
"Run advanced sales analytics with forecasting data"
"Generate KPI dashboard data for executive reporting"
"Analyze territory performance with quota attainment"
"Create complex analytical queries for business intelligence"
Comparison with Official Salesforce MCP Server
How This Differs from @salesforce/mcp
| Feature | Official Salesforce MCP | This Server |
|---|---|---|
| Tool Count | ~40-50 tools (selective) | 61+ comprehensive tools |
| Scope | DX-focused workflows | Full Salesforce ecosystem |
| Architecture | CLI-dependent (requires sf CLI) | Direct API (jsforce) - zero CLI |
| Setup | Complex (CLI + OAuth flows) | Simple (env variables) |
| Authentication | Salesforce CLI auth | Username/password + token |
| Transport | stdio only | stdio + HTTP/REST |
| Remote Deployment | ❌ Not supported | ✅ HTTP mode ready |
| Agent Framework Support | ❌ CLI-locked | ✅ REST API compatible |
| Watsonx Orchestrate | ❌ Not possible | ✅ Fully compatible |
| Non-CLI Usage | ❌ Requires CLI | ✅ Programmatic HTTP API |
| Cloud Deployment | ❌ Local only | ✅ Container/cloud ready |
| API Gateway Integration | ❌ Not possible | ✅ RESTful endpoints |
| Distribution | NPM package | Source + local build |
| Support | Official Salesforce | Community/custom |
Why Choose This Server?
✅ More Comprehensive (61+ Tools)
Includes advanced features beyond DX workflows:
- Territory Management
- Forecasting
- Static Code Analysis
- Platform Events & Streaming API
- Scratch Org Management
- Change Sets & Deployments
- Debug Logs & Code Coverage
✅ HTTP/Remote Ready
- Built-in HTTP server for remote deployment
- RESTful endpoints:
/mcp,/tools,/tools/{toolName} - API key authentication
- CORS support
- Deploy to any cloud platform (IBM Cloud, Heroku, AWS, Azure)
✅ Agent Framework Compatible
Works with orchestration platforms that the official server cannot:
- IBM Watsonx Orchestrate ✅
- LangChain ✅
- AutoGPT ✅
- IBM Concert ✅
- Custom agent frameworks via REST API
✅ No CLI Dependency
- Pure jsforce API integration
- No Salesforce CLI installation required
- Simpler setup and troubleshooting
- Faster startup times
✅ Enterprise-Ready
- Container-ready (Dockerfile included)
- Kubernetes/OpenShift compatible
- Load balancer ready
- Multi-instance scalable
- Standard enterprise security patterns
When to Use Official Salesforce MCP
Consider the official @salesforce/mcp if you:
- Already use Salesforce CLI extensively
- Need official Salesforce support and warranty
- Prefer NPM package installation (
npx -y @salesforce/mcp) - Only need DX-focused toolsets
- Use OAuth-based authentication flows
When to Use This Server
This server is ideal if you:
- Need comprehensive Salesforce coverage (61+ tools)
- Want HTTP/REST API access for orchestration platforms
- Need Watsonx Orchestrate or agent framework integration
- Prefer simple setup without CLI dependencies
- Want to deploy remotely to cloud platforms
- Need programmatic API access for custom integrations
- Require features beyond DX workflows (analytics, territories, forecasting)
Development
Building from source
# Clone the repository
git clone https://github.com/kirtijha/salesforce-mcp-server.git
# Navigate to directory
cd salesforce-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
Running as HTTP Server (Remote Mode)
# Set environment variables
export SF_USERNAME="your-username@company.com"
export SF_PASSWORD="your-password"
export SF_SECURITY_TOKEN="your-security-token"
export MCP_API_KEY="your-secure-api-key"
export PORT=3000
# Start HTTP server
npm run start:http
The server will be available at:
- MCP endpoint:
http://localhost:3000/mcp - Tools list:
http://localhost:3000/tools - Direct tool invocation:
http://localhost:3000/tools/{toolName} - Health check:
http://localhost:3000/health
See for detailed HTTP configuration examples.
Contributing
Contributions are welcome! Feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the file for details.
Issues and Support
If you encounter any issues or need support, please file an issue on the GitHub repository.