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

salesforce-data-dictionary

v1.0.4

Published

MCP server for Salesforce Data Dictionary Generation

Readme

Salesforce Data Dictionary

A Model Context Protocol (MCP) server for describing and managing Salesforce objects. This MCP provides tools for listing, describing, and creating data dictionaries from Salesforce objects, making it easy to explore and document your Salesforce schema.

Features

  • Describe Salesforce Objects: Get detailed field information for any Salesforce object
  • List All Objects: Browse all available Salesforce objects
  • Find Similar Objects: Search for objects with similar names
  • CSV/Excel Export: Export field information; Excel export supports multiple objects (one sheet per object)
  • Data Dictionary Creation: Convert Salesforce objects to data dictionaries
  • Smart Object Detection: Automatically find similar objects if exact match not found

Prerequisites

  • Salesforce CLI: Must be installed and authenticated
  • Node.js: Version 16 or higher
  • npm: For package management

Installing Salesforce CLI

npm install -g @salesforce/cli
sf login org

Installation

You can run this MCP either locally from the repo (build then point Cursor to dist/index.js) or directly via npx without cloning.

Option A: Use npx (recommended)

Add this to ~/.cursor/mcp_servers.json:

{
  "mcpServers": {
    "salesforce-data-dictionary": {
      "command": "npx",
      "args": ["-y", "salesforce-data-dictionary"],
      "env": {}
    }
  }
}
  • npx -y salesforce-data-dictionary will fetch and run the latest published version.
  • No local checkout required.

Option B: Local checkout

  1. Clone and build:
git clone <repository-url>
cd salesforceDataDictionary
npm install
npm run build
  1. Configure Cursor to run the built entrypoint:
{
  "mcpServers": {
    "salesforce-data-dictionary": {
      "command": "node",
      "args": ["/Users/ffarath/Documents/projects/salesforceDataDictionary/dist/index.js"],
      "env": {}
    }
  }
}
  1. Restart Cursor.

Available Tools

1. Describe Salesforce Object

Describe a Salesforce object and return its field information in CSV format.

Parameters:

  • objectName (string): Name of the Salesforce object to describe (e.g., Account, Contact, CustomObject__c)
  • outputFile (string, optional): Filename to save the CSV output (e.g., 'account_fields.csv')

Example:

Describe the Account object and save the results to account_fields.csv

2. List Salesforce Objects

List all available Salesforce objects.

Parameters:

  • searchTerm (string, optional): Search term to filter objects

Example:

List all Salesforce objects that contain "user" in the name

3. Find Similar Objects

Find Salesforce objects with similar names.

Parameters:

  • searchTerm (string): Search term to find similar object names

Example:

Find objects similar to "Account"

4. Create Data Dictionary

Create an Excel data dictionary from one or more Salesforce objects (one tab per object labeled with the object label).

Parameters:

  • objects (string): Comma-separated list of Salesforce objects (e.g., "Account, Contact, Opportunity"). You can also pass one of: ALL, all objects, whole org, * to include every object returned by sf sobject list --sobject all.
  • outputFile (string): Excel filename (e.g., "data_dictionary.xlsx")

Example:

Create a data dictionary for Account, Contact, Opportunity and save to data_dictionary.xlsx

You can also generate a dictionary for the entire org:

Create a data dictionary for ALL and save to full_org_dictionary.xlsx

Example Usage

Describing a Salesforce Object

Describe the Account object and show me all its fields in CSV format

The MCP will:

  1. List all Salesforce objects using sf sobject list --sobject all
  2. Check if "Account" exists
  3. If found, describe it using sf sobject describe --sobject Account
  4. Parse the JSON response and display it as a user-friendly CSV

Creating Excel Data Dictionary

Create a data dictionary from "Account, Contact, Opportunity" and save to sales_schema.xlsx

This will generate an Excel with three sheets named from each object's label.

CSV/Excel Output Format

Columns included:

  • Field Name
  • Type
  • Label
  • Description
  • Required
  • Unique
  • Length
  • Precision
  • Scale
  • Default Value
  • Picklist Values
  • Reference To
  • Relationship Name

Error Handling

  • Object Not Found: If the exact object name isn't found, it suggests similar objects
  • Salesforce CLI Errors: Clear error messages for authentication or connection issues
  • Invalid Object Names: Helpful suggestions for common naming patterns

Salesforce CLI Integration

This MCP relies on the Salesforce CLI for all operations:

  • sf sobject list --sobject all: Lists all available objects
  • sf sobject describe --sobject <ObjectName>: Describes a specific object

Make sure you're authenticated with the correct Salesforce org:

sf login org
sf org list

Supported Salesforce Objects

  • Standard objects (Account, Contact, Lead, Opportunity, etc.)
  • Custom objects (CustomObject__c)
  • System objects
  • External objects

License

MIT License - see LICENSE file for details.

salesforceDataDictionary