Salesforce MCP Server

MIT License
18
  • Apple
  • Linux

Integrations

  • Enables querying, modifying, and managing Salesforce objects and records, with capabilities for object/field management, schema information retrieval, data querying with relationship support, record manipulation (insert, update, delete), and cross-object searching using SOSL.

Salesforce MCP 서버

Claude와 Salesforce를 통합하는 MCP(Model Context Protocol) 서버 구현으로, Salesforce 데이터 및 메타데이터와 자연어 상호작용을 지원합니다. 이 서버를 통해 Claude는 일상적인 언어를 사용하여 Salesforce 객체와 레코드를 쿼리, 수정 및 관리할 수 있습니다.

특징

  • 개체 및 필드 관리 : 자연어를 사용하여 사용자 정의 개체 및 필드를 만들고 수정합니다.
  • 스마트 개체 검색 : 부분 이름 일치를 사용하여 Salesforce 개체 찾기
  • 자세한 스키마 정보 : 모든 개체에 대한 포괄적인 필드 및 관계 세부 정보를 얻으세요.
  • 유연한 데이터 쿼리 : 관계 지원 및 복잡한 필터를 사용한 레코드 쿼리
  • 데이터 조작 : 레코드를 쉽게 삽입, 업데이트, 삭제 및 업서트합니다.
  • 객체 간 검색 : SOSL을 사용하여 여러 객체에서 검색
  • 직관적인 오류 처리 : Salesforce 관련 오류 세부 정보를 통한 명확한 피드백

설치

지엑스피1

설정

Salesforce 인증

다음 두 가지 방법 중 하나를 사용하여 Salesforce에 인증할 수 있습니다.

1. 사용자 이름/비밀번호 인증

  1. Salesforce 자격 증명 설정
  2. 보안 토큰 받기(Salesforce 설정에서 재설정)
  3. 구성 섹션에 표시된 대로 환경 변수를 구성합니다.

2. 소비자 키/비밀번호를 사용한 OAuth2 인증

  1. Salesforce에서 연결된 앱 설정
  2. 소비자 키와 소비자 비밀번호를 얻으세요
  3. 구성 섹션에 표시된 대로 환경 변수를 구성합니다.

IDE 통합

커서 IDE 설정

  1. 패키지를 전역으로 설치합니다.
npm install -g @surajadsul02/mcp-server-salesforce
  1. Cursor IDE에서 MCP 서버를 구성합니다 .cursor/mcp.json :
env 명령 사용
{ "mcpServers": { "salesforce": { "command": "env", "args": [ "SALESFORCE_USERNAME=your.actual.email@example.com", "SALESFORCE_PASSWORD=YourActualPassword123", "SALESFORCE_TOKEN=YourActualSecurityToken123", "SALESFORCE_INSTANCE_URL=https://login.salesforce.com", "npx", "-y", "@surajadsul02/mcp-server-salesforce" ] } } }
커서에서 OAuth2 인증을 위해
{ "mcpServers": { "salesforce": { "command": "env", "args": [ "SALESFORCE_USERNAME=your.actual.email@example.com", "SALESFORCE_PASSWORD=YourActualPassword123", "SALESFORCE_TOKEN=YourActualSecurityToken123", "SALESFORCE_INSTANCE_URL=https://login.salesforce.com", "SALESFORCE_CONSUMER_KEY=YourConsumerKey", "SALESFORCE_CONSUMER_SECRET=YourConsumerSecret", "npx", "-y", "@surajadsul02/mcp-server-salesforce" ] } } }

클로드 데스크탑 설정

  1. 패키지를 전역으로 설치합니다(아직 설치되지 않은 경우):
npm install -g @surajadsul02/mcp-server-salesforce
  1. claude_desktop_config.json 에 다음을 추가하세요:
