Salesforce Order Concierge
Enables Claude Desktop to interact with Salesforce for order management, including checking order status, creating returns, managing cases, and sending Slack notifications for customer service operations.
README
Salesforce Order Concierge MCP Server
A Model Context Protocol (MCP) server that provides Salesforce order management capabilities for Claude Desktop, including order status checking, return creation, case management, and Slack notifications.
🎯 Overview
This MCP server enables Claude Desktop to interact with Salesforce for:
- Order status checking with shipping details and tracking information
- Return order creation using standard Salesforce ReturnOrder objects
- Case management integration for customer service escalation
- Slack notification system for real-time alerts
- Return label email automation for customer convenience
🛠 Available Tools
check_order_status- Check order status, shipping details, and tracking informationcreate_return- Create return orders using standard Salesforce objectsemail_return_label- Email return shipping labels to customersupdate_case_status- Update case status with priority and assignment changescreate_case_from_return- Create support cases from return orderssend_slack_alert- Send formatted alerts to Slack channels
🚀 Quick Setup
1. Install Dependencies and Build
npm install
npm run build
2. Deploy Salesforce Metadata (Optional)
If you want to use the enhanced features:
# Authenticate to your Salesforce org
sf org login web --alias MyOrg
# Deploy custom fields and flows
sf project deploy start --target-org MyOrg
3. Configure Claude Desktop
Add to your Claude Desktop claude_desktop_config.json:
{
"mcpServers": {
"salesforce-order-concierge": {
"command": "node",
"args": ["dist/index.js"],
"cwd": "/path/to/sf_mcp_oc",
"env": {
"SF_LOGIN_URL": "https://login.salesforce.com",
"SF_USERNAME": "your-salesforce-username@example.com",
"SF_PASSWORD": "your-salesforce-password",
"SF_SECURITY_TOKEN": "your-salesforce-security-token",
"SLACK_WEBHOOK_URL": "your-slack-webhook-url-optional"
}
}
}
}
4. Restart Claude Desktop
After adding the configuration, restart Claude Desktop to load the MCP server.
🔍 Testing with MCP Inspector
The MCP Inspector is a powerful tool for testing and debugging MCP servers. Here's how to use it:
Install MCP Inspector
npx @modelcontextprotocol/inspector
Test Your Server
-
Start the Inspector:
npx @modelcontextprotocol/inspector -
Configure Connection:
- Server Command:
node - Arguments:
["dist/index.js"] - Working Directory:
/path/to/sf_mcp_oc - Environment Variables:
SF_LOGIN_URL=https://login.salesforce.com SF_USERNAME=your-username@example.com SF_PASSWORD=your-password SF_SECURITY_TOKEN=your-token SLACK_WEBHOOK_URL=your-webhook-url
- Server Command:
-
Test Tools:
- Click "Connect" to establish connection
- Browse available tools in the left panel
- Test each tool with sample data
- View requests/responses in real-time
Sample Test Data
Check Order Status:
{
"orderId": "00000100"
}
Create Return:
{
"orderId": "801xx0000000001",
"lineItemId": "802xx0000000001",
"reason": "Defective",
"quantity": 1,
"description": "Product stopped working"
}
Send Slack Alert:
{
"message": "Test alert from MCP Inspector",
"priority": "info"
}
Debugging Tips
- Connection Issues: Check environment variables and Salesforce credentials
- Tool Failures: Review error messages in the inspector's response panel
- Permissions: Ensure your Salesforce user has access to required objects
- Network: Verify Salesforce and Slack connectivity
📋 Prerequisites
Salesforce Requirements
- Salesforce org with Service Cloud or Field Service license
- Order Management enabled
- API access for the configured user
- Standard objects: Order, OrderItem, ReturnOrder, ReturnOrderLineItem, Case
System Requirements
- Node.js 18+ installed
- Salesforce CLI (optional, for metadata deployment)
- Claude Desktop application
🔧 Environment Variables
| Variable | Required | Description |
|---|---|---|
SF_LOGIN_URL |
Yes | Salesforce login URL (https://login.salesforce.com for production, https://test.salesforce.com for sandbox) |
SF_USERNAME |
Yes | Salesforce username |
SF_PASSWORD |
Yes | Salesforce password |
SF_SECURITY_TOKEN |
Yes | Salesforce security token |
SLACK_WEBHOOK_URL |
No | Slack webhook URL for notifications |
🏗 Salesforce Objects Used
Standard Objects
- ReturnOrder - Standard Salesforce object for return management
- ReturnOrderLineItem - Individual return items
- Case - Customer service integration
- Order/OrderItem - Order relationships
Custom Fields (Optional)
- ReturnOrder.LabelEmailSent__c - Tracks if return label was emailed
- ReturnOrder.LabelEmailSentDate__c - Email timestamp
🚨 Troubleshooting
Common Issues
-
"Server disconnected while setting up"
# Check if server builds successfully npm run build # Verify file permissions chmod +x dist/index.js # Test server startup node dist/index.js -
"Invalid login"
- Verify Salesforce credentials
- Check security token (get new one from Setup → My Personal Information)
- Use correct login URL for your org type
-
"Object not found" errors
- Ensure Service Cloud license is active
- Enable Order Management in Setup → Sales → Order Settings
- Verify user has access to ReturnOrder objects
-
Tool execution failures
- Test with MCP Inspector to see detailed error messages
- Check Salesforce debug logs
- Verify required fields are populated
Getting Help
- Use MCP Inspector for detailed debugging
- Check Claude Desktop logs for connection issues
- Review Salesforce debug logs for API errors
- Test Salesforce connectivity with simple SOQL queries
📁 Project Structure
sf_mcp_oc/
├── src/
│ ├── index.ts # Main MCP server
│ ├── salesforce-client.ts # Salesforce API client
│ └── types.ts # TypeScript schemas
├── force-app/main/default/ # Salesforce metadata
│ ├── objects/ReturnOrder/ # Custom fields
│ └── flows/ # Automation flows
├── dist/ # Compiled JavaScript
├── package.json # Node.js dependencies
├── tsconfig.json # TypeScript config
└── CLAUDE.md # Project instructions
🔒 Security
- Never commit credentials to version control
- Use environment variables for all sensitive data
- Rotate Salesforce security tokens regularly
- Use dedicated API users with minimal required permissions
📄 License
MIT License - see LICENSE file for details.
🔗 Resources
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。