Skip to main content
Glama
sunny980123

Salesforce MCP Server

by sunny980123

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PATHYesPATH must include /opt/homebrew/bin so that 'sf' command is found. Example: /opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin
SALESFORCE_READONLYNoSet to 'true' to block all writes (read-only). Default is unset (false).
SALESFORCE_NO_DELETENoSet to 'true' to block delete operations (create/update allowed). Default is unset (false).
SALESFORCE_SF_CLI_USERNAMEYesSF CLI에 로그인된 이메일 (예: jay@channel.io)

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
salesforce_queryA

Execute a SOQL (Salesforce Object Query Language) query to retrieve records from Salesforce.

SOQL is similar to SQL. Example queries:

  • SELECT Id, Name, Industry FROM Account WHERE Industry = 'Technology' LIMIT 10

  • SELECT Id, Name, Email FROM Contact WHERE AccountId = '001xx000...'

  • SELECT Id, Name, StageName, Amount FROM Opportunity WHERE CloseDate = THIS_YEAR

Args:

  • soql (string): A valid SOQL query string

  • limit (number): Max records to return from results (default: 20, max: 200)

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: JSON: { totalSize, done, records[], nextRecordsUrl? } Markdown: Formatted table of results

Error: Returns descriptive error if query syntax is invalid or fields don't exist.

salesforce_searchA

Search across multiple Salesforce objects using SOSL (Salesforce Object Search Language).

Use SOSL when you want to search across multiple object types at once or do full-text search.

Example SOSL queries:

  • FIND {Acme} IN ALL FIELDS RETURNING Account(Id, Name), Contact(Id, Name)

  • FIND {john@example.com} IN EMAIL FIELDS RETURNING Contact(Id, Name, Email)

  • FIND {urgent} IN ALL FIELDS RETURNING Case(Id, Subject, Status)

Args:

  • sosl (string): A valid SOSL query string

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: JSON: { searchRecords: [...] } Markdown: Formatted results grouped by object type

salesforce_metadata_queryA

Execute a SOQL query using the Salesforce Tooling API to access metadata objects not available via standard SOQL.

Use for: ValidationRule, Flow/FlowVersionView, ApexClass/ApexTrigger, WorkflowRule, FieldDefinition.

Examples:

  • SELECT Id, ValidationName, Active, EntityDefinitionId FROM ValidationRule

  • SELECT Id, MasterLabel, Status, VersionNumber FROM Flow WHERE Status = 'Active'

  • SELECT Id, MasterLabel, Metadata FROM Flow WHERE Id = '301xx...'

  • SELECT Id, Name, Body FROM ApexClass WHERE Name = 'MyClass'

Note: Queries with Metadata or FullName fields must return exactly 1 row (use WHERE Id = '...')

salesforce_get_recordA

Retrieve a single Salesforce record by its ID.

Args:

  • object_type (string): The Salesforce object type (e.g., 'Account', 'Contact', 'Opportunity')

  • record_id (string): The 15 or 18-character Salesforce record ID

  • fields (string[]): Optional list of specific fields to retrieve. If empty, returns all fields.

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: The full record with all requested fields.

Examples:

  • Get an account: object_type='Account', record_id='001xx000003...'

  • Get specific contact fields: object_type='Contact', record_id='003xx...', fields=['Name','Email','Phone']

salesforce_create_recordA

Create a new record in Salesforce.

Args:

  • object_type (string): The Salesforce object type (e.g., 'Account', 'Contact', 'Lead')

  • fields (object): Key-value pairs of field API names and their values

Returns: { id: string, success: boolean } - The new record ID on success.

Common required fields:

  • Account: Name (required)

  • Contact: LastName (required), AccountId (optional)

  • Lead: LastName + Company (required)

  • Opportunity: Name + StageName + CloseDate (required)

  • Case: Subject (required)

Examples:

  • Create account: object_type='Account', fields={ "Name": "Acme Corp", "Industry": "Technology" }

  • Create lead: object_type='Lead', fields={ "FirstName": "John", "LastName": "Doe", "Company": "Acme", "Email": "john@acme.com" }

salesforce_update_recordA

Update fields on an existing Salesforce record.

Args:

  • object_type (string): The Salesforce object type (e.g., 'Account', 'Contact')

  • record_id (string): The 15 or 18-character Salesforce record ID

  • fields (object): Key-value pairs of field API names and their new values

Returns: Confirmation message on success.

Notes:

  • Only the provided fields are updated; other fields remain unchanged.

  • To clear a field, set its value to null.

Examples:

  • Update account industry: object_type='Account', record_id='001xx...', fields={ "Industry": "Finance" }

  • Update opportunity stage: object_type='Opportunity', record_id='006xx...', fields={ "StageName": "Closed Won", "CloseDate": "2026-03-31" }

salesforce_delete_recordA

Permanently delete a Salesforce record. This action cannot be undone (record goes to Recycle Bin).

Args:

  • object_type (string): The Salesforce object type (e.g., 'Account', 'Lead')

  • record_id (string): The 15 or 18-character Salesforce record ID to delete

Returns: Confirmation message on success.

Warning: This operation moves the record to the Recycle Bin. It can be restored within 15 days.

