Salesforce Metadata Manager MCP server

Integrates with Salesforce to enable direct metadata management and record operations including object creation, field configuration, SOQL queries, and data manipulation for streamlined administrative tasks and application development.
Back to servers
Setup instructions
Provider
Salesforce
Release date
Dec 17, 2024
Language
TypeScript
Stats
28 stars

The Salesforce Model Context Protocol (MCP) server allows you to interact with your Salesforce data and metadata using natural language. This tool enables business users, developers, and administrators to chat with their Salesforce org to get insights, manage data, configure the platform, create objects, fields, and flows, and automate various tasks.

Installation Options

Cloud Version

  1. Visit salesforce-mcp.com
  2. Click "Connect to Salesforce" and authenticate with your org
  3. Start chatting with your Salesforce data right away

Local Installation

To install the server locally:

git clone https://github.com/salesforce-mcp/salesforce-mcp.git
cd salesforce-mcp
uv venv
uv pip install -e .

Then configure it in your claude_desktop_config.json file by adding to the mcpServers section:

{
    "mcpServers": {
        "salesforce": {
            "command": "uv",
            "args": [
                "--directory",
                "[REPO_CLONE_PATH]/salesforce-mcp/src",
                "run",
                "server.py"
            ],
            "env": {
                "USERNAME": "YOUR_SALESFORCE_USERNAME",
                "PASSWORD": "YOUR_SALESFORCE_PASSWORD",
                "SECURITY_TOKEN": "YOUR_SALESFORCE_SECURITY_TOKEN"
            }
        }
    }
}

Replace [REPO_CLONE_PATH] with your local directory path where you cloned the repository, and update the credentials with your own Salesforce login information.

Using the MCP Server

Working with Your Data

Ask Questions About Your Data

Get insights by asking natural language questions like:

  • "Show me all accounts created in the last 30 days with their names and annual revenue"

The AI will automatically translate your request into the appropriate Salesforce query.

Search Across Your Org

Find information across all your Salesforce records with queries such as:

  • "Find all records containing 'Acme' in any field"

Understand Your Data Structure

Explore available fields and objects by asking:

  • "What fields are available on the Account object?"

Manage Your Records

Create, update, and delete records using natural language:

  • "Create a new Account named 'Acme Corp' with industry 'Technology'"
  • "Update the phone number of Account 001xx000003DIloAAG to '555-0123'"
  • "Delete the Account with ID 001xx000003DIloAAG"

Working with Metadata

Create Objects and Fields

Manage your Salesforce Object Manager:

  • "Create a new custom object named 'Contract' with 3 fields: Name, Id and type"

Delete Objects and Fields

Remove custom elements:

  • "Delete the field type from the Contract object"

Create Custom Tabs and Apps

Set up new interface elements:

  • "Create a new custom tab for the Contract object"

Supported Functions

Current Functionality

Tool Name Description Required Input Fields
create_object Create a new object in Salesforce name, plural_name, api_name
create_object_with_fields Create a new object with fields name, plural_name, api_name, fields
create_custom_field Add fields to a custom object name, plural_name, api_name, fields
delete_object_fields Delete fields in a custom object api_name, fields
create_tab Creates a new Custom Tab tab_api_name, label, motif, tab_type
create_custom_app Creates a new Lightning Custom Application api_name, label, tabs
create_report_folder Creates a new Report Folder folder_api_name, folder_label
create_dashboard_folder Creates a new Dashboard Folder folder_api_name, folder_label
create_lightning_page Creates a new empty Lightning Page label, description
run_soql_query Executes a SOQL query query
run_sosl_search Executes a SOSL search search
get_object_fields Retrieves field information object_name
create_record Creates a new record object_name, data
update_record Updates an existing record object_name, record_id, data
delete_record Deletes a record object_name, record_id
create_custom_metadata_type Creates a Custom Metadata Type api_name, label, plural_name, fields
describe_object_with_api Describes a Salesforce object api_name

Security Note

Your Salesforce credentials are stored securely and are only used to establish the connection to your org. The system never stores or shares your credentials with third parties.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "salesforce" '{"command":"uv","args":["--directory","[REPO_CLONE_PATH]/salesforce-mcp/src","run","server.py"],"env":{"USERNAME":"YOUR_SALESFORCE_USERNAME","PASSWORD":"YOUR_SALESFORCE_PASSWORD","SECURITY_TOKEN":"YOUR_SALESFORCE_SECURITY_TOKEN"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "salesforce": {
            "command": "uv",
            "args": [
                "--directory",
                "[REPO_CLONE_PATH]/salesforce-mcp/src",
                "run",
                "server.py"
            ],
            "env": {
                "USERNAME": "YOUR_SALESFORCE_USERNAME",
                "PASSWORD": "YOUR_SALESFORCE_PASSWORD",
                "SECURITY_TOKEN": "YOUR_SALESFORCE_SECURITY_TOKEN"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "salesforce": {
            "command": "uv",
            "args": [
                "--directory",
                "[REPO_CLONE_PATH]/salesforce-mcp/src",
                "run",
                "server.py"
            ],
            "env": {
                "USERNAME": "YOUR_SALESFORCE_USERNAME",
                "PASSWORD": "YOUR_SALESFORCE_PASSWORD",
                "SECURITY_TOKEN": "YOUR_SALESFORCE_SECURITY_TOKEN"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later