Skip to main content
Glama
rowellsuper

mcp-tools-salesforce

by rowellsuper

mcp-tools-salesforce

Custom MCP Server that Connects to Salesforce Scratch Orgs — and Lets AI Generate Test Data

📝 Read the full write-up on Medium

A custom MCP server built with FastMCP that connects to a Salesforce scratch org via JWT Bearer Flow. It uses MCP Sampling to let an LLM autonomously look up the data model, generate realistic nested test records, and insert them via the Composite Tree REST API. You describe the scenario in plain English. The server does the rest.

notes

Tools

Tool

Description

query_salesforce(soql_query)

Runs a SOQL query against the connected scratch org and returns matching records

describe_sobject(sobject_name)

Returns createable fields for an sObject (name, type, nillable)

get_basic_datamodel()

Returns a lightweight field map for Account, Contact, Case, User

generate_nested_record(request)

Uses LLM sampling to draft a Composite Tree compatible nested record from a natural-language request

insert_record(root_sobject, record)

Posts the payload to composite/tree/{root_sobject}

  

Note: generate_nested_record uses MCP Sampling with tools + structured output. Authentication via JWT Bearer Flow.

Related MCP server: Salesforce CLI MCP Server

Resources

  

 
Interesting discussion by awesome Pamela Fox:

"Can VS Code skills be a replacement for MCP servers?":

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables AI tools like Claude Desktop and Cline to interact with Salesforce, providing tools for SOQL queries, Apex execution, metadata management, and more.
    17
    28 npm
    43
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with Salesforce orgs through natural language commands, supporting org management, SOQL queries, metadata operations, testing, and more.
    1
    -
  • A
    license
    B
    quality
    C
    maintenance
    Connects to Salesforce and enables running SOQL queries, SOSL searches, managing records, and executing various Salesforce APIs via natural language.
    10
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Salesforce sandbox seeding, built for AI agents. SOQL-driven org-to-org record copy with automatic dependency-graph walking, cross-org FK remapping, and a hard AI-never-sees-your-data boundary.
    15 npm
    Apache 2.0