사용자 이름/비밀번호 인증을 위해
{ "mcpServers": { "salesforce": { "command": "npx", "args": ["-y", "@surajadsul02/mcp-server-salesforce"], "env": { "SALESFORCE_USERNAME": "your_username", "SALESFORCE_PASSWORD": "your_password", "SALESFORCE_TOKEN": "your_security_token", "SALESFORCE_INSTANCE_URL": "https://login.salesforce.com" } } } }
OAuth2 인증을 위해
{ "mcpServers": { "salesforce": { "command": "npx", "args": ["-y", "@surajadsul02/mcp-server-salesforce"], "env": { "SALESFORCE_USERNAME": "your_username", "SALESFORCE_PASSWORD": "your_password", "SALESFORCE_CONSUMER_KEY": "your_consumer_key", "SALESFORCE_CONSUMER_SECRET": "your_consumer_secret", "SALESFORCE_INSTANCE_URL": "https://login.salesforce.com" } } } }
  1. 구성 파일 위치:
    • macOS: ~/Library/Application Support/Claude Desktop/claude_desktop_config.json
    • Windows: %APPDATA%\Claude Desktop\claude_desktop_config.json
    • Linux: ~/.config/Claude Desktop/claude_desktop_config.json

필수 환경 변수

사용자 이름/비밀번호 인증의 경우:

  • SALESFORCE_USERNAME : Salesforce 사용자 이름/이메일
  • SALESFORCE_PASSWORD : Salesforce 비밀번호
  • SALESFORCE_TOKEN : Salesforce 보안 토큰
  • SALESFORCE_INSTANCE_URL : Salesforce 인스턴스 URL(선택 사항, 기본값: https://login.salesforce.com )

OAuth2 인증의 경우:

  • SALESFORCE_USERNAME : Salesforce 사용자 이름/이메일
  • SALESFORCE_PASSWORD : Salesforce 비밀번호
  • SALESFORCE_CONSUMER_KEY : 연결된 앱의 소비자 키
  • SALESFORCE_CONSUMER_SECRET : 연결된 앱의 소비자 비밀
  • SALESFORCE_INSTANCE_URL : Salesforce 인스턴스 URL(선택 사항, 기본값: https://login.salesforce.com )

사용 예

객체 검색

"Find all objects related to Accounts" "Show me objects that handle customer service" "What objects are available for order management?"

스키마 정보 가져오기

"What fields are available in the Account object?" "Show me the picklist values for Case Status" "Describe the relationship fields in Opportunity"

레코드 쿼리

"Get all Accounts created this month" "Show me high-priority Cases with their related Contacts" "Find all Opportunities over $100k"

사용자 정의 개체 관리

"Create a Customer Feedback object" "Add a Rating field to the Feedback object" "Update sharing settings for the Service Request object"

객체 간 검색

"Search for 'cloud' in Accounts and Opportunities" "Find mentions of 'network issue' in Cases and Knowledge Articles" "Search for customer name across all relevant objects"

개발

소스에서 빌드

# Clone the repository git clone https://github.com/surajadsul02/mcp-server-salesforce.git # Navigate to directory cd mcp-server-salesforce # Install dependencies npm install # Build the project npm run build

문제 해결

  1. 인증 오류
    • 자격 증명이 올바른지 확인하세요
    • 사용자 이름/암호 인증의 경우: 보안 토큰이 올바른지 확인하세요.
    • OAuth2의 경우: 소비자 키와 비밀번호를 확인하세요.
  2. 연결 문제
    • Salesforce 인스턴스 URL을 확인하세요
    • 네트워크 연결 확인
    • 적절한 API 액세스 권한을 확인하세요
  3. 커서 IDE 통합
    • 구성 변경 후 Cursor IDE를 다시 시작합니다.
    • 오류 메시지는 개발자 도구(도움말 > 개발자 도구 전환)에서 확인하세요.
    • 패키지가 전역적으로 설치되었는지 확인하세요
  4. Claude 데스크톱 통합
    • 구성 파일 위치 확인
    • 파일 권한 확인
    • 구성 변경 후 Claude Desktop을 다시 시작하세요.
    • 환경 변수가 올바르게 설정되었는지 확인하세요.

기여하다

기여를 환영합니다! 풀 리퀘스트를 제출해 주세요.

특허

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.

문제 및 지원

문제가 발생하거나 지원이 필요한 경우 GitHub 저장소에 문제를 제출하세요.

ID: h0ldgpjlzf