Salesforce Metadata MCP

Created By
semwalajay83-sem4 days ago
The most comprehensive Salesforce MCP server: 212 tools for managing your org from Claude in natural language. Create custom objects, fields, and page layouts; build and activate Flows; write and deploy Apex and LWC; manage permission sets, profiles, and users; reports and dashboards; Experience Cloud; OmniStudio (OmniScripts, FlexCards, DataRaptors); and full Agentforce agent creation (topics, actions, planner). Auth via Salesforce CLI alias, access token, or JWT Bearer Flow. MIT licensed.
Overview

salesforce-metadata-mcp

npm version npm downloads License: MIT MCP Compatible

The most comprehensive Salesforce metadata and development MCP server. 212 tools for building, configuring, and automating Salesforce orgs directly from Claude or any MCP client.


Quick Start

npx -y salesforce-metadata-mcp

Or install globally:

npm install -g salesforce-metadata-mcp
salesforce-metadata-mcp

Configuration (Claude Desktop / Claude Code)

Add to your MCP configuration (claude_desktop_config.json or .claude/settings.json):

{
  "mcpServers": {
    "salesforce": {
      "command": "npx",
      "args": ["salesforce-metadata-mcp"],
      "env": {
        "SF_INSTANCE_URL": "https://your-org.salesforce.com",
        "SF_ACCESS_TOKEN": "your_access_token"
      }
    }
  }
}

See SETUP.md for all authentication methods and detailed setup instructions.


Tools — 212 total

Highlights below; see TOOLS.md for the complete reference with parameters and example prompts.

Objects & Fields

ToolDescription
sf_create_custom_objectCreate a custom object with all settings
sf_create_custom_fieldCreate a field on any object (all types)
sf_create_formula_fieldCreate formula fields with full formula language support
sf_add_picklist_valuesAdd values to existing picklist fields
sf_create_custom_metadata_typeCreate a Custom Metadata Type (__mdt)
sf_create_custom_metadata_recordCreate records for a Custom Metadata Type
sf_create_custom_labelCreate or update Custom Labels
sf_create_custom_settingCreate Hierarchy or List Custom Settings
sf_create_global_value_setCreate shared picklist usable across objects
sf_create_record_typeCreate Record Types with picklist overrides
sf_create_business_processCreate Business Processes for Opp/Lead/Case
sf_create_page_layoutCreate Page Layouts with sections and fields
sf_create_sharing_ruleCreate criteria or ownership sharing rules
sf_create_field_dependencyCreate controlling/dependent picklist dependency

Automation

ToolDescription
sf_create_flowCreate any Flow type — Assignment, Decision, GetRecords, CreateRecords (with field values), DeleteRecords, Loop
sf_create_approval_processCreate multi-step approval processes
sf_create_validation_ruleCreate data validation rules
sf_create_workflow_field_updateCreate workflow field update actions
sf_create_email_alertCreate workflow email alert actions
sf_create_platform_eventCreate Platform Event objects
sf_create_assignment_ruleCreate Lead/Case assignment rules
sf_create_escalation_ruleCreate Case escalation rules
sf_create_auto_response_ruleCreate Web-to-Lead/Case auto-response rules
sf_create_matching_ruleCreate duplicate matching rules
sf_create_duplicate_ruleCreate duplicate detection rules
sf_create_apex_email_serviceCreate inbound Apex email services
sf_create_scheduled_jobSchedule an Apex class via cron

Security & Access

ToolDescription
sf_create_permission_setCreate Permission Sets with all permissions
sf_create_roleCreate roles in the role hierarchy
sf_create_queueCreate queues with members and objects
sf_create_named_credentialCreate Named Credentials for callouts

UI & Experience

ToolDescription
sf_create_lightning_appCreate Lightning Apps with nav/utility bars
sf_create_tabCreate Custom Tabs for objects
sf_create_compact_layoutCreate Compact Layouts (highlights panel)
sf_create_list_viewCreate List Views with filters and columns
sf_create_email_templateCreate HTML/text email templates
sf_create_static_resourceCreate Static Resources from text content
sf_create_custom_notification_typeCreate Custom Notification Types
sf_create_report_typeCreate Custom Report Types
sf_create_dashboardCreate Dashboards with components

