Enables AI clients to interact with Salesforce data for opportunity intelligence, conversation analysis, SOQL queries, and automated document generation.
Also known as aaronsb/salesforce-cloud, salesforce-cloud, @aaronsb/salesforce-cloud-mcp
- Stars
- 6
- Tools
- 18
- Downloads, 30 days
- 253
- Latest version
- 0.8.2
- Last commit
- Aug 31, 2026
- License
- MIT
What is Salesforce Cloud MCP?
Salesforce Cloud enables AI clients to interact with Salesforce data for opportunity intelligence, conversation analysis, SOQL queries, and automated document generation. It exposes 18 tools, such as batch, analyze, analyze_conversation.
Summary generated from the project's README
About Salesforce Cloud MCP server
Salesforce Cloud enables sales teams and analysts to interact with their CRM data using natural language through AI clients. By connecting to a Salesforce instance via OAuth credentials, the server allows users to perform complex tasks like searching for specific opportunities, analyzing engagement patterns across calls and emails, and identifying success patterns from previous wins. It acts as a virtual sales intelligence team that can interpret millions of data points to provide strategic recommendations.
Developers and sales professionals use this server to automate routine workflows such as generating professional PDF business cases or executive summaries. The server includes tools for standard CRUD operations, executing SOQL queries with pagination, and describing object metadata. It specifically handles the complexity of custom fields by providing a search tool to map user concepts to specific API names. Setup requires configuring environment variables including a client ID, client secret, username, and password within a local MCP configuration file.
What you can do with it
- 1Identify high-value dealsAsk the AI to find all opportunities in a specific stage that exceed a certain dollar amount.
- 2Analyze deal engagementEvaluate whether a specific account is receiving enough attention from the right stakeholders.
- 3Generate sales documentationRequest the creation of a professional PDF document to present a business case to executives.
- 4Discover custom field namesFind the correct API names for organization-specific fields when you only know the user-friendly label.
Written from the project's README. Every use case is checked against a quote from it.
How to install Salesforce Cloud MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Salesforce Cloud MCP in Claude Code
$ claude mcp add --env 'SF_CLIENT_ID=<YOUR_SF_CLIENT_ID>' --env 'SF_CLIENT_SECRET=<YOUR_SF_CLIENT_SECRET>' --env 'SF_LOGIN_URL=<SF_LOGIN_URL>' --env 'SF_PASSWORD=<YOUR_SF_PASSWORD>' salesforce-cloud -- npx -y @aaronsb/salesforce-cloud-mcpInstall Salesforce Cloud MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"salesforce-cloud": {
"command": "npx",
"args": [
"-y",
"@aaronsb/salesforce-cloud-mcp"
],
"env": {
"SF_CLIENT_ID": "<YOUR_SF_CLIENT_ID>",
"SF_CLIENT_SECRET": "<YOUR_SF_CLIENT_SECRET>",
"SF_LOGIN_URL": "<SF_LOGIN_URL>",
"SF_PASSWORD": "<YOUR_SF_PASSWORD>"
}
}
}
}Install Salesforce Cloud MCP in VS Code
.vscode/mcp.json
{
"servers": {
"salesforce-cloud": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@aaronsb/salesforce-cloud-mcp"
],
"env": {
"SF_CLIENT_ID": "<YOUR_SF_CLIENT_ID>",
"SF_CLIENT_SECRET": "<YOUR_SF_CLIENT_SECRET>",
"SF_LOGIN_URL": "<SF_LOGIN_URL>",
"SF_PASSWORD": "<YOUR_SF_PASSWORD>"
}
}
}
}Install Salesforce Cloud MCP in VS Code CLI
$ code --add-mcp '{"name":"salesforce-cloud","type":"stdio","command":"npx","args":["-y","@aaronsb/salesforce-cloud-mcp"],"env":{"SF_CLIENT_ID":"<YOUR_SF_CLIENT_ID>","SF_CLIENT_SECRET":"<YOUR_SF_CLIENT_SECRET>","SF_LOGIN_URL":"<SF_LOGIN_URL>","SF_PASSWORD":"<YOUR_SF_PASSWORD>"}}'Install Salesforce Cloud MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"salesforce-cloud": {
"command": "npx",
"args": [
"-y",
"@aaronsb/salesforce-cloud-mcp"
],
"env": {
"SF_CLIENT_ID": "<YOUR_SF_CLIENT_ID>",
"SF_CLIENT_SECRET": "<YOUR_SF_CLIENT_SECRET>",
"SF_LOGIN_URL": "<SF_LOGIN_URL>",
"SF_PASSWORD": "<YOUR_SF_PASSWORD>"
}
}
}
}Install Salesforce Cloud MCP in Codex
$ codex mcp add salesforce-cloud --env 'SF_CLIENT_ID=<YOUR_SF_CLIENT_ID>' --env 'SF_CLIENT_SECRET=<YOUR_SF_CLIENT_SECRET>' --env 'SF_LOGIN_URL=<SF_LOGIN_URL>' --env 'SF_PASSWORD=<YOUR_SF_PASSWORD>' -- npx -y @aaronsb/salesforce-cloud-mcpInstall Salesforce Cloud MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.salesforce-cloud] command = "npx" args = ["-y", "@aaronsb/salesforce-cloud-mcp"] [mcp_servers.salesforce-cloud.env] SF_CLIENT_ID = "<YOUR_SF_CLIENT_ID>" SF_CLIENT_SECRET = "<YOUR_SF_CLIENT_SECRET>" SF_LOGIN_URL = "<SF_LOGIN_URL>" SF_PASSWORD = "<YOUR_SF_PASSWORD>"
Install Salesforce Cloud MCP in Gemini CLI
$ gemini mcp add -s user -e 'SF_CLIENT_ID=<YOUR_SF_CLIENT_ID>' -e 'SF_CLIENT_SECRET=<YOUR_SF_CLIENT_SECRET>' -e 'SF_LOGIN_URL=<SF_LOGIN_URL>' -e 'SF_PASSWORD=<YOUR_SF_PASSWORD>' salesforce-cloud npx -- -y @aaronsb/salesforce-cloud-mcpInstall Salesforce Cloud MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"salesforce-cloud": {
"command": "npx",
"args": [
"-y",
"@aaronsb/salesforce-cloud-mcp"
],
"env": {
"SF_CLIENT_ID": "<YOUR_SF_CLIENT_ID>",
"SF_CLIENT_SECRET": "<YOUR_SF_CLIENT_SECRET>",
"SF_LOGIN_URL": "<SF_LOGIN_URL>",
"SF_PASSWORD": "<YOUR_SF_PASSWORD>"
}
}
}
}Started by HostedMCP on 16 Nov 2026
We ran this command for @aaronsb/salesforce-cloud-mcp 0.8.2 in an isolated container with no network and no keys. It answered and listed 18 tools.
Salesforce Cloud MCP tools 18
Read from the server with tools/listbatchExecute multiple operations in a single call with result references. Use $N.field to reference prior results (e.g., $0.id for the ID from operation 0). Destructive operations require confirm: true.
analyzeRun analytics on any Salesforce object — group by categorical fields, aggregate numeric fields, and compute custom expressions. Uses field-type metadata for validation.
analyze_conversationAnalyze conversation activity and engagement patterns for an opportunity. Extracts insights from Gong calls, emails, and other activities to provide engagement recommendations.
generate_business_caseGenerate a markdown business case report for an opportunity. Fetches opportunity details, contacts, conversation insights, and similar won deals to produce a complete report.
enrich_opportunityEnrich an opportunity with market intelligence, industry insights, and strategic recommendations based on similar deal patterns and best practices.
find_similar_opportunitiesFind opportunities similar to a reference opportunity or based on specific criteria. Includes pattern analysis and similarity scoring to identify market trends and success patterns.
opportunity_insightsGenerate detailed insights and analytics from opportunity data including pipeline health, performance metrics, industry trends, and strategic recommendations.
get_opportunity_detailsGet detailed information about a Salesforce opportunity including all available fields (both standard and custom), related records, and metadata
search_opportunitiesSearch for Salesforce opportunities by name, account, and stage. Returns matching opportunities ordered by close date. Results include both standard and custom fields.
search_fieldsFind the field(s) that carry a concept, when you know what you want to query but not the API name. Searches every scored field on the discovered objects — not just the promoted ones — across API names, labels, and help text, ranked by match strength. Searches the core objects by default; pass objectName to scope to one, which discovers it on demand. Set includeValues to get the value set for matched picklists, so you can write the WHERE clause without a second lookup. The match is lexical, not semantic: it finds fields whose name, label or help text contains the term, so a concept this org names differently will not surface, and an object that has not been discovered is not searched. Read `salesforce://field-catalog/{objectName}/all` to browse everything on an object.
execute_soqlExecute a SOQL query. Supports both standard and custom fields (custom fields end with __c in their API names). To see which fields this org actually populates on an object, read the `salesforce://field-catalog/{objectName}` resource — it is ranked, far smaller than a full schema, and works for any object. That catalog is a usage filter rather than a field list: standard fields remain queryable whether or not they appear in it. Use describe_object when you want an object's complete schema.
describe_objectGet an object's full metadata, including every standard and custom field when includeFields is true. Returns the complete schema — exhaustive but unranked, and large on customised objects. To find out which fields this org actually populates, read `salesforce://field-catalog/{objectName}` instead; it is ranked and far smaller.
| batch | Execute multiple operations in a single call with result references. Use $N.field to reference prior results (e.g., $0.id for the ID from operation 0). Destructive operations require confirm: true. | |
| analyze | Run analytics on any Salesforce object — group by categorical fields, aggregate numeric fields, and compute custom expressions. Uses field-type metadata for validation. | |
| analyze_conversation | Analyze conversation activity and engagement patterns for an opportunity. Extracts insights from Gong calls, emails, and other activities to provide engagement recommendations. | |
| generate_business_case | Generate a markdown business case report for an opportunity. Fetches opportunity details, contacts, conversation insights, and similar won deals to produce a complete report. | |
| enrich_opportunity | Enrich an opportunity with market intelligence, industry insights, and strategic recommendations based on similar deal patterns and best practices. | |
| find_similar_opportunities | Find opportunities similar to a reference opportunity or based on specific criteria. Includes pattern analysis and similarity scoring to identify market trends and success patterns. | |
| opportunity_insights | Generate detailed insights and analytics from opportunity data including pipeline health, performance metrics, industry trends, and strategic recommendations. | |
| get_opportunity_details | Get detailed information about a Salesforce opportunity including all available fields (both standard and custom), related records, and metadata | |
| search_opportunities | Search for Salesforce opportunities by name, account, and stage. Returns matching opportunities ordered by close date. Results include both standard and custom fields. | |
| search_fields | Find the field(s) that carry a concept, when you know what you want to query but not the API name. Searches every scored field on the discovered objects — not just the promoted ones — across API names, labels, and help text, ranked by match strength. Searches the core objects by default; pass objectName to scope to one, which discovers it on demand. Set includeValues to get the value set for matched picklists, so you can write the WHERE clause without a second lookup. The match is lexical, not semantic: it finds fields whose name, label or help text contains the term, so a concept this org names differently will not surface, and an object that has not been discovered is not searched. Read `salesforce://field-catalog/{objectName}/all` to browse everything on an object. | |
| execute_soql | Execute a SOQL query. Supports both standard and custom fields (custom fields end with __c in their API names). To see which fields this org actually populates on an object, read the `salesforce://field-catalog/{objectName}` resource — it is ranked, far smaller than a full schema, and works for any object. That catalog is a usage filter rather than a field list: standard fields remain queryable whether or not they appear in it. Use describe_object when you want an object's complete schema. | |
| describe_object | Get an object's full metadata, including every standard and custom field when includeFields is true. Returns the complete schema — exhaustive but unranked, and large on customised objects. To find out which fields this org actually populates, read `salesforce://field-catalog/{objectName}` instead; it is ranked and far smaller. |
Show all 18 toolsShow fewer tools
create_recordCreate a new record in Salesforce. Supports both standard and custom fields in the data object.
update_recordUpdate an existing record in Salesforce. Supports updating both standard and custom fields.
delete_recordDelete a record from Salesforce
get_user_infoGet information about the current user
download_fileDownload a file from Salesforce. Accepts a ContentVersionId (068...) or ContentDocumentId (069...). Saves to a sandboxed workspace directory (default: ~/.local/share/salesforce-cloud-mcp/workspace/, configurable via SF_WORKSPACE_DIR). Text files (CSV, JSON, XML, TXT, etc.) also return content inline. Binary files return the saved path.
list_objectsList all available Salesforce objects, including both standard and custom objects
| create_record | Create a new record in Salesforce. Supports both standard and custom fields in the data object. | |
| update_record | Update an existing record in Salesforce. Supports updating both standard and custom fields. | |
| delete_record | Delete a record from Salesforce | |
| get_user_info | Get information about the current user | |
| download_file | Download a file from Salesforce. Accepts a ContentVersionId (068...) or ContentDocumentId (069...). Saves to a sandboxed workspace directory (default: ~/.local/share/salesforce-cloud-mcp/workspace/, configurable via SF_WORKSPACE_DIR). Text files (CSV, JSON, XML, TXT, etc.) also return content inline. Binary files return the saved path. | |
| list_objects | List all available Salesforce objects, including both standard and custom objects |
Configuration
SF_CLIENT_IDRequiredSecretSalesforce Connected App client ID
SF_CLIENT_SECRETRequiredSecretSalesforce Connected App client secret
SF_LOGIN_URLRequiredYour Salesforce My Domain URL (e.g., https://company.my.salesforce.com)
SF_PASSWORDSecretSalesforce password (required with SF_USERNAME for password flow)
SF_USERNAMESalesforce username (if set, uses password flow; otherwise client credentials flow)
| Name | Description | |
|---|---|---|
| SF_CLIENT_ID | Salesforce Connected App client ID | RequiredSecret |
| SF_CLIENT_SECRET | Salesforce Connected App client secret | RequiredSecret |
| SF_LOGIN_URL | Your Salesforce My Domain URL (e.g., https://company.my.salesforce.com) | Required |
| SF_PASSWORD | Salesforce password (required with SF_USERNAME for password flow) | Secret |
| SF_USERNAME | Salesforce username (if set, uses password flow; otherwise client credentials flow) |
Automated checks
Ran Nov 13, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablePass
- Open source license (OSI)Pass
- Commit or release in the last yearPass
- Package name not close to a popular packagePass
- Remote endpoint uses HTTPSNot checked
- Destructive tools are labelledNot checked
- No hidden instructions to the modelPass
- No critical advisory in the package or its dependenciesPass
README
View on GitHub🌩️ Salesforce MCP Server
This MCP (Model Context Protocol) server provides AI-powered tools for interacting with Salesforce, featuring opportunity intelligence, conversation analysis, business case generation, and standard CRUD operations. Built with pagination support and optimized response structures for AI workflows.
🎯 What This Means for You
Imagine having a sales expert that instantly knows everything about your deals and can give you winning strategies. That's what this AI does with your Salesforce data.
💬 Just Chat Naturally - No Technical Skills Needed
You say: "Show me all Microsoft deals over $100K in the proposal stage"
AI does: Searches your entire Salesforce database and returns matching opportunities
You say: "How's the engagement on the Acme deal? Are we talking to the right people?"
AI does: Analyzes all your calls, emails, and activities to give engagement insights
You say: "Find me deals similar to this opportunity that we won"
AI does: Scans your database for similar successful deals and success patterns
You say: "Create a business case document for this opportunity"
AI does: Generates a professional PDF ready for executives
🚀 Real Conversation Examples
Scenario: "I'm struggling with the Acme Corp deal. It's been stuck in negotiation for 2 months."
AI Response: "Let me analyze the Acme opportunity... I see limited engagement in the past 3 weeks. You've had 2 calls with procurement but haven't connected with the decision maker yet. Similar deals that got unstuck had executive sponsor engagement. I found 3 comparable deals where scheduling an executive briefing moved things forward. Here's a business case document you can use..."
Scenario: "My manager wants to know why our cloud migration deals are taking so long to close."
AI Response: "Analyzing your cloud migration opportunities... The average sales cycle is 40% longer than industry standard. The pattern shows deals stall in the technical evaluation stage. Successful cloud deals had solution architects engaged 2 weeks earlier on average. I recommend involving technical resources sooner..."
✨ What You Get
- 🔍 Smart Search: Find any opportunity with natural language
- 💬 Engagement Analysis: Know who you're talking to and who you're missing
- 🧠 Strategic Insights: Get recommendations based on similar successful deals
- 📊 Pipeline Intelligence: Understand your pipeline health and conversion patterns
- 📋 Professional Documents: Generate business cases and executive summaries
- 📈 Performance Analytics: See what's working and what needs attention
The Magic: You just chat naturally. The AI automatically connects to your Salesforce, analyzes millions of data points, finds patterns, and gives you actionable recommendations. It's like having a sales intelligence team, data analyst, and business consultant all rolled into one AI that knows your Salesforce inside and out.
💬 Live Chat Example
| 👤 You | Can you look for any open salesforce opportunities where the solution engineer includes Aaron Rochelle? |
| 🤖 AI Assistant | Let me help you search for Salesforce opportunities where Aaron Rochelle is involved as a Solution Engineer. I'll run a query in your Salesforce database to find opportunities matching that criteria...📊 Found 3 opportunities:• Cloud Migration - Acme Corp ($250K, Proposal)• Digital Transformation - TechFlow ($180K, Qualification)• Infrastructure Upgrade - GlobalTech ($320K, Negotiation) |
| 👤 You | Tell me more about the Acme Corp opportunity |
| 🤖 AI Assistant | Here are the key details for the Acme Corp Cloud Migration opportunity:💼 Opportunity Details:• Account: Acme Corp• Amount: $250,000• Stage: Proposal• Close Date: 2024-03-15• Decision Maker: Sarah Johnson (IT Director)🔍 Intelligence Insights:• Similar cloud deals average 45 days in proposal stage• 73% win rate when executive sponsor engaged early• Competitor: AWS (primary threat)• Next action: Schedule technical deep-dive |
| 👤 You | What similar deals have we won? Show me the patterns |
| 🤖 AI Assistant | I found 8 similar cloud migration deals you've won in the past 12 months. Here are the key patterns:🎯 Success Patterns:• Average deal size: $275K (vs $250K current)• 67% had solution architect engaged by day 14• 89% included a pilot/POC phase• Executive sponsors attended 78% of demos📋 Recommendation: Schedule Aaron for a technical deep-dive with their DevOps team this week. Based on similar wins, proposing a 2-week pilot will increase close probability by 34%.📄 Would you like me to generate a business case document for this opportunity? |
🤔 What is MCP?
The Model Context Protocol (MCP) is a standardized way for AI models to interact with external tools and resources. MCP servers provide specific capabilities that can be used by AI models through a consistent interface. This Salesforce MCP server allows AI models to interact with Salesforce data and operations in a structured way.
🚀 Installation
npm (recommended)
# Run directly with npx
npx @aaronsb/salesforce-cloud-mcp
# Or install globally
npm install -g @aaronsb/salesforce-cloud-mcp
From Source
git clone https://github.com/aaronsb/salesforce-cloud.git
cd salesforce-cloud
npm install
npm run build
node build/index.js
⚙️ Configuration
The server requires configuration in your Claude desktop app's configuration file. On Linux, this is located at ~/.config/Claude/claude_desktop_config.json. On macOS, it's at ~/Library/Application Support/Claude/claude_desktop_config.json.
Add the following configuration to the mcpServers object in your config file:
{
"mcpServers": {
"salesforce-cloud": {
"command": "node",
"args": ["/path/to/salesforce-cloud/build/index.js"],
"env": {
"SF_CLIENT_ID": "your_client_id",
"SF_CLIENT_SECRET": "your_client_secret",
"SF_USERNAME": "your_salesforce_username",
"SF_PASSWORD": "your_salesforce_password",
"SF_LOGIN_URL": "https://login.salesforce.com"
}
}
}
}
Required Environment Variables
SF_CLIENT_ID: Your Salesforce OAuth client IDSF_CLIENT_SECRET: Your Salesforce OAuth client secretSF_USERNAME: Your Salesforce usernameSF_PASSWORD: Your Salesforce passwordSF_LOGIN_URL: Salesforce login URL (optional, defaults to https://login.salesforce.com)
To obtain these credentials:
- Go to Setup in your Salesforce org
- Navigate to App Manager
- Create a new Connected App
- Enable OAuth settings
- Add necessary OAuth scopes
- Save and wait for activation
- Copy the generated Consumer Key (Client ID) and Consumer Secret (Client Secret)
🎯 Working with Custom Fields
When constructing queries or working with Salesforce data, it's important to understand that many fields referenced may be custom fields specific to your Salesforce instance. Here's what you need to know:
Understanding Custom Fields
- Custom fields in Salesforce end with
__cin their API names - What appears as "Implementation Status" in the UI might be stored as "Implementation_Status__c"
- Custom fields can represent organization-specific business concepts
Best Practices
-
Object Metadata Analysis:
- Use the
describe_objecttool withincludeFields: trueto examine both standard and custom fields - Look for fields that match your intent in both standard and custom field lists
- Map user-friendly field names to their actual API names
- Use the
-
Field Type Consideration:
- Custom fields can be various types (text, picklist, lookup, etc.)
- Understanding field types helps construct appropriate queries
- Custom fields might reference other custom objects through lookup relationships
-
Query Construction:
- Build queries that can handle both standard and custom fields
- Use field metadata to validate field existence before querying
- Consider relationships between objects, especially with custom lookup fields
Example
If searching for "Project Status":
- First, examine the object's fields to find the actual field name:
{
"objectName": "Opportunity",
"includeFields": true
}
- Look for fields like "Project_Status__c" or similar custom fields that match your intent
- Use the discovered field name in your queries:
{
"query": "SELECT Id, Name, Project_Status__c FROM Opportunity"
}
🛠️ Tools
Core Salesforce Operations
search_fields
Find the field(s) that carry a concept when you know what you want to query but not the API name. Searches the discovered field catalog (ADR-302) by keyword across field API names, labels, and help text, ranked by match strength.
{
term: string; // Required: matched against field name, label, help text
objectName?: string; // Optional: scope to one object (default: all core objects)
includeValues?: boolean; // Optional: return active picklist values for matches (default: false)
minPopulationPct?: number;// Optional: drop fields below this population density (0-100)
limit?: number; // Optional: max matches (default: 25, max: 100)
}
Example:
{
"term": "ai",
"objectName": "Opportunity",
"includeValues": true
}
The match is lexical, not semantic: it finds fields whose metadata contains the term, so a concept the schema names differently won't surface — read salesforce://field-catalog/{objectName}/all to browse everything.
execute_soql
Execute a SOQL query with pagination support.
{
query: string; // Required: SOQL query to execute
pageSize?: number; // Optional: Number of records per page (default: 25)
pageNumber?: number; // Optional: Page number to retrieve (default: 1)
}
Example:
{
"query": "SELECT Id, Name FROM Account",
"pageSize": 10,
"pageNumber": 1
}
describe_object
Get metadata about a Salesforce object with optional field information.
{
objectName: string; // Required: API name of the Salesforce object
includeFields?: boolean; // Optional: Whether to include field metadata (default: false)
pageSize?: number; // Optional: Number of fields per page (default: 50)
pageNumber?: number; // Optional: Page number to retrieve (default: 1)
}
Example:
{
"objectName": "Account",
"includeFields": true
}
create_record
Create a new record in Salesforce.
{
objectName: string; // Required: API name of the Salesforce object
data: Record<string, any>; // Required: Record data as key-value pairs
}
Example:
{
"objectName": "Account",
"data": {
"Name": "Test Account",
"Industry": "Technology"
}
}
update_record
Update an existing record in Salesforce.
{
objectName: string; // Required: API name of the Salesforce object
recordId: string; // Required: ID of the record to update
data: Record<string, any>; // Required: Record data to update
}
Example:
{
"objectName": "Account",
"recordId": "001XXXXXXXXXXXXXXX",
"data": {
"Name": "Updated Account Name"
}
}
delete_record
Delete a record from Salesforce.
{
objectName: string; // Required: API name of the Salesforce object
recordId: string; // Required: ID of the record to delete
}
Example:
{
"objectName": "Account",
"recordId": "001XXXXXXXXXXXXXXX"
}
get_user_info
Get information about the current user. No parameters required.
{}
list_objects
List all available Salesforce objects with pagination support.
{
pageSize?: number; // Optional: Number of objects per page (default: 25)
pageNumber?: number; // Optional: Page number to retrieve (default: 1)
}
Opportunity Management
search_opportunities
Search for Salesforce opportunities using flexible criteria and pattern matching.
{
namePattern?: string; // Optional: Pattern to match in Opportunity Name
accountNamePattern?: string; // Optional: Pattern to match in Account Name
stage?: string; // Optional: Exact match for opportunity stage
pageSize?: number; // Optional: Number of records per page (default: 25)
pageNumber?: number; // Optional: Page number to retrieve (default: 1)
}
get_opportunity_details
Get detailed information about a specific opportunity including all available fields and related records.
{
opportunityId: string; // Required: The ID of the Salesforce opportunity
}
🧠 Opportunity Intelligence
analyze_conversation
Analyze conversation activity and engagement patterns for an opportunity. Extracts insights from calls, emails, and other activities to provide engagement recommendations.
{
opportunityId: string; // Required: The ID of the Salesforce opportunity
}
Example:
{
"opportunityId": "006XXXXXXXXXX"
}
enrich_opportunity
Enrich an opportunity with market intelligence, industry insights, and strategic recommendations based on similar deal patterns and best practices.
{
opportunityId: string; // Required: The ID of the Salesforce opportunity
includeCompetitiveIntel?: boolean; // Optional: Include competitive analysis (default: false)
includeBestPractices?: boolean; // Optional: Include best practices (default: true)
}
Example:
{
"opportunityId": "006XXXXXXXXXX",
"includeCompetitiveIntel": true,
"includeBestPractices": true
}
find_similar_opportunities
Find opportunities similar to a reference opportunity or based on specific criteria. Includes pattern analysis and similarity scoring.
{
referenceOpportunityId?: string; // Optional: Reference opportunity for similarity matching
industry?: string; // Optional: Filter by industry
minAmount?: number; // Optional: Minimum opportunity amount
maxAmount?: number; // Optional: Maximum opportunity amount
stage?: string; // Optional: Filter by opportunity stage
isWon?: boolean; // Optional: Filter by won/lost status
closeDateStart?: string; // Optional: Start date (YYYY-MM-DD)
closeDateEnd?: string; // Optional: End date (YYYY-MM-DD)
includeAnalysis?: boolean; // Optional: Include pattern analysis (default: true)
limit?: number; // Optional: Max results (default: 50)
}
Examples:
- Find similar to a reference opportunity:
{
"referenceOpportunityId": "006XXXXXXXXXX",
"includeAnalysis": true
}
- Find by criteria:
{
"industry": "Information Technology & Services",
"minAmount": 100000,
"stage": "Closed Won",
"limit": 20
}
opportunity_insights
Generate detailed insights and analytics from opportunity data including pipeline health, performance metrics, and trends.
{
timeframe?: string; // Optional: 'current_quarter', 'last_quarter', etc.
includeStageAnalysis?: boolean; // Optional: Stage distribution analysis (default: true)
includeOwnerPerformance?: boolean; // Optional: Owner performance metrics (default: true)
includeIndustryTrends?: boolean; // Optional: Industry trends (default: true)
includePipelineHealth?: boolean; // Optional: Pipeline health analysis (default: true)
includeConversionRates?: boolean; // Optional: Conversion rates (default: true)
minAmount?: number; // Optional: Minimum amount filter
maxAmount?: number; // Optional: Maximum amount filter
industry?: string; // Optional: Industry filter
owner?: string; // Optional: Owner filter
}
Example:
{
"timeframe": "current_quarter",
"includeStageAnalysis": true,
"includeOwnerPerformance": true,
"minAmount": 50000
}
generate_business_case
Generate a professional business case document for an opportunity. Returns step-by-step instructions for creating a formatted business case using TeXFlow.
{
opportunityId: string; // Required: The ID of the Salesforce opportunity
clientName?: string; // Optional: Client name for the document title
outputFormat?: string; // Optional: 'pdf', 'docx', or 'markdown' (default: 'pdf')
}
Example:
{
"opportunityId": "006XXXXXXXXXX",
"clientName": "Acme Corporation",
"outputFormat": "pdf"
}
📦 Response Formats
Paginated Response
Operations that return multiple records use this format:
{
records: T[]; // Array of records for the current page
totalSize: number; // Total number of records
pageInfo: {
currentPage: number; // Current page number
totalPages: number; // Total number of pages
hasNextPage: boolean; // Whether there are more pages after this one
hasPreviousPage: boolean; // Whether there are pages before this one
}
}
Error Handling
All tools return errors in a consistent format:
{
content: [{
type: "text",
text: "Error: [error message]"
}],
isError: true
}
💻 Development
To run the server locally for development:
- Set up your environment variables in a
.envfile - Build the project:
npm run build
- Start the server:
node build/index.js
✨ Key Features
- 🧠 AI-Powered Intelligence: Advanced opportunity analysis, conversation insights, and market intelligence
- 📊 Pattern Recognition: Identify similar opportunities and success patterns in your pipeline
- 📋 Business Case Generation: Automated creation of professional business case documents using TeXFlow
- 🔍 Smart Search: Flexible opportunity search with pattern matching and filtering
- 📈 Pipeline Analytics: Detailed insights on pipeline health, conversion rates, and performance metrics
- 🔧 Standard Operations: Full CRUD operations with custom field support
- 📄 Document Integration: Seamless integration with TeXFlow MCP server for document generation
- ⚡ Optimized for AI: Response structures designed for AI model consumption
🌟 Future Possibilities
The Salesforce API offers numerous expansion opportunities:
- Support for more Salesforce objects (Leads, Cases, Contacts, etc.)
- Integration with Salesforce Flow and Process Builder
- Enhanced competitive intelligence features
- Bulk API operations for large datasets
- Chatter API integration and social selling insights
- Custom report and dashboard access
- Advanced forecasting and predictive analytics
We'd love to hear your ideas about what would be most valuable to add next!
🤝 Contributing
We welcome contributions from the community! Whether it's adding new features, improving documentation, or reporting bugs, your input helps make this project better for everyone. Feel free to submit a Pull Request or open an Issue to start a discussion.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Salesforce Cloud MCP questions
How do I add Salesforce Cloud MCP to Claude Code?
Run claude mcp add --env 'SF_CLIENT_ID=<YOUR_SF_CLIENT_ID>' --env 'SF_CLIENT_SECRET=<YOUR_SF_CLIENT_SECRET>' --env 'SF_LOGIN_URL=<SF_LOGIN_URL>' --env 'SF_PASSWORD=<YOUR_SF_PASSWORD>' salesforce-cloud -- npx -y @aaronsb/salesforce-cloud-mcp in your terminal. Add --scope user to make it available in every project.
How do I add Salesforce Cloud MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does Salesforce Cloud MCP provide?
It exposes 18 tools, including batch, analyze, analyze_conversation, generate_business_case, enrich_opportunity.
How do I install the Salesforce MCP server?
You can install it via npm using 'npm install -g @aaronsb/salesforce-cloud-mcp' or run it directly with 'npx @aaronsb/salesforce-cloud-mcp'.
What environment variables are required for configuration?
The server requires SF_CLIENT_ID, SF_CLIENT_SECRET, SF_USERNAME, and SF_PASSWORD. An optional SF_LOGIN_URL can also be provided.
Can the server handle custom fields in Salesforce?
Yes, the server supports custom fields which typically end with '__c' in their API names, and you can use the describe_object tool to find them.