Skip to main content
Glama
codefriar

Salesforce CLI MCP Server

by codefriar

Servidor MCP de Salesforce CLI

Servidor de Protocolo de contexto de modelo (MCP) para proporcionar funcionalidad CLI de Salesforce a herramientas LLM como Claude Desktop.

Descripción general

Este servidor MCP encapsula la herramienta de línea de comandos Salesforce CLI ( sf ) y expone sus comandos como herramientas y recursos MCP, lo que permite a los agentes con tecnología LLM:

  • Ver información de ayuda sobre temas y comandos de Salesforce CLI

  • Ejecute comandos CLI de Salesforce con los parámetros adecuados

  • Aproveche las capacidades de Salesforce CLI en los flujos de trabajo de IA

Related MCP server: Salesforce CLI MCP Server

Requisitos

  • Node.js 18+ y npm

  • Salesforce CLI ( sf ) instalado y configurado

  • Sus credenciales de organización de Salesforce configuradas en la CLI

Instalación

# Clone the repository
git clone <repository-url>
cd sfMcp

# Install dependencies
npm install

Uso

Iniciando el servidor

# Basic usage
npm start

# With project roots
npm start /path/to/project1 /path/to/project2
# or using the convenience script
npm run with-roots /path/to/project1 /path/to/project2

# As an npx package with roots
npx -y codefriar/sf-mcp /path/to/project1 /path/to/project2

El servidor MCP utiliza el transporte stdio, que se puede utilizar con clientes MCP como MCP Inspector o Claude Desktop.

Configuración en Claude Desktop

Para configurar este MCP en la configuración .claude.json de Claude Desktop:

{
  "tools": {
    "salesforce": {
      "command": "/path/to/node",
      "args": [
        "/path/to/sf-mcp/build/index.js",
        "/path/to/project1",
        "/path/to/project2"
      ]
    }
  }
}

Usando el paquete npm directamente:

{
  "tools": {
    "salesforce": {
      "command": "/path/to/npx", 
      "args": [
        "-y",
        "codefriar/sf-mcp",
        "/path/to/project1",
        "/path/to/project2"
      ]
    }
  }
}

Desarrollo

# Watch mode (recompiles on file changes)
npm run dev

# In another terminal
npm start [optional project roots...]

Herramientas y recursos disponibles

Este servidor MCP proporciona comandos de Salesforce CLI como herramientas MCP. Detecta y registra automáticamente todos los comandos disponibles de Salesforce CLI e implementa específicamente los comandos más comunes.

Herramientas principales

  • sf_version : obtener la información de la versión de Salesforce CLI

  • sf_help : obtenga información de ayuda para los comandos CLI de Salesforce

  • sf_cache_clear - Borra la caché de descubrimiento de comandos

  • sf_cache_refresh - Actualizar la caché de descubrimiento de comandos

Gestión del directorio de proyectos (raíces)

Para los comandos que requieren un contexto de proyecto de Salesforce (como las implementaciones), debe especificar el directorio del proyecto. El MCP admite varios directorios de proyecto (raíces), de forma similar al MCP del sistema de archivos.

Métodos de configuración

Método 1: mediante argumentos de la línea de comandos

# Start the MCP with project roots
npm start /path/to/project1 /path/to/project2
# or
npx -y codefriar/sf-mcp /path/to/project1 /path/to/project2

Cuando se configura de esta manera, las raíces se nombrarán automáticamente root1 , root2 , etc., y la primera se establecerá como predeterminada.

Método 2: Uso de herramientas MCP

  • sf_set_project_directory : establece un directorio de proyecto de Salesforce para usar con los comandos

    • Parámetros:

      • directory - Ruta a un directorio que contiene un archivo sfdx-project.json

      • name - (Opcional) Nombre para esta raíz del proyecto

      • description - (Opcional) Descripción de la raíz de este proyecto

      • isDefault - (Opcional) Establezca esta raíz como predeterminada para la ejecución del comando

  • sf_list_roots - Lista todas las raíces del proyecto configuradas

  • sf_detect_project_directory : intenta detectar el directorio del proyecto a partir de los mensajes del usuario

