← Back to directory
S

Salesforce DX MCP Server

Official
Official Salesforce DX toolset that lets LLMs read and operate on your authorized Salesforce orgs.
GitHub source repository ↗
★ 462 Stars Category · Dev Tools Very popular Source revision 670234dbdca4
61FMRS · C
Reliability
9/20
Security and permissions
9/20
Maintenance
14/20
Documentation
16/20
Setup experience
13/20

An official, broad-coverage Salesforce developer MCP server with a large tool catalog, but it requires local CLI authorization and careful scoping of org access.

Read the FMRS scoring method →

The Salesforce DX MCP Server is maintained by the official salesforcecli GitHub organization and implements the Model Context Protocol so LLMs can securely interact with Salesforce orgs already authorized on your machine. Launched via npx @salesforce/mcp, it's configured with --orgs to scope which orgs are accessible and --toolsets/--tools to enable specific tool groups, spanning metadata deploy/retrieve, SOQL queries, Apex/agent testing, user and permission set management, scratch org lifecycle, DevOps Center work items, static code analysis (Code Analyzer), Aura-to-LWC migration experts, and mobile LWC capability documentation across more than sixty tools. Only generally-available (GA) tools are enabled by default; the --allow-non-ga-tools flag is required to use tools still in preview.

Tools

