Salesforce Sales Cloud MCP Server
Create a powerful Model Context Protocol (MCP) server for Salesforce Sales Cloud in minutes with our AI Gateway. This guide walks you through setting up seamless CRM integration with enterprise-grade security and instant OAuth authentication.
About Salesforce Sales Cloud API
Salesforce Sales Cloud is the world's #1 CRM platform, empowering sales teams to close deals faster and build stronger customer relationships. The Sales Cloud API provides comprehensive access to:
- Lead Management: Lead capture, scoring, and conversion
- Opportunity Management: Deal tracking and pipeline management
- Account & Contact Management: 360-degree customer view
- Forecasting: Revenue prediction and quota management
- Territory Management: Sales territory assignment and rules
- Quote & Order Management: CPQ integration and pricing
- Sales Analytics: Dashboards, reports, and Einstein insights
- Activity Management: Tasks, events, and email integration
Key Features
- REST API: Modern RESTful interface
- SOAP API: Enterprise integration support
- Bulk API: Large data volume operations
- Streaming API: Real-time event notifications
- Einstein AI: Predictive lead scoring and insights
- Mobile SDK: Native mobile app development
- Lightning Platform: Customization and extensibility
- Multi-Org: Support for complex hierarchies
What You Can Do with Salesforce Sales Cloud MCP Server
The MCP server transforms Sales Cloud's API into a natural language interface, enabling AI agents to:
Lead & Contact Management
-
Lead Operations
- "Create new lead from web form submission"
- "Score leads based on engagement criteria"
- "Assign leads to sales reps by territory"
- "Convert qualified leads to opportunities"
-
Lead Intelligence
- "Find hot leads with high engagement scores"
- "Show leads that haven't been contacted in 7 days"
- "Identify leads from target accounts"
- "Track lead source effectiveness"
-
Contact Management
- "Update contact information from email signature"
- "Link contacts to multiple accounts"
- "Track contact role in opportunities"
- "Manage contact communication preferences"
Account Management
-
Account Operations
- "Create parent-child account hierarchies"
- "Update account revenue and employee count"
- "Assign account teams with specific roles"
- "Track account health scores"
-
Account Intelligence
- "Show accounts with upcoming renewals"
- "Find accounts with no activity in 30 days"
- "Identify upsell opportunities by account"
- "Analyze account growth trends"
-
Relationship Mapping
- "Map key stakeholders and influencers"
- "Track executive sponsor changes"
- "Identify cross-sell opportunities"
- "Monitor competitive threats"
Opportunity Management
-
Pipeline Operations
- "Create opportunity from qualified lead"
- "Update opportunity stage and probability"
- "Add products to opportunity"
- "Track competitor information"
-
Deal Intelligence
- "Show deals closing this quarter"
- "Find stalled opportunities by stage"
- "Identify at-risk deals needing attention"
- "Calculate weighted pipeline value"
-
Sales Process
- "Advance opportunity through sales stages"
- "Update next steps and close dates"
- "Log customer interactions and meetings"
- "Create follow-up tasks automatically"
Forecasting & Analytics
-
Sales Forecasting
- "Generate forecast for current quarter"
- "Compare forecast to quota attainment"
- "Track forecast accuracy over time"
- "Identify deals needed to hit target"
-
Performance Analytics
- "Show sales rep performance metrics"
- "Analyze win/loss rates by product"
- "Track average deal size trends"
- "Monitor sales cycle duration"
-
Pipeline Analytics
- "Analyze pipeline coverage ratios"
- "Track stage conversion rates"
- "Identify bottlenecks in sales process"
- "Forecast revenue by product line"
Activity Management
-
Task & Event Management
- "Create follow-up tasks for opportunities"
- "Schedule meetings with contacts"
- "Log calls and email interactions"
- "Set reminders for important dates"
-
Email Integration
- "Sync emails to related records"
- "Track email opens and clicks"
- "Create tasks from email follow-ups"
- "Log automated email campaigns"
-
Calendar Sync
- "Sync Salesforce events with calendar"
- "Check availability for meetings"
- "Send meeting invitations"
- "Track meeting attendance"
Automation & AI
-
Einstein AI Features
- "Get lead score predictions"
- "Show opportunity insights"
- "Predict likelihood to close"
- "Recommend next best actions"
-
Process Automation
- "Auto-assign leads by criteria"
- "Create approval workflows"
- "Trigger email alerts on changes"
- "Update fields based on rules"
-
Integration Automation
- "Sync data with marketing automation"
- "Update ERP with closed deals"
- "Push data to data warehouse"
- "Integrate with communication tools"
Prerequisites
- Access to Cequence AI Gateway
- Salesforce org with Sales Cloud
- System Administrator or API user access
- Connected App configuration capabilities
Step 1: Create Salesforce Connected App
Before setting up the MCP server, you need to create a Connected App in Salesforce.
1.1 Access Salesforce Setup
- Log in to your Salesforce org
- Navigate to Setup (gear icon Setup)
- In Quick Find, search for "App Manager"
- Click App Manager
1.2 Create New Connected App
-
Click New Connected App
-
Fill in Basic Information:
- Connected App Name: "AI Gateway Sales Cloud MCP"
- API Name: Auto-populated
- Contact Email: Your admin email
-
Enable OAuth Settings:
- Check Enable OAuth Settings
- Callback URL:
https://auth.aigateway.cequence.ai/v1/outbound/oauth/callback
1.3 Configure OAuth Scopes
Select the following OAuth scopes:
- Access and manage your data (api)
- Perform requests on your behalf at any time (refresh_token, offline_access)
- Access your basic information (id, profile, email, address, phone)
- Access custom permissions (custom_permissions)
- Full access (full) - if needed for admin operations
1.4 Save and Get Credentials
- Save the Connected App
- Click Manage View
- Note the Consumer Key (Client ID)
- Click Click to reveal for Consumer Secret
- Copy both values securely
Step 2: Access AI Gateway Apps
- Log in to your Cequence AI Gateway dashboard
- Navigate to Apps in the left sidebar
- You'll see the list of available third-party applications
Step 3: Find and Select Salesforce Sales Cloud API
- In the Apps section, browse through the Third-party category
- Look for Salesforce Sales Cloud or use the search function
- Click on the Salesforce Sales Cloud API card to view details
Step 4: Create MCP Server
- Click the Create MCP Server button on the API card
- You'll be redirected to the MCP Server creation wizard
Step 5: Configure API Endpoints
In the App Configuration step:
-
Base URL: Enter your Salesforce instance URL
- Format:
https://{instance}.salesforce.com
- Example:
https://na139.salesforce.com
- Or use your My Domain:
https://mycompany.my.salesforce.com
- Format:
-
Select API endpoints to expose to your MCP server
-
Click Next to proceed
Step 6: MCP Server Basic Setup
Configure your MCP server details:
-
MCP Server Name: Enter a descriptive name
- Example: "Sales Cloud CRM Hub"
- This name will identify your server in the dashboard
-
Description (Optional): Add details about the server's purpose
- Example: "Sales automation and CRM management"
-
Production Mode: Toggle based on your needs
- ON for production environments
- OFF for development/testing
-
Click Next to continue
Step 7: Configure Authentication
This is where you'll use your Connected App credentials:
-
Authentication Type: Select OAuth 2.0
-
Fill in the OAuth configuration:
-
Authorization URL:
https://login.salesforce.com/services/oauth2/authorize
(Use
test.salesforce.com
for sandboxes) -
Token URL:
https://login.salesforce.com/services/oauth2/token
-
Client ID: Paste Consumer Key from Connected App
-
Client Secret: Paste Consumer Secret from Connected App
-
Redirect URI:
https://auth.aigateway.cequence.ai/v1/outbound/oauth/callback
-
-
Scopes: Select from available scopes
Available Salesforce Sales Cloud OAuth Scopes
Configure the appropriate scopes based on your application needs:
Core Scopes
-
api
- Access and manage Salesforce data
- Required for most operations
- CRUD operations on objects
- Execute SOQL queries
-
refresh_token
- Maintain persistent access
- Required for background operations
- Enables token refresh
- Essential for automation
-
full
- Full access to all data
- Includes all other scopes
- Use carefully in production
- Required for some admin tasks
Additional Scopes
-
custom_permissions
- Access custom permissions
- Required for custom apps
- Control feature access
- Manage user permissions
-
wave_api
- Access Analytics API
- Create and manage dashboards
- Run analytics queries
- Export analytics data
Recommended Scope Combinations
For Standard Sales Operations:
api
refresh_token
For Full CRM Access:
api
refresh_token
custom_permissions
For Analytics & Reporting:
api
refresh_token
wave_api
Step 8: Configure Security
Set up API protection features:
- API Protection: Toggle ON to enable
- Click Next to continue
Step 9: Choose Deployment Method
Select your deployment preference:
Option A: Deploy to Cequence Cloud (Recommended)
- Fully managed deployment
- Automatic scaling and monitoring
Option B: Deploy with Helm Chart
- Self-managed Kubernetes deployment
- Full control over infrastructure
Click Next after selecting.
Step 10: Review and Deploy
Review your configuration and click Create & Deploy.
Using Your Salesforce Sales Cloud MCP Server
With Claude Desktop
-
Open Claude Desktop settings
-
Add your MCP server:
{
"servers": {
"salesforce-sales": {
"url": "your-mcp-server-url",
"auth": {
"type": "oauth2",
"client_id": "your-client-id"
}
}
}
} -
Start using natural language commands:
- "Show me all opportunities closing this month"
- "Create a new lead from John Smith at Acme Corp"
- "Update the opportunity stage to Negotiation"
- "Find accounts that haven't been contacted recently"
- "Generate a pipeline report for Q1"
API Integration Example
// Initialize MCP client
const mcpClient = new MCPClient({
serverUrl: 'your-mcp-server-url',
auth: {
type: 'oauth2',
token: 'user-access-token'
}
});
// Create a lead
const lead = await mcpClient.salesforce.lead.create({
FirstName: 'John',
LastName: 'Smith',
Company: 'Acme Corporation',
Email: 'john.smith@acme.com',
Phone: '555-1234',
LeadSource: 'Web',
Status: 'New'
});
// Convert lead to opportunity
const conversion = await mcpClient.salesforce.lead.convert({
leadId: lead.Id,
convertedStatus: 'Qualified',
createOpportunity: true
});
// Update opportunity
await mcpClient.salesforce.opportunity.update({
Id: conversion.opportunityId,
StageName: 'Proposal',
Amount: 50000,
CloseDate: '2025-03-31',
Probability: 75
});
// Query opportunities
const opportunities = await mcpClient.salesforce.query({
query: `SELECT Id, Name, Amount, StageName, CloseDate
FROM Opportunity
WHERE CloseDate = THIS_QUARTER
AND StageName NOT IN ('Closed Won', 'Closed Lost')
ORDER BY Amount DESC`
});
Common Use Cases
Sales Operations
- Lead routing and assignment
- Opportunity management
- Quote generation
- Territory management
- Commission tracking
Customer Management
- Account hierarchies
- Contact relationships
- Customer 360 view
- Interaction history
- Renewal management
Analytics & Forecasting
- Pipeline analysis
- Revenue forecasting
- Performance metrics
- Win/loss analysis
- Activity tracking
Security Best Practices
-
OAuth Security:
- Use IP restrictions
- Implement session policies
- Regular token rotation
- Monitor login history
-
Data Access:
- Field-level security
- Record sharing rules
- Profile permissions
- Data encryption
-
API Limits:
- Monitor usage
- Implement caching
- Use bulk operations
- Optimize queries
Troubleshooting
Common Issues
-
Session Expired
- Re-authenticate OAuth
- Check session settings
- Verify IP restrictions
- Review security policies
-
Insufficient Privileges
- Check user profile
- Verify object permissions
- Review field access
- Confirm API access
-
API Limits
- Check org limits
- Optimize queries
- Use bulk API
- Implement caching
Getting Help
- Documentation: AI Gateway Docs
- Support: support@cequence.ai
- Community: AI Gateway Forum
- Salesforce Docs: Sales Cloud Documentation