MCP Salesforce Server

by aiondadotcom

463 downloads
Not rated
GitHub

About

Provides seamless integration with Salesforce using OAuth authentication.

Details

Author
aiondadotcom
Downloads
463
Categories
Cloud Service, Other, API, Search
Tags
#sales, #crm

- Seamless OAuth authentication with automatic token refresh.
- Zero manual setup – Claude handles OAuth flow transparently.
- Works with any Salesforce org, including custom objects.
- Smart installation learning – analyzes all objects and fields.
- Full CRUD operations on any Salesforce record.
- Comprehensive backup system with file and schema support.
- Point-in-time data recovery via the Time Machine feature.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Salesforce Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install via NPX (npx @aiondadotcom/mcp-salesforce) or clone the repository for development. Configure environment variables (SALESFORCE_CLIENT_ID, SALESFORCE_CLIENT_SECRET, SALESFORCE_INSTANCE_URL) and add the server to your MCP client configuration. Claude automatically handles OAuth authentication on first use.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp salesforce server": {
            "salesforce": {
                "command": "npx",
                "args": [
                    "@aiondadotcom/mcp-salesforce"
                ],
                "env": {
                    "SALESFORCE_CLIENT_ID": "your-client-id",
                    "SALESFORCE_CLIENT_SECRET": "your-client-secret",
                    "SALESFORCE_INSTANCE_URL": "https://yourorg.salesforce.com"
                }
            }
        }
    }
}

McpServers

{
    "salesforce": {
        "command": "npx",
        "args": [
            "@aiondadotcom/mcp-salesforce"
        ],
        "env": {
            "SALESFORCE_CLIENT_ID": "your-client-id",
            "SALESFORCE_CLIENT_SECRET": "your-client-secret",
            "SALESFORCE_INSTANCE_URL": "https://yourorg.salesforce.com"
        }
    }
}

AModel Context Protocol (MCP) serverthat provides seamless integration with Salesforce using OAuth authentication. This server enables AI assistants like Claude to interact with any Salesforce organization through a secure, generic interface.

- 🎯 Seamless Authentication- Claude automatically detects when authentication is needed and handles it transparently
- 🚀 Zero Manual Setup- No need to run terminal commands or manual OAuth flows
- 🔐 OAuth-Only Authentication- Secure browser-based setup with automatic token refresh
- 🌐 Universal Salesforce Integration- Works with any Salesforce org, including custom objects and fields
- 🧠 Smart Installation Learning- Analyzes your complete Salesforce setup to provide intelligent assistance
- 🔍 Dynamic Schema Discovery- Automatically adapts to your Salesforce configuration
- 🔒 Secure Token Storage- File-based storage with strict permissions for production-grade security
- 🏠 Cross-Platform Home Directory Storage- Credentials and cache stored in user's home directory
- 📝 Full CRUD Operations- Query, create, update, and delete any Salesforce records
- 📊 Schema Inspection- Get detailed information about objects and fields
- 💡 Context-Aware Suggestions- Provides intelligent field and object name suggestions
- 💾 Comprehensive Backup System- Complete data and file backup with support for all Salesforce file systems
- ⏰ Time Machine Feature- Point-in-time data recovery and historical analysis
- 📁 Multi-Format File Support- Backs up ContentVersions, Attachments, and Documents with proper metadata

- Node.js 18+
- macOS(required for secure credential storage)
- Salesforce Connected Appwith OAuth configured

🎯Recommended: NPX Usage (No Installation Required)

Use NPX to run the MCP server without any permanent installation:

{ "mcpServers": { "salesforce": { "command": "npx", "args": ["@aiondadotcom/mcp-salesforce"] } } }

- 🔄Always Latest: Automatically uses the latest published version
- 💾No Disk Space: No permanent installation required
- 🛡️No Conflicts: No global package conflicts
- ⚡Easy Updates: Just restart - gets latest version automatically
- 📋Simple Config: Copy-paste ready MCP configuration

# Get version npx -p @aiondadotcom/mcp-salesforce mcp-salesforce --version # Get help npx -p @aiondadotcom/mcp-salesforce mcp-salesforce --help # Run OAuth setup npx -p @aiondadotcom/mcp-salesforce mcp-salesforce setup
git clone https://github.com/AiondaDotCom/mcp-salesforce.git cd mcp-salesforce npm install

Configure credentials: Use thesalesforce_setuptool to configure your credentials when prompted

Add to Claude Desktopusing local path (seeConfigurationbelow)

That's it! Claude will automatically handle setup and authentication when you first use any Salesforce tool.

- Use thesalesforce_setuptool to configure your credentials
- Claude will ask you for your Salesforce Connected App details
- Credentials are stored securely in your home directory
- Seamless OAuth flow directly from Claude Desktop