get_username
Determines the appropriate username or alias for Salesforce operations, handling both default orgs and Dev Hubs.
resume_tool_operation
Resumes a long-running operation that wasn't completed by another tool.
run_soql_query
Runs a SOQL query against a Salesforce org.
check_devops_center_commit_status
Checks the current status of a work item committed to DevOps Center.
checkout_devops_center_work_item
Checks out the branch associated with a selected work item by name.
commit_devops_center_work_item
Commits SFDX project changes and registers the commit SHA in DevOps Center.
create_devops_center_pull_request
Commits local changes to a DevOps Center work item's feature branch.
detect_devops_center_merge_conflict
Detects merge conflicts for a selected work item or in a given source branch.
list_devops_center_projects
Lists all DevOps Center projects in a specific org.
list_devops_center_work_items
Lists all the work items for a specific DevOps Center project.
create_devops_center_work_item
Creates a new DevOps Center work item in the selected project.
update_devops_center_work_item_status
Sets a work item's status to In Progress or Ready to Promote.
promote_devops_center_work_item
Promotes an approved work item to the next stage in the DevOps Center pipeline.
resolve_devops_center_deployment_failure
Diagnoses and resolves deployment failures.
resolve_devops_center_merge_conflict
Applies a selected resolution method to a merge conflict.
enrich_metadata
Enriches metadata from your org in your DX project.
create_aura_blueprint_draft
Creates a comprehensive PRD blueprint for Aura component migration.
enhance_aura_blueprint_draft
Enhances an existing draft PRD with expert analysis and unknown resolution.
orchestrate_aura_migration
Orchestrates the complete Aura-to-LWC migration workflow end to end.
transition_prd_to_lwc
Provides migration bridge guidance for creating LWC components from Aura specifications.
create-custom-rule
Creates a custom XPath-based PMD rule from a provided Apex code sample.
describe_code_analyzer_rule
Gets the description of a Code Analyzer rule.
generate_xpath_prompt
Builds the prompt that guides XPath authoring from AST context for custom rule creation.
list_code_analyzer_rules
Selects Code Analyzer rules based on a number of criteria.
query_code_analyzer_results
Queries a Code Analyzer results JSON file and returns filtered violations.
run_code_analyzer
Performs static analysis against code for best practices, security, and performance issues.
create_lwc_component_from_prd
Creates complete LWC components from PRD specifications with proper structure and best practices.
create_lwc_jest_tests
Generates Jest test suites for LWC components with coverage and mocking.
review_lwc_jest_tests
Reviews and validates Jest test implementations for LWC components.
create_lightning_type
Provides guidance for creating Custom Lightning Types (CLT) for apps, agent actions, LWC, and platform integrations.
explore_slds_blueprints
Retrieves SLDS blueprint specifications by name, category, component, CSS class, or styling hook.
guide_design_general
Provides SLDS guidelines and best practices for LWC covering accessibility and responsive design.
guide_component_accessibility
Provides accessibility guidelines and testing instructions for LWC components.
guide_lwc_best_practices
Offers LWC development best practices and coding standards guidance.
guide_lwc_development
Provides LWC development workflow and implementation guidelines.
guide_lwc_rtl_support
Provides Right-to-Left (RTL) internationalization support and development guidance.
guide_lws_security
Provides security analysis per product security and Lightning Web Security guidelines.
guide_slds_blueprints
Provides comprehensive SLDS blueprint guidelines, reference docs, and a category index.
guide_utam_generation
Provides UI Test Automation Model (UTAM) Page Object generation guidelines and best practices.
lwc-doc-error
Retrieves information about LWC error messages, including static guidance for resolving them.
reference_lwc_compilation_error
References LWC compilation errors against a knowledge base of documented patterns, causes, and fixes.
guide_slds_styling
Retrieves SLDS styling hooks guidance and reference documentation.
explore_slds_styling
Searches SLDS styling hooks with exact, fuzzy, prefix, and wildcard matching.
guide_lbc_usage
Provides an index of Lightning Base Components with short descriptions to help pick the right one.
explore_lbc_components
Returns full API documentation for given Lightning Base Component names.
create_lds_graphql_mutation_query
Provides guidance for creating GraphQL mutation queries.
create_lds_graphql_read_query
Creates GraphQL read queries for LDS.
explore_lds_uiapi
Explores and documents Lightning Design System UI API capabilities.
fetch_lds_graphql_schema
Fetches the GraphQL schema structure for LDS.
guide_lds_data_consistency
Provides data consistency patterns and best practices for LDS components.
guide_lds_development
Provides LDS development guidelines and component integration guidance.
guide_lds_graphql
Provides LDS GraphQL usage patterns and guidelines.
guide_lds_referential_integrity
Provides referential integrity patterns for LDS data management.
orchestrate_lds_data_requirements
Provides step-by-step guidance for analyzing LDS data requirements into PRD-ready specs.
test_lds_graphql_query
Tests a GraphQL query against a connected Salesforce org and returns the result.
guide_figma_to_lwc_conversion
Converts Figma designs to LWC component specifications.
guide_lo_migration
Provides guidance to convert a Lightning Out (beta) app into a Lightning Out 2.0 app.
run_lwc_accessibility_jest_tests
Provides accessibility testing utilities and Jest integration for LWC components.
verify_aura_migration_completeness
Provides an Aura-to-LWC migration completeness checklist and validation.
orchestrate_lwc_component_creation
Provides guidance for the entire Aura-to-LWC migration process.
orchestrate_lwc_component_optimization
Provides performance optimization and best practices for LWC components.
orchestrate_lwc_component_testing
Provides comprehensive testing workflow and test generation guidance.
orchestrate_lwc_slds2_uplift
Provides migration guidance for upgrading to SLDS 2.
validate_and_optimize
Returns a validation runbook to run accessibility/security/best-practice validators, produce SARIF issues, and score results.
score_issues
Computes a 0-100 readiness score and quality grade (draft, prototype, review-for-production) from SARIF issues.
deploy_metadata
Deploys metadata from your DX project to an org.
retrieve_metadata
Retrieves metadata from your org to your DX project.
create_mobile_lwc_app_review
Provides TypeScript API docs for the LWC App Review Service.
create_mobile_lwc_ar_space_capture
Provides TypeScript API docs for LWC AR Space Capture.
create_mobile_lwc_barcode_scanner
Provides TypeScript API docs for the LWC Barcode Scanner.
create_mobile_lwc_biometrics
Provides TypeScript API docs for the LWC Biometrics Service.
create_mobile_lwc_calendar
Provides TypeScript API docs for the LWC Calendar Service.
create_mobile_lwc_contacts
Provides TypeScript API docs for the LWC Contacts Service.
create_mobile_lwc_document_scanner
Provides TypeScript API docs for the LWC Document Scanner.
create_mobile_lwc_geofencing
Provides TypeScript API docs for the LWC Geofencing Service.
create_mobile_lwc_location
Provides TypeScript API docs for the LWC Location Service.
create_mobile_lwc_nfc
Provides TypeScript API docs for the LWC NFC Service.
create_mobile_lwc_payments
Provides TypeScript API docs for the LWC Payments Service.
get_mobile_lwc_offline_analysis
Analyzes LWC components for mobile-specific issues and offline compatibility/performance recommendations.
get_mobile_lwc_offline_guidance
Provides structured review instructions to detect and remediate mobile offline code violations in LWC components.
create_org_snapshot
Creates a scratch org snapshot.
create_scratch_org
Creates a scratch org.
delete_org
Deletes a locally-authorized Salesforce scratch org or sandbox.
list_all_orgs
Lists all configured Salesforce orgs, with optional connection status checking.
open_org
Opens an org in a browser.
scan_apex_class_for_antipatterns
Analyzes Apex class files for performance antipatterns and gives fix recommendations.
run_agent_test
Executes agent tests in your org.
run_apex_test
Executes Apex tests in your org.
assign_permission_set
Assigns a permission set to the user or on behalf of another user.