salesforce_get_limitsA

Check your Salesforce org's current API usage and remaining limits.

Returns: Key limits including:

  • DailyApiRequests: Daily REST API call quota (Max and Remaining)

  • DailyBulkApiRequests: Bulk API limits

  • Other org limits

Use this to monitor API consumption before running large batch operations.

salesforce_describe_objectA

Get metadata for a Salesforce object: field names, types, labels, and whether fields are required/editable.

Use this to discover what fields are available before writing SOQL queries or creating/updating records.

Args:

  • object_type (string): The Salesforce object API name (e.g., 'Account', 'Contact', 'Opportunity__c')

  • include_picklists (boolean): Whether to include picklist values for picklist fields (default: false)

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: Object metadata including:

  • All field API names, labels, and data types

  • Required fields

  • Createable and updateable flags

  • Picklist values (if requested)

salesforce_list_objectsA

List all available Salesforce objects (standard and custom) in the org.

Use this to discover what objects exist before querying or manipulating data.

Args:

  • filter (string): Optional text to filter object names/labels (case-insensitive)

  • queryable_only (boolean): If true, only return objects that support SOQL queries (default: true)

  • limit (number): Maximum number of objects to return (default: 50, max: 500)

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: List of objects with their names, labels, and CRUD capabilities.

salesforce_deploy_metadataA

Deploy a metadata component (Flow, ApexClass, ValidationRule, etc.) to the Salesforce org via the SF CLI.

Use this to create OR update declarative metadata. Salesforce deploy is upsert-style: if 'api_name' already exists in the org, this overwrites it.

Typical workflow for creating a new Flow:

  1. (Optional) salesforce_retrieve_metadata to pull an existing Flow as a template

  2. Author the Flow XML (...)

  3. Call this tool with check_only=true to validate (dry-run)

  4. Re-run with check_only=false to actually deploy

Supported metadata types: Flow, ApexClass, ApexTrigger, ValidationRule, PermissionSet, Layout, CustomObject

Args:

  • metadata_type: One of the supported types above.

  • api_name: Metadata API name, e.g. 'My_New_Flow'. Must match Salesforce naming rules.

  • xml_content: Full *-meta.xml content. For Flows, a complete document.

  • body_content: Required for ApexClass (.cls body) and ApexTrigger (.trigger body).

  • object_name: Required for ValidationRule — parent sObject (e.g. 'Account').

  • check_only: If true, validate without committing (dry-run). Default: false.

Blocked entirely when SALESFORCE_READONLY=true (including dry-runs). Requires SALESFORCE_SF_CLI_USERNAME and the Salesforce user to have metadata deploy permissions (e.g. 'Customize Application' or 'Modify Metadata Through Metadata API Functions').

Returns: Deploy status with per-component successes and failures (with error messages).

salesforce_retrieve_metadataA

Retrieve a metadata component (Flow, ApexClass, ValidationRule, etc.) from the Salesforce org as XML via SF CLI.

Use this to:

  • Inspect an existing Flow's XML as a reference before authoring a new one

  • Fetch a component, modify the XML, then redeploy via salesforce_deploy_metadata

Supported metadata types: Flow, ApexClass, ApexTrigger, ValidationRule, PermissionSet, Layout, CustomObject

Args:

  • metadata_type: The type of metadata to retrieve

  • api_name: Metadata API name

  • object_name: Required for ValidationRule (parent sObject)

Requires SALESFORCE_SF_CLI_USERNAME. This tool is read-only — allowed even under SALESFORCE_READONLY.

Returns: The raw *-meta.xml content (and .cls/.trigger body for Apex).

salesforce_list_sandboxesA

List all sandboxes registered under the production org via Tooling API SandboxInfo.

Shows both existing sandboxes and in-progress creations. For status of an in-progress creation, also check SandboxProcess records (use salesforce_metadata_query).

Args:

  • include_in_progress (bool): include SandboxProcess records for pending creations (default: true)

Returns:

  • SandboxInfo list: Id, SandboxName, LicenseType, Description, Status

  • (optional) SandboxProcess list: recent creation progress

Note: This tool must be run against the PRODUCTION org (sandboxes live under prod).

salesforce_create_sandboxA

Create a new sandbox via Tooling API SandboxInfo. Requires Manage Sandboxes permission.

Creation is asynchronous and can take minutes (Developer) to hours (Full). After creation, a SandboxProcess record tracks progress — use salesforce_list_sandboxes with include_in_progress=true to monitor.

Args:

  • sandbox_name: 1-10 chars, letters/digits, must start with a letter. Case-sensitive.

  • license_type: DEVELOPER (default) | DEVELOPER_PRO | PARTIAL | FULL

  • description (optional): free-form description

Notes:

  • DEVELOPER: config-only, metadata copy, refreshable daily

  • DEVELOPER_PRO: same as DEVELOPER with more storage

  • PARTIAL: sample of prod data (up to 5GB)

  • FULL: complete prod clone (costly, limited quota)

  • Must run against PRODUCTION org. After creation, connect via: sf org login web -r https://test.salesforce.com and register a separate MCP entry targeting the sandbox username.

Caller must be in owner or deployer allowlist.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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