- Usesalesforce_learnto analyze your complete Salesforce installation
- Claude learns all your custom objects, fields, and relationships
- Provides intelligent suggestions based on your specific setup
- Context-aware assistance for complex Salesforce environments

The package@aiondadotcom/mcp-salesforceis nowlive on NPMand ready for use.

NPX usage is now available for all users:

# Test the published package npx -p @aiondadotcom/mcp-salesforce mcp-salesforce --version npx -p @aiondadotcom/mcp-salesforce mcp-salesforce --help # Run OAuth setup npx -p @aiondadotcom/mcp-salesforce mcp-salesforce setup

- Package Name:@aiondadotcom/mcp-salesforce
- Version:1.0.7(latest)
- Registry: NPM Public Registry
- Organization:@aiondadotcom
- Access: Public

- ✅ Package published to NPM
- ✅ NPX compatibility verified
- ✅ Binary wrapper implemented
- ✅ Setup command functional
- ✅ MCP configuration ready
- ✅Available for immediate use

🎉 All NPX functionality now works for end users worldwide!
-

In Salesforce Setup, create a new Connected App:

- App Name: MCP Salesforce Integration
- API Name: mcp_salesforce_integration
- Contact Email: Your email
- Enable OAuth Settings: ✅ Yes
- Callback URL:http://localhost:9876/callback

Port 9876 was chosen deliberately to avoid conflicts with common development servers (8080, 8000, 3000) and well-known services.

- Manage user data via APIs (api)
- Perform requests at any time (refresh_token, offline_access)

After saving, copy theConsumer KeyandConsumer Secret