Setup

  1. Authorize the target org locally with the Salesforce CLI beforehand (sf org login web or the 'SFDX: Authorize an Org' command in your IDE).
  2. Add a server entry to your MCP client's config file with command npx and args -y @salesforce/mcp plus flags such as --orgs (required, e.g. DEFAULT_TARGET_ORG) and --toolsets (e.g. orgs,metadata,data,users).
  3. Optionally add --tools for specific extra tools, or --allow-non-ga-tools to enable preview tools.
  4. Save and reload/restart your MCP client — npx will fetch and run @salesforce/mcp automatically (no manual install needed).
  5. If something goes wrong, add --debug for debug logs (not all clients surface MCP logs).
claude_desktop_config.json
{"mcpServers":{"Salesforce DX":{"command":"npx","args":["-y","@salesforce/mcp","--orgs","DEFAULT_TARGET_ORG","--toolsets","orgs,metadata,data,users","--tools","run_apex_test","--allow-non-ga-tools"]}}}

Fit and risk

Best for

  • Developers already using the Salesforce CLI and a DX project
  • Teams that want an AI coding assistant to operate directly on Salesforce metadata, Apex, and LWC
  • Projects migrating Aura to LWC or adopting DevOps Center workflows

Not for

  • Users without a local Salesforce CLI setup or any authorized org
  • Cases needing only trivial read-only lookups without wanting the context overhead of the broader toolset (can be trimmed via --toolsets, but the default footprint is still sizable)

Required permissions

  • Requires orgs to be pre-authorized locally via `sf org login web` or equivalent
  • Access is scoped per `--orgs`: specific orgs, the default org/Dev Hub, or (use with caution) all authorized orgs
  • Several tools have write access — deploying/retrieving metadata, creating or deleting scratch orgs, assigning permission sets, committing DevOps Center work items

Risks and side effects

  • `ALLOW_ALL_ORGS` grants the server access to every locally authorized org, which can expose production orgs if misconfigured
  • Tools like `deploy_metadata` and `delete_org` make real changes or deletions to orgs — misuse carries data/config risk
  • Telemetry is enabled by default; use `--no-telemetry` explicitly if privacy/compliance requires disabling it
  • `DEFAULT_TARGET_ORG`/`DEFAULT_TARGET_DEV_HUB` resolve dynamically on every tool call, so switching your local default org changes which org the server can act on

Troubleshooting

  1. Confirm the org is authorized via `sf org login web` or the IDE command, and that the username/alias/token passed to --orgs is correct
  2. Check that --toolsets and --tools names match the documented values; if a tool is missing, check whether --allow-non-ga-tools is needed
  3. Add --debug to see run logs, keeping in mind not every MCP client exposes them
  4. Don't modify the `-y @salesforce/mcp` portion of the args or npx may fail to auto-install/update the package

Use cases

Query, deploy, and retrieve Salesforce org metadata directly from an IDE or AI agent
Run SOQL queries, Apex tests, and agent tests and get results inline
Migrate Aura components to Lightning Web Components with expert guidance tools
Run static analysis (Code Analyzer) on Apex code and author custom rules
Manage DevOps Center work items and detect/resolve merge conflicts
Manage scratch org lifecycle and permission set assignments

Supported clients

Claude CodeFull support
VS Code (Copilot)Full support
ClineFull support
CursorFull support
TraePartial support
WindsurfPartial support
ZedPartial support