Labsco
luvl logo

Salesforce Lite

โ˜… 2

from luvl

A simple and lightweight server for connecting AI assistants to Salesforce data.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredNeeds API keys

mcp-salesforce-lite

Simple and lightweight Salesforce MCP server for connecting AI assistants to Salesforce data. Ideal for prototyping and small projects.

๐Ÿ“ฆ Install from PyPI: pip install mcp-salesforce-lite

๐Ÿ”— PyPI Package: https://pypi.org/project/mcp-salesforce-lite/

๐Ÿ“š GitHub Repository: https://github.com/luvl/mcp-salesforce-lite

Demo

See the MCP Salesforce Lite server in action with Claude Desktop:

Salesforce MCP Demo

The demo shows Claude Desktop using the MCP server to interact with Salesforce data - querying objects, retrieving records, and performing CRUD operations seamlessly.

Overview

This MCP (Model Context Protocol) server provides AI assistants like Claude with secure access to Salesforce data and operations. It implements the MCP standard to enable seamless integration between AI applications and Salesforce CRM.

Features

  • ๐Ÿ” Secure Salesforce authentication via OAuth 2.0
  • ๐Ÿ“Š Access to Salesforce objects (Accounts, Contacts, Opportunities, etc.)
  • ๐Ÿ” SOQL query execution
  • ๐Ÿ“ CRUD operations on Salesforce records
  • ๐Ÿ›ก๏ธ Built-in security and rate limiting
  • ๐Ÿš€ Easy setup and configuration

Available Tools

The server provides the following tools that AI assistants can use:

Query Tools

  • soql_query: Execute SOQL queries (schema must be defined to carefully ask for confirmation of UPDATE and DELETE operations)
  • search_records: Search records across multiple objects with limit and pagination
  • get_record: Retrieve a specific record by ID with limit and pagination

CRUD Operations

  • create_record: Create new records (make sure to describe_object first, and find the reference fields of the objects)
  • update_record: Update existing records
  • delete_record: Delete records

Metadata Tools

  • describe_object_definition: Get object metadata and field information with pagination
  • list_avail_objects: List available Salesforce objects with limit and pagination

Development Claude Desktop Integration

If you're developing or running the server from source, you can use these alternative configurations:

๐Ÿ’ก Tip: Example configuration files are provided in the examples/ directory:

  • examples/claude_config_direct.json - Direct Python execution
  • examples/claude_config_poetry.json - Poetry execution
  • examples/claude_config_uv.json - UV execution (recommended)

Option 1: Direct Python Execution

{
  "mcpServers": {
    "salesforce-lite": {
      "command": "python",
      "args": ["/ABSOLUTE/PATH/TO/mcp-salesforce-lite/src/mcp_salesforce_lite/server.py"],
      "env": {
        "SALESFORCE_ACCESS_TOKEN": "your_access_token",
        "SALESFORCE_INSTANCE_URL": "your_instance_url"
      }
    }
  }
}

Option 2: Poetry Execution

{
  "mcpServers": {
    "salesforce-lite": {
      "command": "poetry",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/mcp-salesforce-lite",
        "run",
        "python",
        "src/mcp_salesforce_lite/server.py"
      ],
      "env": {
        "SALESFORCE_ACCESS_TOKEN": "your_access_token",
        "SALESFORCE_INSTANCE_URL": "your_instance_url"
      }
    }
  }
}
{
  "mcpServers": {
    "salesforce-lite": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/mcp-salesforce-lite",
        "run",
        "python",
        "src/mcp_salesforce_lite/server.py"
      ],
      "env": {
        "SALESFORCE_ACCESS_TOKEN": "your_access_token",
        "SALESFORCE_INSTANCE_URL": "your_instance_url"
      }
    }
  }
}

Project Structure

mcp-salesforce-lite/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ mcp_salesforce_lite/
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ”œโ”€โ”€ server.py          # Main MCP server
โ”‚       โ”œโ”€โ”€ client.py          # Salesforce client wrapper
โ”‚       โ”œโ”€โ”€ config.py          # Configuration management
โ”‚       โ””โ”€โ”€ tools/
โ”‚           โ”œโ”€โ”€ __init__.py
โ”‚           โ”œโ”€โ”€ query.py       # SOQL query tools
โ”‚           โ”œโ”€โ”€ crud.py        # Create, Read, Update, Delete tools
โ”‚           โ””โ”€โ”€ metadata.py    # Object metadata tools
โ”œโ”€โ”€ examples/
โ”‚   โ”œโ”€โ”€ basic_usage.py
โ”‚   โ””โ”€โ”€ claude_config.json
โ”œโ”€โ”€ assets/
โ”‚   โ””โ”€โ”€ sf-demo.gif           # Demo GIF showing usage
โ”œโ”€โ”€ .env.example
โ”œโ”€โ”€ pyproject.toml
โ”œโ”€โ”€ poetry.lock
โ””โ”€โ”€ uv.lock

Release

Prerequisites

  1. Register for PyPI Production: Go to https://pypi.org/account/register/
  2. Enable 2FA: Set up two-factor authentication in your account settings
  3. Create API Token: Go to https://pypi.org/manage/account/token/ and create a token
  4. Update .pypirc: Replace pypi-YOUR_PRODUCTION_TOKEN_FROM_PYPI_ORG_HERE with your actual token

Publishing Process

  1. Test on TestPyPI first:
# Build the package
uv build
# or: poetry build

# Upload to TestPyPI
twine upload --repository testpypi --config-file .pypirc dist/*

# Test install from TestPyPI
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ mcp-salesforce-lite
  1. Publish to Production PyPI:
# Upload to production PyPI
twine upload --repository pypi --config-file .pypirc dist/*

# Test install from production PyPI
pip install mcp-salesforce-lite

Version Management

To publish a new version:

  1. Update the version in pyproject.toml
  2. Rebuild: uv build or poetry build
  3. Upload: twine upload --repository pypi --config-file .pypirc dist/*