Configure your credentials using thesalesforce_setuptool when you first use the application:
- Interactive Setup: Claude will prompt you for your Salesforce credentials
- Client ID: Your Salesforce Connected App Consumer Key
- Client Secret: Your Salesforce Connected App Consumer Secret
- Instance URL: Your Salesforce organization URL (e.g.,https://mycompany.salesforce.com)

The tool will validate your input and store credentials securely in~/.mcp-salesforce.jsonwith restricted permissions (600).

- Credentials:~/.mcp-salesforce.json(contains OAuth tokens and credentials)
- Cache:~/.mcp-salesforce-cache/(contains learned Salesforce schema and context)
- Cross-Platform: Works on Windows, macOS, and Linux

Claude: I need to set up your Salesforce credentials first. Please use the salesforce_setup tool with your credentials. You: Use the salesforce_setup tool with clientId: "3MVG9...", clientSecret: "1234567890...", instanceUrl: "https://mycompany.salesforce.com" Claude: ✅ Salesforce credentials configured successfully! You can now use other Salesforce tools.

Add this to your Claude Desktop MCP configuration (~/Library/Application Support/Claude/claude_desktop_config.json):

{ "mcpServers": { "salesforce": { "command": "npx", "args": ["@aiondadotcom/mcp-salesforce"] } } }

For development or customized installations:

{ "mcpServers": { "salesforce": { "command": "node", "args": ["/path/to/mcp-salesforce/src/index.js"] } } }
{ "servers": { "salesforce": { "command": "npx", "args": ["@aiondadotcom/mcp-salesforce"] } } }

Here's a step-by-step walkthrough of the MCP Salesforce Server in action, showing a real-world use case of verifying and updating company address information:

Claude checking if the Aionda GmbH account in Salesforce has the correct address by comparing it with their current website address

Claude identifying that the Salesforce address is outdated, showing detailed comparison between the current Salesforce data and the actual address from the company website

Claude successfully updating the Salesforce account with the correct current address, showing exactly which fields were changed

The updated account record in Salesforce showing the corrected address information is now accurate and up-to-date

🧠 Learns your complete Salesforce installation- Analyzes all objects, fields and customizations once and stores this information locally for intelligent assistance.

// One-time analysis of the Salesforce installation {} // Force complete re-analysis { "force_refresh": true, "detailed_relationships": true }

- Claude learns your Custom Objects like "TimeTracking__c", "Project__c", etc.
- Recognizes all Custom Fields and their data types
- Provides intelligent suggestions based on your specific configuration
- Run once, then the AI benefits from it permanently

📊 Overview of your learned Salesforce installation- Shows available objects, Custom Fields and customizations.

// Complete overview of the installation {} // Details about a specific object { "object_name": "TimeTracking__c" } // Search for specific fields { "field_search": "email", "show_custom_only": true }

Execute SOQL queries against any Salesforce object.

// Example: Get recent contacts { "query": "SELECT Id, FirstName, LastName, Email FROM Contact WHERE CreatedDate = THIS_MONTH ORDER BY CreatedDate DESC LIMIT 10" }

- Automatically warns when installation has not been learned yet
- Suggests available objects and fields
- Helps with correct API names

Create new records in any Salesforce object.

// Example: Create a new contact { "sobject": "Contact", "data": { "FirstName": "John", "LastName": "Doe", "Email": "john.doe@example.com", "Phone": "555-1234" } }

🧠 Smart Context:Automatically shows required fields for the selected object when the installation has been learned.

// Example: Update a contact's email { "sobject": "Contact", "id": "003XX000008b6cYAQ", "data": { "Email": "new.email@example.com", "Phone": "555-5678" } }

🧠 Smart Context:Considers field permissions and data types from the learned installation.

// Example: Delete a record { "sobject": "Contact", "id": "003XX000008b6cYAQ" }

Get schema information for objects and fields.

// Example: Get Contact object schema { "sobject": "Contact" } // Or get list of all available objects {} // Empty parameters

💾 Comprehensive Backup System for Salesforce- Creates complete backups of all data and files with detailed recovery information.

// Create complete backup {} // Incremental backup since specific date { "backup_type": "incremental", "since_date": "2025-01-01T00:00:00Z" } // Backup with specific options { "options": { "include_files": true, "include_attachments": true, "include_documents": true, "parallel_downloads": 10 } }

- 📊 All Object Data- All queryable objects with up to 20 fields per object
- 📁 Modern Files- ContentVersions with complete metadata
- 📎 Legacy Attachments- Classic attachments with correct file extensions
- 📄 Documents- Folder-based documents from the legacy system
- 🏗️ Schema Information- Complete object structures and relationships
- 📋 Backup Manifest- Detailed statistics and recovery information

salesforce-backup-2025-06-04T16-16-35-660Z/ ├── metadata/ # Schema and object definitions ├── data/ # JSON data of all objects ├── files/ │ ├── content-versions/ # Modern files │ ├── attachments/ # Legacy attachments │ └── documents/ # Legacy documents └── backup-manifest.json # Backup overview

📋 Show Available Backups- Overview of all local backups with statistics and metadata.

// List all available backups {} // Details about a specific backup { "backup_name": "salesforce-backup-2025-06-04T16-16-35-660Z" }

⏰ Time Travel Through Salesforce Data- Analyzes data changes between different backup time points and enables targeted recovery.

// Compare current state with a backup { "backup_timestamp": "2025-06-04T16:16:35.660Z", "object_name": "Account" } // Show all changes since a specific backup { "backup_timestamp": "2025-06-04T16:16:35.660Z", "show_all_changes": true } // Detailed analysis for specific records { "backup_timestamp": "2025-06-04T16:16:35.660Z", "object_name": "Contact", "record_id": "003XX000008b6cYAQ" }

- 📊 Data Comparison- Shows differences between backup and current state
- 🔍 Change History- Which fields were changed when
- 🗑️ Deleted Records- Finds records that were deleted since the backup
- 📈 Growth Analysis- Statistical evaluation of data development
- 🎯 Targeted Recovery- Precise identification of changes

Authenticate with Salesforce. Automatically detects if authentication is needed and handles OAuth flow.

// Example: Standard authentication (detects if needed) {} // Example: Force re-authentication even if tokens appear valid { "force": true }

- Automatic Detection: Claude automatically suggests this tool when authentication is needed
- No Manual Setup: Eliminates the need to runnpm run setupmanually
- Smart Authentication: Only authenticates when necessary, checks existing tokens first
- Seamless Integration: Works transparently in the background

This tool isautomatically suggestedwhen:

- You try to use Salesforce tools without authentication
- Your tokens have expired
- Authentication errors occur
- First-time setup is needed

Every Salesforce installation is unique with:

- Custom Objectslike "TimeTracking__c", "Project__c", "CustomerCare__c"
- Custom Fieldson standard objects
- Specific Workflowsand validation rules
- Individual Data Structures

The AI's normal training model only knows standard Salesforce objects. Without knowledge of your specific installation, the AI cannot provide intelligent assistance.
- One-time Analysis:salesforce_learnanalyzes your complete installation
- Local Documentation: All objects, fields and relationships are stored locally
- Intelligent Support: Claude can then make precise suggestions and answer complex questions

You: "Are there any time tracking entries for July 2025?" Without Learning: ❌ Claude: "I don't know any object called 'TimeTracking'" With Learning: ✅ Claude: "I'm checking the 'TimeTracking__c' object for entries from July 2025..." Automatically executes the correct SOQL query

- During initial setup- Once after installation
- After major changes- When new Custom Objects are added
- When having problems- When Claude doesn't find objects or fields

- All SObjects(Standard and Custom)
- All Fieldswith data types and permissions
- Relationshipsbetween objects
- Picklist Valuesand validation rules
- Required Fieldsfor better validation

💡 Learning runs only once and then makes all further interactions much more intelligent!
- Authentication: Claude automatically detects when authentication is needed
- Start Learning:

You: "Learn my Salesforce installation" Claude: Automatically uses the salesforce_learn tool
You: "Show me an overview of my Salesforce installation" Claude: Uses salesforce_installation_info for a summary
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.