Ejemplo de uso:

# Set project directory with a name
sf_set_project_directory --directory=/path/to/your/sfdx/project --name=project1 --isDefault=true

# List all configured roots
sf_list_roots

# Or include in your message:
"Please deploy the apex code from the project in /path/to/your/sfdx/project to my scratch org"

Método 3: Configuración de escritorio de Claude Configure las raíces del proyecto en .claude.json como se describe a continuación.

Uso de las raíces del proyecto

Puede ejecutar comandos en raíces de proyectos específicos:

# Using resource URI
sf://roots/project1/commands/project deploy start --sourcedir=force-app

# Using rootName parameter
sf_project_deploy_start --sourcedir=force-app --rootName=project1

Se debe especificar el directorio del proyecto para comandos como implementaciones, recuperación de código fuente y otras operaciones específicas del proyecto. Si se configuran varias raíces, se usará la raíz predeterminada a menos que se especifique lo contrario.

Herramientas clave implementadas

Los siguientes comandos están implementados específicamente y se garantiza que funcionan:

Gestión de la organización

  • sf_org_list - Lista de organizaciones de Salesforce

    • Parámetros: json , verbose

  • sf_auth_list_orgs - Lista de organizaciones de Salesforce autenticadas

    • Parámetros: json , verbose

  • sf_org_display - Mostrar detalles sobre una organización

    • Parámetros: targetusername , json

  • sf_org_open - Abre una organización en el navegador

    • Parámetros: targetusername , path , urlonly

Código Apex

  • sf_apex_run - Ejecutar código Apex anónimo

    • Parámetros: targetusername , file , apexcode , json

  • sf_apex_test_run - Ejecutar pruebas de Apex

    • Parámetros: targetusername , testnames , suitenames , classnames , json

Gestión de datos

  • sf_data_query - Ejecutar una consulta SOQL

    • Parámetros: targetusername , query , json

  • sf_schema_list_objects - Lista de sObjects en la organización

    • Parámetros: targetusername , json

  • sf_schema_describe : describe un objeto de Salesforce

    • Parámetros: targetusername , sobject , json

Despliegue

  • sf_project_deploy_start - Implementar la fuente en una organización

    • Parámetros: targetusername , sourcedir , json , wait

Herramientas descubiertas dinámicamente

El servidor descubre todos los comandos CLI de Salesforce disponibles y los registra como herramientas con el formato: sf_<topic>_<command> .

Por ejemplo:

  • sf_apex_run - Ejecutar código Apex anónimo

  • sf_data_query - Ejecutar una consulta SOQL

Para los comandos de temas anidados, el nombre de la herramienta incluye la ruta completa con guiones bajos:

  • sf_apex_log_get - Obtener registros de Apex

  • sf_org_login_web - Iniciar sesión en una organización mediante el flujo web

El servidor también crea alias simplificados para comandos anidados comunes cuando es posible:

  • sf_get como alias para sf_apex_log_get

  • sf_web como alias para sf_org_login_web

Los comandos disponibles varían según los complementos CLI de Salesforce instalados.

Nota: La detección de comandos se almacena en caché para mejorar el rendimiento del inicio. Si instala nuevos complementos de SF CLI, utilice la herramienta sf_cache_refresh para actualizar la caché y, a continuación, reinicie el servidor.

Recursos

Los siguientes recursos proporcionan documentación sobre Salesforce CLI:

  • sf://help - Documentación principal de la CLI

  • sf://topics/{topic}/help - Documentación de ayuda del tema

  • sf://commands/{command}/help - Documentación de ayuda de comandos

  • sf://topics/{topic}/commands/{command}/help - Documentación de ayuda sobre temas y comandos

  • sf://version - Información de la versión

  • sf://roots - Lista todas las raíces del proyecto configuradas

  • sf://roots/{root}/commands/{command} - Ejecutar un comando en una raíz de proyecto específica

