Skip to main content
Glama

Salesforce MCP Server

by savidev1987

SF MCP Server

An MCP (Model Context Protocol) server implementation that integrates Claude/VS Code with Salesforce, enabling natural language interactions with your Salesforce data and metadata. This server allows Claude to query, modify, and manage your Salesforce objects and records using everyday language.

Features

  • Smart Object Search: Find Salesforce objects using partial name matches
  • Detailed Schema Information: Get comprehensive field and relationship details for any object
  • Flexible Data Queries: Query records with relationship support and complex filters
  • Picklist Value Retrieval: Get all values for any picklist field
  • Field Type Filtering: Find fields of specific types across objects
  • Relationship Exploration: Analyze parent-child relationships between objects
  • Enhanced API Metadata: Access complete object metadata through direct API calls
  • Debug Log Management: Configure and retrieve debug logs for Salesforce users
  • Validation Rules Management: Get details about validation rules on objects

Installation

From PyPI

pip install sf-mcp-server

From Source

git clone https://github.com/savidev1987/sf-mcp-server.git cd sf-mcp-server pip install -e .

Prerequisites

You will need Salesforce OAuth2 credentials:

  • For OAuth 2.0 Client Credentials Flow: Client ID, Client Secret, and Instance URL

Environment Variables

Set the following environment variables:

export SALESFORCE_CLIENT_ID="your_client_id" export SALESFORCE_CLIENT_SECRET="your_client_secret" export SALESFORCE_USERNAME="your_username" export SALESFORCE_PASSWORD="your_password"

Usage

Running the Server

sf-mcp-server

Usage with VS Code

Add the following to your VS Code User Settings (JSON) or .vscode/mcp.json:

{ "mcp": { "servers": { "sf": { "command": "sf-mcp-server", "env": { "SALESFORCE_CLIENT_ID": "your_client_id", "SALESFORCE_CLIENT_SECRET": "your_client_secret", "SALESFORCE_USERNAME": "your_username", "SALESFORCE_PASSWORD": "your_password" } } } } }

Usage with Claude Desktop

Add the following to your claude_desktop_config.json:

{ "mcpServers": { "sf": { "command": "sf-mcp-server", "env": { "SALESFORCE_CLIENT_ID": "your_client_id", "SALESFORCE_CLIENT_SECRET": "your_client_secret", "SALESFORCE_USERNAME": "your_username", "SALESFORCE_PASSWORD": "your_password" } } } }

Tools

Tool NameDescriptionParameters
search_objectsSearch for standard and custom objects by partial name matchesquery: The search string for object names
describe_objectGet detailed schema information for a Salesforce objectobjectName: The API name of the object
describe_object_with_apiGet extended object metadata using direct REST API callsobjectName: The API name of the object, raw: (Optional) Return raw JSON
describe_relationship_fieldsExplore parent-child relationships between objectsobjectName: The API name of the object
query_recordsQuery records with support for relationships and filtersobject: Object to query, fields: Fields to return, where: (Optional) WHERE conditions, limit: (Optional) Number of records to return
get_fields_by_typeFind fields of specific data types in an objectobjectName: The API name of the object, fieldType: Data type to filter by
get_picklist_valuesRetrieve all values for a picklist fieldobjectName: The API name of the object, fieldName: The picklist field name
get_validation_rulesGet details about validation rules on an objectobjectName: The API name of the object
manage_debug_logsConfigure and retrieve debug logs for usersaction: Action to perform (enable, disable, retrieve), userId: User ID, logLevel: (Optional) Debug log level

Development

Project Structure

sf_mcp_server/ ├── __init__.py # Package initialization ├── server.py # MCP server implementation ├── sf_connection.py # Salesforce authentication └── tools/ ├── __init__.py # Tools package initialization ├── search_objects.py # Object search functionality ├── describe_object.py # Object schema retrieval ├── query_records.py # SOQL query functionality └── ... # Other tool modules

Building and Publishing

  1. Build the package:
    python -m build
  2. Upload to PyPI:
    python -m twine upload dist/*

Adding New Tools

  1. Create a new Python file in the tools directory
  2. Implement your function with proper docstrings and error handling
  3. Import and register the function in the MCP server

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Issues and Support

If you encounter any issues or need support, please file an issue on the GitHub repository.

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

An MCP server implementation that integrates Claude/VS Code with Salesforce, enabling natural language interactions with your Salesforce data and metadata.

  1. Features
    1. Installation
      1. From PyPI
      2. From Source
    2. Prerequisites
      1. Environment Variables
        1. Usage
          1. Running the Server
          2. Usage with VS Code
          3. Usage with Claude Desktop
        2. Tools
          1. Development
            1. Project Structure
            2. Building and Publishing
            3. Adding New Tools
          2. Contributing
            1. License
              1. Issues and Support

                Related MCP Servers

                • A
                  security
                  A
                  license
                  A
                  quality
                  An MCP server implementation that integrates Claude with Salesforce, enabling natural language interactions with Salesforce data and metadata for querying, modifying, and managing objects and records.
                  Last updated -
                  7
                  1,069
                  82
                  TypeScript
                  MIT License
                • A
                  security
                  A
                  license
                  A
                  quality
                  An MCP server implementation that integrates Claude with Salesforce, enabling natural language interactions with Salesforce data and metadata for querying, modifying, and managing objects and records.
                  Last updated -
                  7
                  649
                  13
                  TypeScript
                  MIT License
                  • Apple
                  • Linux
                • A
                  security
                  A
                  license
                  A
                  quality
                  An MCP server that implements Claude Code-like functionality, allowing the AI to analyze codebases, modify files, execute commands, and manage projects through direct file system interactions.
                  Last updated -
                  15
                  243
                  Python
                  MIT License
                  • Apple
                  • Linux
                • A
                  security
                  A
                  license
                  A
                  quality
                  An MCP server implementation that integrates Claude with Salesforce, enabling natural language interactions with Salesforce data and metadata.
                  Last updated -
                  8
                  649
                  TypeScript
                  MIT License
                  • Apple
                  • Linux

                View all related MCP servers

                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/savidev1987/sf-mcp-server'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server