Salesforce Cloud

io.github.aaronsb由 GitHub 账号 aaronsb 发布v0.8.2更新于 Oct 24, 2026

AI-powered Salesforce CRM: opportunity intelligence, conversation analysis, SOQL, analytics

已验证STDIO仅桌面数据与分析商业与电商

概览

AI 生成的概览

本地运行的 MCP 服务器,将 AI 助手连接到 Salesforce CRM,用于商机搜索、SOQL 查询、互动分析、销售管道洞察和记录增删改查。

可以做什么
搜索与查看 Salesforce 数据:按关键词查找字段、描述对象、列出对象、执行分页 SOQL 查询并读取当前用户信息。处理商机:按名称、客户、阶段或金额搜索,并获取含关联记录的完整详情。分析交易:对话与互动分析、结合竞争情报和最佳实践的商机充实、相似交易匹配以及管道与转化率洞察。通过 TeXFlow 生成 PDF、DOCX 或 Markdown 格式的商业案例文档。对任意 Salesforce 对象创建、更新和删除记录。
适用场景
适合希望用自然语言查询和分析 Salesforce 销售管道、将当前交易与历史成功交易对比,或在不离开助手的情况下起草商业案例的销售与营收团队。也适合需要通过对话临时执行 SOQL 查询和编辑记录的用户。
运行要求
以 npm 包形式在本地运行(需要 Node.js),并在桌面应用的配置文件中设置。需要一个启用 OAuth 的 Salesforce Connected App,提供 SF_CLIENT_ID、SF_CLIENT_SECRET 和 SF_LOGIN_URL;密码流程还需 SF_USERNAME 和 SF_PASSWORD,否则使用客户端凭证流程。需要能访问 Salesforce 组织的网络连接。
安装前请注意
需要 Salesforce OAuth 凭证,可能还需要用户密码,这些会保存在本地配置文件中;建议使用权限最小的专用集成用户。服务器可以创建、更新和删除记录,助手的操作可能更改或删除 CRM 数据。生成商业案例时会把商机数据交给独立的 TeXFlow 服务器。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Salesforce Cloud,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

🌩️ 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

👤 YouCan you look for any open salesforce opportunities where the solution engineer includes Aaron Rochelle?
🤖 AI AssistantLet 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)

👤 YouTell me more about the Acme Corp opportunity
🤖 AI AssistantHere 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

👤 YouWhat similar deals have we won? Show me the patterns
🤖 AI AssistantI 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)

bash
# Run directly with npxnpx @aaronsb/salesforce-cloud-mcp
# Or install globallynpm install -g @aaronsb/salesforce-cloud-mcp

From Source

bash
git clone https://github.com/aaronsb/salesforce-cloud.gitcd salesforce-cloudnpm installnpm run buildnode 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:

json
{  "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 ID
  • SF_CLIENT_SECRET: Your Salesforce OAuth client secret
  • SF_USERNAME: Your Salesforce username
  • SF_PASSWORD: Your Salesforce password
  • SF_LOGIN_URL: Salesforce login URL (optional, defaults to https://login.salesforce.com)

To obtain these credentials:

  1. Go to Setup in your Salesforce org
  2. Navigate to App Manager
  3. Create a new Connected App
  4. Enable OAuth settings
  5. Add necessary OAuth scopes
  6. Save and wait for activation
  7. 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 __c in 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

  1. Object Metadata Analysis:

    • Use the describe_object tool with includeFields: true to 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
  2. 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
  3. 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":

  1. First, examine the object's fields to find the actual field name:
javascript
{  "objectName": "Opportunity",  "includeFields": true}
  1. Look for fields like "Project_Status__c" or similar custom fields that match your intent
  2. Use the discovered field name in your queries:
javascript
{  "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.

typescript
{  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:

javascript
{  "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.

typescript
{  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:

javascript
{  "query": "SELECT Id, Name FROM Account",  "pageSize": 10,  "pageNumber": 1}
describe_object

Get metadata about a Salesforce object with optional field information.

typescript
{  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:

javascript
{  "objectName": "Account",  "includeFields": true}
create_record

Create a new record in Salesforce.

typescript
{  objectName: string;           // Required: API name of the Salesforce object  data: Record<string, any>;    // Required: Record data as key-value pairs}

Example:

javascript
{  "objectName": "Account",  "data": {    "Name": "Test Account",    "Industry": "Technology"  }}
update_record

Update an existing record in Salesforce.

typescript
{  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:

javascript
{  "objectName": "Account",  "recordId": "001XXXXXXXXXXXXXXX",  "data": {    "Name": "Updated Account Name"  }}
delete_record

Delete a record from Salesforce.

typescript
{  objectName: string;    // Required: API name of the Salesforce object  recordId: string;     // Required: ID of the record to delete}

Example:

javascript
{  "objectName": "Account",  "recordId": "001XXXXXXXXXXXXXXX"}
get_user_info

Get information about the current user. No parameters required.

typescript
{}
list_objects

List all available Salesforce objects with pagination support.

typescript
{  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.

typescript
{  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.

typescript
{  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.

typescript
{  opportunityId: string;   // Required: The ID of the Salesforce opportunity}

Example:

javascript
{  "opportunityId": "006XXXXXXXXXX"}
enrich_opportunity

Enrich an opportunity with market intelligence, industry insights, and strategic recommendations based on similar deal patterns and best practices.

typescript
{  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:

javascript
{  "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.

typescript
{  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:

  1. Find similar to a reference opportunity:
javascript
{  "referenceOpportunityId": "006XXXXXXXXXX",  "includeAnalysis": true}
  1. Find by criteria:
javascript
{  "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.

typescript
{  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:

javascript
{  "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.

typescript
{  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:

javascript
{  "opportunityId": "006XXXXXXXXXX",  "clientName": "Acme Corporation",  "outputFormat": "pdf"}

📦 Response Formats

Paginated Response

Operations that return multiple records use this format:

typescript
{  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:

typescript
{  content: [{    type: "text",    text: "Error: [error message]"  }],  isError: true}

💻 Development

To run the server locally for development:

  1. Set up your environment variables in a .env file
  2. Build the project:
bash
npm run build
  1. Start the server:
bash
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.

来源:README.md,提交 7f99f6e

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.8.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分