Cómo funciona

  1. Al iniciarse, el servidor busca una lista de comandos en caché (almacenada en ~/.sf-mcp/command-cache.json )

  2. Si existe un caché válido, se utiliza para registrar comandos; de lo contrario, los comandos se descubren dinámicamente.

  3. Durante el descubrimiento, el servidor consulta sf commands --json para obtener una lista completa de los comandos disponibles.

  4. Los metadatos del comando (incluidos parámetros y descripciones) se extraen directamente de la salida JSON

  5. Todos los comandos se registran como herramientas MCP con esquemas de parámetros apropiados

  6. Los recursos están registrados para la documentación de ayuda.

  7. Cuando se llama a una herramienta, se ejecuta el comando CLI de Salesforce correspondiente

Gestión de raíces del proyecto

Para los comandos que requieren un contexto de proyecto de Salesforce:

  1. El servidor verifica si se han configurado raíces de proyecto a través de sf_set_project_directory

  2. Si se configuran varias raíces, se utiliza la raíz predeterminada a menos que se especifique una raíz específica

  3. Si no se establecen raíces, el servidor solicitará al usuario que especifique un directorio de proyecto.

  4. Los comandos se ejecutan dentro del directorio del proyecto apropiado, lo que garantiza el contexto adecuado.

  5. El usuario puede agregar o cambiar entre múltiples raíces de proyecto según sea necesario

Los comandos específicos del proyecto (como implementaciones, recuperaciones, etc.) se ejecutarán automáticamente en el directorio del proyecto correspondiente. Para los comandos que no requieren contexto de proyecto, el directorio de trabajo no importa.

Puede ejecutar comandos en raíces de proyectos específicos mediante:

  • Usando la URI del recurso: sf://roots/{rootName}/commands/{command}

  • Proporcionar un parámetro rootName a las herramientas de comando (detalles de implementación interna)

  • Establecer una raíz específica como predeterminada con sf_set_project_directory --isDefault=true

Almacenamiento en caché de comandos

Para mejorar el rendimiento de inicio, el servidor MCP almacena en caché los comandos descubiertos:

  • El caché se almacena en ~/.sf-mcp/command-cache.json

  • Incluye todos los temas, comandos, parámetros y descripciones.

  • El caché tiene una marca de tiempo de validación y una verificación de versión de SF CLI

  • De forma predeterminada, la caché caduca después de 7 días.

  • Cuando instale nuevos complementos de Salesforce CLI, utilice sf_cache_refresh para actualizar la caché

Solución de problemas de caché

La primera ejecución del servidor realiza un descubrimiento completo de comandos, lo cual puede tardar un tiempo. Si encuentra algún problema con comandos faltantes o problemas de caché:

  1. Detener el servidor MCP (si está en ejecución)

  2. Eliminar manualmente el archivo de caché: rm ~/.sf-mcp/command-cache.json

  3. Inicie el servidor nuevamente: npm start

Esto forzará un redescubrimiento completo de todos los comandos utilizando los metadatos oficiales de la CLI.

Si aún faltan comandos específicos o ha instalado nuevos complementos de SF CLI:

  1. Utilice la herramienta sf_cache_refresh de Claude Desktop

  2. Detener y reiniciar el servidor MCP

Manejo de temas anidados

La CLI de Salesforce tiene una estructura de comandos jerárquica que puede tener varios niveles de profundidad. Este servidor MCP gestiona estos comandos anidados mediante:

  • Conversión de rutas separadas por dos puntos al formato de guión bajo ( apex:log:getsf_apex_log_get )

  • Proporcionar alias para comandos profundos comunes cuando sea posible ( sf_get para sf_apex_log_get )

  • Preservación de la jerarquía de comandos completa en los nombres de las herramientas

  • Usando la estructura de comando oficial de sf commands --json

Los comandos de temas anidados se registran dos veces cuando es posible: una vez con el nombre de la jerarquía completa y otra con un alias simplificado, lo que hace que sean más fáciles de descubrir y usar.

Licencia

ISC

Available Tools

