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. Whether you're a business user, developer, or administrator, you can chat with your Salesforce org to get insights, manage data, configure the platform, create or delete objects and fields, 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 the following 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"
            }
        }
    }
}

Make sure to:

  • Replace [REPO_CLONE_PATH] with the local directory where you cloned the repository
  • Replace the placeholder values with your actual Salesforce credentials:
    • YOUR_SALESFORCE_USERNAME: Your Salesforce username
    • YOUR_SALESFORCE_PASSWORD: Your Salesforce password
    • YOUR_SALESFORCE_SECURITY_TOKEN: Your Salesforce security token

Features

Working with Data

You can interact with your Salesforce data in the following ways:

Ask Questions About Your Data

  • Get insights about your Salesforce records
  • Example: "Show me all accounts created in the last 30 days with their names and annual revenue"

Search Across Your Org

  • Find information across all your Salesforce records
  • Example: "Find all records containing 'Acme' in any field"

Understand Your Data Structure

  • Explore available fields and objects
  • Example: "What fields are available on the Account object?"

Manage Your Records

  • Create, update, and delete records with natural language
  • Examples:
    • "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"
    • "Create a new user"

Working with Metadata

Create Objects and Fields

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

Delete Objects and Fields

  • Example: "Delete the field type from the Contract object"

Create Custom Tabs and Apps

  • Example: "Get the describe information for the Account object"

Supported Functions

The MCP server supports the following Salesforce functions:

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 Create a new Custom Tab tab_api_name, label, motif, tab_type
create_custom_app Create a Lightning Custom Application api_name, label, tabs
create_report_folder Create a Report Folder folder_api_name, folder_label
create_dashboard_folder Create a Dashboard Folder folder_api_name, folder_label
create_lightning_page Create an empty Lightning Page label, description
run_soql_query Execute a SOQL query query
run_sosl_search Execute a SOSL search search
get_object_fields Get field information for an object object_name
create_record Create a new record object_name, data
update_record Update an existing record object_name, record_id, data
delete_record Delete a record object_name, record_id
create_custom_metadata_type Create a Custom Metadata Type api_name, label, plural_name, fields
describe_object_with_api Get full object description api_name

Security Note

Your Salesforce credentials are stored securely and are only used to establish the connection to your org. The service 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