Salesforce MCP Server
Provides tools for interacting with Salesforce CRM, including record CRUD operations (create, read, update, delete with permission controls), SOQL/SOSL queries, metadata extraction (Flows, Apex, Validation Rules, etc.), Tooling API access, and sandbox management (create, list).
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Salesforce MCP Servershow me the 5 most recently created leads"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Salesforce MCP Server
Salesforce CRM과 Claude를 연결하는 MCP 서버. 레코드 CRUD, SOQL/SOSL, Tooling API, Flow/Apex 메타데이터 추출, Sandbox 관리까지 지원합니다.
특징
🔐 SF CLI 기반 자동 토큰 갱신 — 한 번 로그인하면 토큰 만료 걱정 없음
🧰 클론/빌드 불필요 —
npx한 줄로 실행🛡️ 안전한 권한 모드 — 삭제 금지 / 읽기 전용
🧪 Prod / Sandbox 분리 접속 — 동일 MCP 서버로 두 org를 별도 등록
빠른 시작 (팀원 온보딩, 5분)
1. 필수 도구 설치
brew install node sf
npm install -g @anthropic-ai/claude-code이미 설치돼 있으면 건너뛰세요. (
node -v,sf --version,claude --version으로 확인)
2. Salesforce 로그인
sf org login web --instance-url https://channel-b.my.salesforce.com브라우저에서 @channel.io 계정으로 로그인. Successfully authorized ... 뜨면 완료.
3. MCP 등록 (한 줄 — 본인 이메일만 교체)
claude mcp add -s user salesforce -e SALESFORCE_SF_CLI_USERNAME=본인이메일@channel.io -e PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin -e SALESFORCE_NO_DELETE=true -- npx -y github:sunny980123/Salesforce-MCP-Server⚠️ 대괄호 금지.
SALESFORCE_SF_CLI_USERNAME=east@channel.io처럼 값만.
4. 확인
claude mcp list
# → salesforce: ... - ✓ ConnectedClaude Code에서 "Salesforce에서 최근 생성된 리드 5개 보여줘" 요청으로 테스트해보세요.
Related MCP server: Salesforce MCP Server
인증 & 환경변수
SF CLI의 refresh token을 재사용합니다. Security Token, Connected App, JWT 키 전부 불필요.
변수 | 필수 | 설명 |
| ✅ | SF CLI에 로그인된 이메일 (예: |
| ✅ |
|
| ➖ |
|
| ➖ |
|
PATH를 빠뜨리면 MCP 서버가sf를 못 찾아 조용히 실패합니다.
권한 모드
팀원 공유 시 아래 2가지 모드 중 하나를 사용하세요. 레코드 삭제 및 메타데이터 배포는 이 서버를 통해 일반 사용자에게 제공되지 않습니다.
모드 | 설정 | 조회 | 생성 | 수정 | 삭제 |
🛡️ 삭제 금지 (권장) |
| ✅ | ✅ | ✅ | ❌ |
🔒 읽기 전용 |
| ✅ | ❌ | ❌ | ❌ |
🛡️ 삭제 금지 모드 (기본 추천)
claude mcp add -s user salesforce \
-e SALESFORCE_SF_CLI_USERNAME=본인이메일@channel.io \
-e PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin \
-e SALESFORCE_NO_DELETE=true \
-- npx -y github:sunny980123/Salesforce-MCP-Server🔒 읽기 전용 모드 (감사/분석용)
claude mcp add -s user salesforce \
-e SALESFORCE_SF_CLI_USERNAME=본인이메일@channel.io \
-e PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin \
-e SALESFORCE_READONLY=true \
-- npx -y github:sunny980123/Salesforce-MCP-Server도구별 권한 매트릭스
도구 | 삭제 금지 | 읽기 전용 |
| ✅ | ✅ |
| ✅ | ✅ |
| ✅ | ✅ |
| ✅ | ✅ |
| ✅ | ✅ |
| ✅ | ✅ |
| ✅ | ✅ |
| ✅ | ✅ |
| ✅ | ✅ |
| ✅ | ❌ |
| ✅ | ❌ |
| ❌ | ❌ |
| ❌ | ❌ |
| ❌ | ❌ |
제공 도구
📦 레코드 CRUD (표준 API)
도구 | 설명 |
| SOQL 쿼리로 레코드 조회 |
| SOSL로 전체 텍스트 검색 |
| ID로 단일 레코드 조회 |
| 새 레코드 생성 |
| 기존 레코드 수정 |
| 레코드 삭제 (제한적 접근) |
| 오브젝트 필드 메타데이터 조회 |
| 사용 가능한 오브젝트 목록 |
| API 사용량 및 한도 확인 |
🔍 Tooling API 조회 — 메타데이터 SOQL
도구 | 설명 |
| Tooling API로 ValidationRule/Flow/Apex 등 메타데이터 조회 |
표준 SOQL로 접근할 수 없는 설정/메타데이터 조회에 사용:
조회 대상 | 예시 쿼리 |
Validation Rule 전체 목록 |
|
Validation Rule 조건식 (1건) |
|
활성 Flow 버전 목록 |
|
Flow 내부 로직 (1건) |
|
Apex 클래스 코드 |
|
Apex 트리거 코드 |
|
주의:
Metadata또는FullName필드를 포함할 경우 반드시WHERE Id = '...'로 1건만 조회해야 합니다.
활용 예시: 특정 필드를 참조하는 모든 로직 찾기
1. ValidationRule 목록 조회 (Metadata 없이 전체)
→ SELECT Id, ValidationName, EntityDefinitionId FROM ValidationRule
2. 각 Rule의 Metadata 조회 (1건씩)
→ SELECT Id, ValidationName, Metadata FROM ValidationRule WHERE Id = '03d...'
3. Flow 활성 버전 → Metadata 순차 조회📤 메타데이터 추출 — Flow / Apex XML 읽기
도구 | 설명 |
| Flow/ApexClass/ValidationRule 등을 XML로 추출 |
지원 타입: Flow, ApexClass, ApexTrigger, ValidationRule, PermissionSet, Layout, CustomObject
내부 동작: 임시 SFDX 프로젝트를 만들고 sf project retrieve start를 실행합니다. sf CLI가 PATH에 있고 SALESFORCE_SF_CLI_USERNAME이 설정돼 있어야 합니다.
객체 정의 읽기 권한만 있으면 동작하며, 모든 권한 모드에서 사용 가능합니다.
# Claude에 요청 예시
"Existing_Flow라는 Flow의 XML을 가져와서 어떤 조건에서 실행되는지 요약해줘"
→ salesforce_retrieve_metadata(metadata_type="Flow", api_name="Existing_Flow")🧪 Sandbox 관리
도구 | 설명 |
| 존재하는 sandbox + 생성 중인 SandboxProcess 목록 |
| 새 sandbox 생성 (Developer / Dev Pro / Partial / Full) |
두 툴 모두 prod MCP에서 호출합니다 (SandboxInfo는 prod org에 저장). create_sandbox는 Salesforce 측 "Manage Sandboxes" 권한이 필요합니다.
Sandbox 생성부터 접속까지의 전체 플로우는 아래 Sandbox 워크플로우 참조.
Sandbox 워크플로우
생성 → 접속
1. (prod MCP에서) sandbox 생성 요청
Claude에 "Salesforce sandbox 'MyDev' DEVELOPER로 생성해줘" 요청
→ salesforce_create_sandbox 호출됨
2. 진행 상태 확인
Claude에 "sandbox 생성 진행 상황 보여줘" 요청
→ salesforce_list_sandboxes에서 CopyProgress %
3. 완료 후 터미널에서 sandbox 로그인
sf org login web -r https://test.salesforce.com
→ 브라우저에서 sandbox username 입력
(본인이메일@channel.io + "." + sandbox_이름_소문자)
예: east@channel.io.mydev
4. Sandbox 전용 MCP 추가 등록 (prod MCP와 공존)
claude mcp add -s user salesforce-sandbox \
-e SALESFORCE_SF_CLI_USERNAME=본인이메일@channel.io.mydev \
-e PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin \
-e SALESFORCE_NO_DELETE=true \
-- npx -y github:sunny980123/Salesforce-MCP-ServerClaude Code에서:
mcp__salesforce__*툴 → prod에 붙음mcp__salesforce-sandbox__*툴 → sandbox에 붙음
Sandbox username 규칙
Prod의 모든 active user는 sandbox 생성 시 자동 복제됩니다. 별도 등록 불필요.
Prod username | Sandbox username (sandbox 이름이 |
|
|
|
|
비밀번호: Developer/Dev Pro는 prod와 동일 (생성 시점 기준). Partial/Full은 Salesforce가 리셋 이메일 발송.
Email 필드는
.invalid접미사로 자동 스크램블됨 (prod 유저한테 테스트 이메일 발송 방지).Inactive user는 복제되지 않습니다.
권한
Sandbox MCP에서도 prod와 동일한 권한 체계 적용. Deploy/delete가 prod에서 막혀 있는 사용자는 sandbox에서도 막힘 — sandbox는 격리된 환경이지 권한 우회 수단이 아닙니다.
트러블슈팅
NamedOrgNotFoundError: No authorization information found for ...
SALESFORCE_SF_CLI_USERNAME 값이 잘못됐거나, 해당 이메일로 sf org login web을 하지 않았습니다.
# 현재 로그인된 org 확인
sf org list
# 재로그인
sf org login web --instance-url https://channel-b.my.salesforce.com
# MCP 재등록 (이메일 정확히 — 대괄호 없이)
claude mcp remove salesforce -s user
claude mcp add -s user salesforce -e SALESFORCE_SF_CLI_USERNAME=본인이메일@channel.io -e PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin -e SALESFORCE_NO_DELETE=true -- npx -y github:sunny980123/Salesforce-MCP-Serverzsh: command not found: claude
Claude Code CLI가 설치되지 않았습니다.
npm install -g @anthropic-ai/claude-codezsh: command not found: -e
명령어를 여러 줄로 복붙하다가 줄바꿈이 깨졌습니다. 한 줄로 복붙하세요.
sf: command not found (MCP 내부 로그)
PATH 환경변수를 빠뜨렸습니다. MCP 프로세스는 shell profile을 상속받지 않으니 명시적으로 /opt/homebrew/bin을 포함해야 합니다.
✓ Connected인데 툴 호출 시 권한 에러
구버전이 npx 캐시에 남아 있을 수 있습니다:
rm -rf ~/.npm/_npx
claude mcp remove salesforce -s user
# 다시 add (위 명령어 그대로)
# 그 뒤 Claude Code 완전 재시작팀원이 기존 project-scoped 설정과 충돌
이전에 다른 방식으로 등록한 적이 있으면 ~/.claude.json에 project-scoped 엔트리가 남아 있을 수 있습니다. GUIDE.md의 정리 스크립트를 참고하세요.
소스에서 직접 빌드 (개발자용)
서버 코드를 수정·기여하려는 경우:
git clone https://github.com/sunny980123/Salesforce-MCP-Server.git
cd Salesforce-MCP-Server
npm install && npm run build로컬 빌드로 MCP 등록:
claude mcp add -s user salesforce \
-e SALESFORCE_SF_CLI_USERNAME=본인이메일@channel.io \
-e PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin \
-e SALESFORCE_NO_DELETE=true \
-- node ~/Salesforce-MCP-Server/dist/index.cjs라이선스
MIT
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 Servers
- Alicense-qualityDmaintenanceIntegrates Claude with Salesforce to enable natural language querying, modification, and management of Salesforce records and metadata. It supports comprehensive operations including object/field management, SOSL searches, and Apex code execution.Last updated1,9771MIT
- AlicenseAqualityDmaintenanceIntegrates Claude with Salesforce for natural language interactions with Salesforce data and metadata, enabling querying, modifying, and managing objects and records.Last updated2042MIT
- AlicenseAqualityDmaintenanceEnables AI tools like Claude Desktop and Cline to interact with Salesforce, providing tools for SOQL queries, Apex execution, metadata management, and more.Last updated174943MIT
- AlicenseBqualityDmaintenanceConnects to Salesforce and enables running SOQL queries, SOSL searches, managing records, and executing various Salesforce APIs via natural language.Last updated10MIT
Related MCP Connectors
Connect your team's living knowledge base — docs, data, issues, CRM — to Claude and ChatGPT.
Run SOQL queries to explore and retrieve Salesforce data. Access accounts, contacts, opportunities…
Connect Claude to Fathom meeting recordings, transcripts, and summaries
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/sunny980123/Salesforce-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server