5 tools
sf_cache_clearA

Clear the cached SF command metadata to force a refresh

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the burden of behavioral disclosure. It indicates a mutation action ('Clear') that likely affects system state, but does not detail permissions, side effects, or error handling. It adds value by specifying the purpose (force refresh) but lacks depth on behavioral traits like reversibility or impact.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the action and outcome with no wasted words. It is front-loaded and appropriately sized for a simple tool, making it easy to understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (simple mutation with no parameters) and lack of annotations or output schema, the description is minimally adequate. It explains what the tool does but does not cover behavioral aspects like effects or usage context in depth. For a mutation tool, more disclosure would be beneficial, but it meets basic requirements.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description does not add parameter details, which is appropriate. Baseline is 4 for zero parameters, as the description focuses on tool purpose without unnecessary parameter repetition.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Clear') and the target ('cached SF command metadata'), with the specific outcome of forcing a refresh. It distinguishes from siblings like sf_cache_refresh by emphasizing clearing rather than refreshing, though the distinction could be more explicit. No tautology or vagueness is present.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when a refresh of metadata is needed, but does not explicitly state when to use this tool versus alternatives like sf_cache_refresh or other siblings. It provides some context (force a refresh) but lacks explicit guidance on prerequisites, exclusions, or comparisons with other tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

sf_cache_refreshB

Refresh the SF command cache by re-scanning all available commands

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool refreshes the cache by re-scanning commands, implying a read/write operation that updates cache state, but doesn't specify permissions needed, side effects, performance impact, or error handling. For a tool that likely modifies cache data, this is insufficient behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's action without unnecessary words. It is front-loaded with the core purpose ('Refresh the SF command cache') and adds clarifying detail ('by re-scanning all available commands'). Every part of the sentence contributes meaning, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters, no annotations, and no output schema, the description is minimal. While it states what the tool does, it lacks context about why or when to use it, behavioral traits like side effects or performance, and what the output might be. For a cache operation tool, this leaves significant gaps in understanding its role and impact.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100% (as there are no parameters to describe). The description doesn't need to add parameter semantics, so it meets the baseline of 4 for zero-parameter tools. No additional value is required beyond stating the tool's purpose.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Refresh') and resource ('SF command cache'), and specifies the action ('by re-scanning all available commands'). It distinguishes from sibling 'sf_cache_clear' by indicating a refresh rather than a clear operation. However, it doesn't explicitly differentiate from other siblings like project directory tools, keeping it at 4 rather than 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'sf_cache_clear' or other cache-related operations. It lacks context about prerequisites, timing, or scenarios where this refresh is necessary versus other actions. This leaves the agent without usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

sf_detect_project_directoryB

Get instructions for setting up Salesforce project directories for command execution

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'Get instructions,' implying a read-only operation that returns guidance, but it doesn't clarify if this requires specific permissions, what format the instructions are in, or if there are any side effects. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence: 'Get instructions for setting up Salesforce project directories for command execution.' It is front-loaded with the main purpose, has no unnecessary words, and efficiently conveys the tool's intent without waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 0 parameters, no annotations, and no output schema, the description is minimally adequate. It states what the tool does but lacks details on the instruction format, prerequisites, or how it relates to sibling tools. For a tool that likely provides setup guidance, more context on the output or usage scenarios would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics beyond what the schema provides. A baseline score of 4 is appropriate as the description doesn't introduce confusion about parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get instructions for setting up Salesforce project directories for command execution.' It specifies the action ('Get instructions') and resource ('Salesforce project directories'), though it doesn't explicitly distinguish it from sibling tools like sf_set_project_directory. The purpose is clear but lacks sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, timing, or relationships with sibling tools such as sf_set_project_directory (which might actually set the directory) or sf_list_roots (which might list available directories). Without such context, the agent lacks clear usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

sf_list_rootsB

