Skip to main content
Glama
alerundev

Salesforce MCP Server

by alerundev

Salesforce MCP Server

Salesforce MCP (Model Context Protocol) server based on Node.js / Express / TypeScript

You can query Salesforce data using natural language.


How to Run

Local Execution

# 환경변수 설정
cp .env.example .env
# .env 파일에 Salesforce 인증 정보 입력 후

npm install
npm run build
npm start

# 인증 토큰과 함께 실행
TOKEN=your_token npm start

Generate Sample Data

npm run seed

Automatically generates 7 accounts, contacts, opportunities, leads, and activity data.


Deployment (CloudType)

  1. Create New Service → Connect GitHub → Select alerundev/salesforce-mcp-server

  2. Settings

    • Node v22

    • Build command: npm run build

    • Start command: npm start

  3. Environment Variables

Key

Value

SF_LOGIN_URL

https://login.salesforce.com

SF_USERNAME

Salesforce login email

SF_PASSWORD

Salesforce password

SF_SECURITY_TOKEN

Salesforce security token

SF_CONSUMER_KEY

Connected App consumer key

SF_CONSUMER_SECRET

Connected App consumer secret

TOKEN

(Optional) When using Bearer token authentication

  1. MCP Connection URL

    https://<배포된 도메인>/mcp

Authentication

Uses Bearer token authentication (enabled when environment variable TOKEN is set):

Authorization: Bearer your-token

Supported Tools

Tool

Description

get_accounts

Retrieve list of accounts

search_accounts

Search accounts by keyword

get_opportunities

Retrieve list of opportunities

get_opportunities_by_stage

Retrieve opportunities by stage (e.g., Closed Won, Prospecting)

get_opportunities_summary

Aggregate opportunities by stage (count + amount)

get_contacts

Retrieve list of contacts

search_contacts

Search contacts by name

get_leads

Retrieve list of leads

get_leads_by_status

Retrieve leads by status

get_recent_activities

Retrieve recent activities (Tasks)

run_soql

Execute custom SOQL queries


Natural Language Query Examples

  • "Show me the list of deals closing this month"

  • "What is the total value of opportunities in Closed Won status?"

  • "Find the contact for Samsung Electronics"

  • "Summarize opportunities by stage"

  • "Show me Hot status leads"

Related MCP Connectors