Salesforce MCP Integration
Salesforce MCP 集成
该项目为 Salesforce 集成提供了一个模型上下文协议 (MCP) 服务器,允许您执行 SOQL 查询并通过标准化界面与 Salesforce 数据交互。
特征
使用环境变量连接到 Salesforce 组织
针对 Salesforce 数据执行 SOQL 查询
检索和处理 Salesforce 记录
使用环境变量进行安全凭证管理
Related MCP server: MCP Salesforce Connector
先决条件
Node.js(v14 或更高版本)
npm(Node 包管理器)
具有 API 访问权限的 Salesforce 组织
Salesforce 凭证(用户名、密码和安全令牌)
安装
克隆此存储库:
git clone <repository-url> cd <repository-directory>安装依赖项:
npm install使用您的 Salesforce 凭据在根目录中创建一个
.env文件:SF_LOGIN_URL=https://your-instance.salesforce.com/ SF_USERNAME=your_username SF_PASSWORD=your_password SF_SECURITY_TOKEN=your_security_token PORT=3000注意:对于沙盒环境,使用
https://test.salesforce.com/作为登录 URL。
用法
启动 MCP 服务器
使用 Node.js 运行服务器:
node server.js服务器将使用.env文件中的凭据连接到 Salesforce 并开始监听 MCP 请求。
执行 SOQL 查询
服务器运行后,您可以通过 MCP 接口执行 SOQL 查询。服务器提供了一个soqlQuery工具,用于接受 SOQL 查询并返回结果。
SOQL 查询示例:
SELECT Id, Name, Status FROM Account LIMIT 5项目结构
server.js- 主 MCP 服务器实现.env- Salesforce 凭证的环境变量package.json- 项目依赖项和脚本
安全注意事项
永远不要将
.env文件提交到版本控制将
.env添加到你的.gitignore文件对所有敏感信息使用环境变量
考虑在生产环境中使用更安全的身份验证方法
故障排除
连接问题
如果遇到连接问题:
在
.env文件中验证您的 Salesforce 凭据检查您的 Salesforce 组织是否可访问
确保您的 IP 地址在 Salesforce 中列入白名单(如果需要)
验证您的 Salesforce 用户具有 API 访问权限
查询错误
如果您的 SOQL 查询失败:
检查 SOQL 语法
验证对象和字段是否存在于您的组织中
确保您的用户有权访问对象和字段
执照
贡献
欢迎贡献代码!欢迎提交 Pull 请求。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A Model Context Protocol server for Wix AI tools
A Model Context Protocol (MCP) server for Selise Blocks Cloud integration
Model Context Protocol server for Studex tools, notifications, and profile integrations
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server implementation for interacting with Salesforce through its REST API.4245MIT
- AlicenseBqualityBmaintenanceA Model Context Protocol server that enables LLMs to interact with Salesforce data through SOQL queries, SOSL searches, and various API operations including record management.14178MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables interaction with Salesforce through REST API using jsforce, allowing users to execute SOQL queries, retrieve object metadata, and perform CRUD operations on Salesforce records.42MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server for Salesforce that enables managing contacts, leads, opportunities, accounts, and cases, along with SOQL queries and direct links.1-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jogcruz/mcp_salesforce'
If you have feedback or need assistance with the MCP directory API, please join our Discord server