List all configured Salesforce project directories and their metadata

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't cover important aspects like whether it's read-only, requires authentication, has rate limits, or what the output format looks like. This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters and no output schema, the description provides basic purpose information but lacks important context about behavior, output format, and usage guidelines. For a tool with no annotations and no output schema, more completeness would be expected to help the agent understand what to expect from the operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the input requirements. The description appropriately doesn't add parameter information beyond what's in the schema, maintaining a baseline score of 4 for tools with no parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List') and the resource ('all configured Salesforce project directories and their metadata'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like sf_detect_project_directory or sf_set_project_directory, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, timing, or comparison to siblings like sf_cache_clear or sf_detect_project_directory, leaving the agent without contextual usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

sf_set_project_directoryB

Set a Salesforce project directory for command execution context

ParametersJSON Schema
NameRequiredDescriptionDefault
directoryYesThe absolute path to a directory containing an sfdx-project.json file
nameNoOptional name for this project root
descriptionNoOptional description for this project root
isDefaultNoSet this root as the default for command execution

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions setting a directory for 'command execution context,' which implies configuration/mutation, but doesn't specify whether this persists across sessions, requires specific permissions, or has side effects. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and efficient, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 4 parameters, no annotations, and no output schema, the description is minimally adequate but incomplete. It covers the basic purpose but lacks details on behavioral traits, usage context, and output expectations, which are crucial for a mutation tool in a set of related Salesforce commands.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, meaning all parameters are documented in the schema itself. The description adds no additional semantic information about parameters beyond what's in the schema, such as usage examples or constraints. This meets the baseline for high schema coverage but doesn't provide extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Set') and the resource ('Salesforce project directory for command execution context'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like sf_detect_project_directory or sf_list_roots, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites (e.g., needing an sfdx-project.json file), when not to use it, or how it relates to sibling tools like sf_detect_project_directory. This leaves the agent with minimal context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv1.0.0
    • Changedsf_cache_clear1 field changed
      • removedInput schema / additionalProperties
        Removed value: -false
    • Changedsf_cache_refresh1 field changed
      • removedInput schema / additionalProperties
        Removed value: -false
    • Changedsf_detect_project_directory1 field changed
      • removedInput schema / additionalProperties
        Removed value: -false
    • Changedsf_list_roots1 field changed
      • removedInput schema / additionalProperties
        Removed value: -false
  2. 5 tool updates
    • First observedsf_cache_clear
    • First observedsf_cache_refresh
    • First observedsf_detect_project_directory
    • First observedsf_list_roots
    • First observedsf_set_project_directory

TDQS

A3.5/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: cache_clear and cache_refresh handle metadata caching, detect_project_directory provides setup instructions, list_roots enumerates existing directories, and set_project_directory establishes execution context. The descriptions reinforce these boundaries, making misselection unlikely.

Naming Consistency5/5

All tools follow a consistent 'sf_verb_noun' pattern with snake_case throughout (e.g., sf_cache_clear, sf_detect_project_directory). This predictable naming scheme makes the tool set easy to navigate and understand at a glance.

Tool Count4/5

Five tools is reasonable for a Salesforce CLI server focused on project directory management and cache operations. It's slightly lean but covers core setup and maintenance tasks without feeling bloated or incomplete for its apparent scope.

Completeness3/5

The tool set covers project directory setup, listing, and context setting, plus cache management, but lacks direct Salesforce CLI command execution tools (e.g., running queries or deploying metadata). This creates a notable gap for agents needing to perform actual Salesforce operations, though the provided tools support preparatory workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Integrates Claude with Salesforce to enable natural language querying, modification, and management of Salesforce records and metadata. It supports comprehensive operations including object/field management, SOSL searches, and Apex code execution.
    1,426 npm
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with Salesforce organizations through project-based CLI integration, allowing execution of Apex, SOQL queries, object descriptions, and org management using local Salesforce DX project configurations.
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI tools like Claude Desktop and Cline to interact with Salesforce, providing tools for SOQL queries, Apex execution, metadata management, and more.
    17
    28 npm
    43
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with Salesforce orgs through natural language commands, supporting org management, SOQL queries, metadata operations, testing, and more.
    1
    -