npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@plugix/mcp-salesforce

v0.1.0

Published

MCP Server for Salesforce CRM - Leads, Contacts, Opportunities, Cases

Readme

Salesforce CRM MCP Server

MCP server for Salesforce CRM integration. Manage leads, contacts, opportunities, accounts, and cases through AI-powered workflows.

Features

  • get_leads - Query leads with filters (status, source, search)
  • get_contacts - Query contacts with filters (account, search)
  • get_opportunities - Query opportunities with filters (stage, amount, status)
  • get_accounts - Query accounts with filters (type, industry, search)
  • get_cases - Query support cases with filters (status, priority, account)
  • create_lead - Create new leads (with confirmation)
  • update_opportunity - Update opportunity details (with confirmation)
  • search_records - Search across multiple Salesforce objects

Installation

npm install @plugix/mcp-salesforce

Or clone and build locally:

git clone https://github.com/plugix/ai-integration.git
cd ai-integration/mcp-servers/salesforce
npm install
npm run build

Configuration

Create a .env file or set environment variables:

# Plugix AI Platform (required)
API_URL=wss://api.plugix.ai
API_TOKEN=plx_live_your_token_here

# Salesforce credentials (required)
SALESFORCE_USERNAME=your_salesforce_username
SALESFORCE_PASSWORD=your_salesforce_password
SALESFORCE_SECURITY_TOKEN=your_security_token

# Salesforce login URL (optional)
# Use https://test.salesforce.com for sandbox environments
SALESFORCE_LOGIN_URL=https://login.salesforce.com

# Optional instance identification
INSTANCE_ID=salesforce-prod
INSTANCE_NAME=Production Salesforce

Getting Salesforce Credentials

  1. Username: Your Salesforce login email
  2. Password: Your Salesforce password
  3. Security Token:
    • Go to Salesforce Setup > Personal Settings > Reset My Security Token
    • The token will be emailed to you
    • If your IP is whitelisted, the token may not be required

Usage

Development

npm run dev

Production

npm run build
npm start

NPX (without installation)

API_TOKEN=plx_live_xxx \
[email protected] \
SALESFORCE_PASSWORD=password \
SALESFORCE_SECURITY_TOKEN=token \
npx @plugix/mcp-salesforce

Docker

docker build -t mcp-salesforce .
docker run --env-file .env mcp-salesforce

Tools Reference

get_leads

Query leads from Salesforce CRM.

Parameters: | Name | Type | Description | |------|------|-------------| | status | string | Filter by lead status (e.g., Open, Contacted, Qualified) | | source | string | Filter by lead source (e.g., Web, Phone, Partner) | | search | string | Search in name, company, or email | | limit | number | Max results (default: 20, max: 100) |

Example:

{
  "name": "get_leads",
  "arguments": {
    "status": "Open - Not Contacted",
    "limit": 10
  }
}

get_contacts

Query contacts from Salesforce CRM.

Parameters: | Name | Type | Description | |------|------|-------------| | account_id | string | Filter by Account ID | | search | string | Search in name or email | | limit | number | Max results (default: 20, max: 100) |

get_opportunities

Query sales opportunities.

Parameters: | Name | Type | Description | |------|------|-------------| | account_id | string | Filter by Account ID | | stage_name | string | Filter by stage (e.g., Prospecting, Closed Won) | | is_closed | boolean | Filter by closed status | | is_won | boolean | Filter by won status | | min_amount | number | Minimum opportunity amount | | max_amount | number | Maximum opportunity amount | | limit | number | Max results (default: 20, max: 100) |

Example:

{
  "name": "get_opportunities",
  "arguments": {
    "stage_name": "Negotiation",
    "min_amount": 10000
  }
}

get_accounts

Query accounts (companies/organizations).

Parameters: | Name | Type | Description | |------|------|-------------| | type | string | Filter by account type (e.g., Customer, Partner) | | industry | string | Filter by industry | | search | string | Search in account name | | limit | number | Max results (default: 20, max: 100) |

get_cases

Query support cases.

Parameters: | Name | Type | Description | |------|------|-------------| | account_id | string | Filter by Account ID | | contact_id | string | Filter by Contact ID | | status | string | Filter by status (e.g., New, Working, Closed) | | priority | string | Filter by priority (High, Medium, Low) | | is_closed | boolean | Filter by closed status | | limit | number | Max results (default: 20, max: 100) |

create_lead

Create a new lead. Requires confirmation.

Parameters: | Name | Type | Required | Description | |------|------|----------|-------------| | last_name | string | Yes | Lead's last name | | company | string | Yes | Company name | | confirmed | boolean | Yes | Must be true to create | | first_name | string | No | Lead's first name | | email | string | No | Email address | | phone | string | No | Phone number | | title | string | No | Job title | | status | string | No | Lead status (default: Open - Not Contacted) | | lead_source | string | No | Lead source | | industry | string | No | Industry | | description | string | No | Additional notes |

Example:

{
  "name": "create_lead",
  "arguments": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "Acme Inc",
    "email": "[email protected]",
    "lead_source": "Web",
    "confirmed": true
  }
}

update_opportunity

Update an existing opportunity. Requires confirmation.

Parameters: | Name | Type | Required | Description | |------|------|----------|-------------| | id | string | Yes | Salesforce Opportunity ID | | confirmed | boolean | Yes | Must be true to update | | name | string | No | Opportunity name | | stage_name | string | No | Opportunity stage | | amount | number | No | Deal amount | | close_date | string | No | Expected close date (YYYY-MM-DD) | | probability | number | No | Win probability (0-100) | | next_step | string | No | Next action item | | description | string | No | Additional notes |

Example:

{
  "name": "update_opportunity",
  "arguments": {
    "id": "006XXXXXXXXXXXXXXX",
    "stage_name": "Closed Won",
    "amount": 50000,
    "confirmed": true
  }
}

search_records

Search across multiple Salesforce objects using SOSL.

Parameters: | Name | Type | Required | Description | |------|------|----------|-------------| | query | string | Yes | Search term | | objects | array | No | Objects to search (default: Lead, Contact, Account, Opportunity, Case) | | limit | number | No | Max results per object (default: 20) |

Example:

{
  "name": "search_records",
  "arguments": {
    "query": "Acme",
    "objects": ["Account", "Contact", "Opportunity"]
  }
}

Security

This MCP server follows the Plugix security model:

  • Credentials stay local: Salesforce username, password, and security token never leave your server
  • Data passes through: Product/contact data passes through Plugix API for AI processing but is not stored
  • Confirmation required: All write operations (create_lead, update_opportunity) require explicit confirmation

Salesforce API Requirements

Your Salesforce org needs:

  1. API Access enabled for your user profile
  2. Appropriate permissions on Lead, Contact, Account, Opportunity, and Case objects
  3. Security Token (unless your IP is whitelisted)

Recommended Permissions

  • Read/Write on Lead
  • Read/Write on Contact
  • Read/Write on Account
  • Read/Write on Opportunity
  • Read on Case

Testing

npm test

Troubleshooting

"INVALID_LOGIN" error

  • Verify username and password are correct
  • Make sure security token is appended to password (or provided separately)
  • Check if your IP needs to be whitelisted in Salesforce

"INSUFFICIENT_ACCESS" error

  • Verify your Salesforce user has API access enabled
  • Check object-level permissions for the objects you're querying

"REQUEST_LIMIT_EXCEEDED" error

  • You've hit Salesforce API limits
  • Consider implementing caching or reducing query frequency

Connection refused to Plugix API

  • Check API_URL is correct
  • Verify API_TOKEN is valid
  • Ensure firewall allows outbound WebSocket connections

License

MIT