Apex Development

ToolDescription
sf_create_apex_classDeploy any Apex class to the org
sf_create_apex_triggerDeploy an Apex trigger on any object
sf_create_apex_test_classDeploy test classes, optionally run tests
sf_run_apex_testsRun test classes and get pass/fail results
sf_execute_anonymous_apexExecute anonymous Apex and see output

LWC Development

ToolDescription
sf_create_lwcDeploy a full LWC with HTML, JS, CSS
sf_update_lwcUpdate an existing LWC component

Experience Cloud

ToolDescription
sf_create_experience_siteCreate Experience Cloud sites
sf_create_experience_pageCreate pages within Experience sites

Agentforce

ToolDescription
sf_create_agentCreate Agentforce Agent (Bot shell)
sf_create_agent_actionCreate Agent Actions (GenAiFunction) linked to Flows/Apex
sf_create_agent_topicCreate Agent Topics (GenAiPlugin) with actions wired in
sf_create_agent_plannerWire agent to its topics (GenAiPlanner) — required for routing

External Integrations

ToolDescription
sf_create_connected_appCreate OAuth Connected Apps
sf_create_external_data_sourceCreate External Data Sources for Connect
sf_create_external_objectCreate External Objects (__x)
sf_create_remote_site_settingWhitelist external URLs for callouts
sf_create_csp_settingCreate CSP trusted sites for LWC

Change Sets & Deployment

ToolDescription
sf_create_outbound_change_setCreate Outbound Change Sets
sf_add_to_change_setAdd components to a change set
sf_deploy_metadataDeploy metadata via Metadata API (supports testLevel, inline XML)
sf_check_deploy_statusCheck deployment job status
sf_retrieve_metadataRetrieve metadata from the org

MCP Server Management

ToolDescription
sf_create_mcp_serverGenerate a new MCP server project on disk
sf_create_mcp_toolAdd a new tool to an existing MCP server
sf_list_mcp_toolsList all tools in an MCP server project

Example Prompts

Build a complete object:

"Create a custom object called Project__c with fields: Name (text), Status__c (picklist: Planning/Active/Complete), Budget__c (currency), then add a validation rule requiring Budget when Status is Active."

Deploy Apex:

"Create an Apex class called OpportunityService that queries all Opps with Amount > 100000. Then create a test class for it."

Create a flow:

"Create a record-triggered flow on Opportunity that fires after save when Stage = Closed Won. Send an email alert to the owner and create a follow-up Task due in 30 days."

Set up an LWC:

"Create a Lightning Web Component called accountSummary that displays account name, industry, and annual revenue. Make it available on Record Pages."

Agentforce setup:

"Create an Agentforce agent called SalesAssistant. Then create a GetOrders action linked to the Get_Account_Orders flow. Then create an OrderManagement topic with actions: [GetOrders]. Finally wire SalesAssistant to topic OrderManagement."


Environment Variables

VariableDescriptionRequired
SF_INSTANCE_URLYour org URL (e.g. https://org.salesforce.com)Always
SF_CLIENT_IDConnected App client IDFor OAuth
SF_CLIENT_SECRETConnected App client secretFor OAuth
SF_REFRESH_TOKENOAuth refresh tokenFor OAuth
SF_ALIASSalesforce CLI org aliasFor CLI
SF_ACCESS_TOKENStatic access token (expires ~1hr)For static
PORTHTTP server port (default: 3000)For HTTP mode
TRANSPORTstdio or http (default: stdio)Optional

Documentation


License

MIT

Server Config

{
  "mcpServers": {
    "salesforce": {
      "command": "npx",
      "args": [
        "-y",
        "salesforce-metadata-mcp"
      ],
      "env": {
        "SF_INSTANCE_URL": "https://your-org.my.salesforce.com",
        "SF_ACCESS_TOKEN": "<YOUR_TOKEN>"
      }
    }
  }
}
Project Info
Created At
4 days ago
Updated At
4 days ago
Author Name
semwalajay83-sem
Star
-
Language
-
License
-
Category
Tags

Recommend Servers

View All