Skip to main content
Glama
codefriar

Salesforce CLI MCP Server

by codefriar

Salesforce CLI MCP サーバー

Claude Desktop などの LLM ツールに Salesforce CLI 機能を提供するモデル コンテキスト プロトコル (MCP) サーバー。

概要

この MCP サーバーは、Salesforce CLI ( sf ) コマンドライン ツールをラップし、そのコマンドを MCP ツールおよびリソースとして公開することで、LLM 対応エージェントが次のことを実行できるようにします。

  • Salesforce CLI のトピックとコマンドに関するヘルプ情報を表示します

  • 適切なパラメータを使用して Salesforce CLI コマンドを実行する

  • AIワークフローでSalesforce CLI機能を活用する

Related MCP server: Salesforce CLI MCP Server

要件

  • Node.js 18+ および npm

  • Salesforce CLI ( sf ) のインストールと設定

  • CLI で設定された Salesforce 組織の認証情報

インストール

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

# Install dependencies
npm install

使用法

サーバーの起動

# 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

MCP サーバーは stdio トランスポートを使用します。これは、 MCP Inspectorや Claude Desktop などの MCP クライアントで使用できます。

Claude Desktopでの設定

Claude Desktop の.claude.json構成でこの MCP を構成するには:

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

npm パッケージを直接使用する:

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

発達

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

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

利用可能なツールとリソース

このMCPサーバーは、Salesforce CLIコマンドをMCPツールとして提供します。Salesforce CLIから利用可能なすべてのコマンドを自動的に検出して登録するだけでなく、最もよく使用されるコマンドを具体的に実装します。

コアツール

  • sf_version - Salesforce CLI のバージョン情報を取得する

  • sf_help - Salesforce CLI コマンドのヘルプ情報を取得します

  • sf_cache_clear - コマンド検出キャッシュをクリアする

  • sf_cache_refresh - コマンド検出キャッシュを更新する

プロジェクトディレクトリ管理(ルート)

Salesforce プロジェクトのコンテキスト(デプロイメントなど)を必要とするコマンドでは、プロジェクトディレクトリを指定する必要があります。MCP は、ファイルシステム MCP と同様に、複数のプロジェクトディレクトリ(ルート)をサポートします。

設定方法

方法1: コマンドライン引数経由

# 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

このように設定すると、ルートは自動的にroot1root2などの名前が付けられ、最初のものがデフォルトとして設定されます。

方法2: MCPツールを使用する

  • sf_set_project_directory - コマンドで使用する Salesforce プロジェクト ディレクトリを設定します

    • パラメータ:

      • directory - sfdx-project.json ファイルを含むディレクトリへのパス

      • name - (オプション) このプロジェクトルートの名前

      • description - (オプション) このプロジェクトルートの説明

      • isDefault - (オプション) このルートをコマンド実行のデフォルトとして設定します

  • sf_list_roots - 設定されたすべてのプロジェクトルートを一覧表示します

  • sf_detect_project_directory - ユーザーメッセージからプロジェクトディレクトリを検出しようとします

使用例:

# 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"

方法 3: Claude デスクトップ構成以下の説明に従って、 .claude.jsonでプロジェクト ルートを構成します。

プロジェクトルートの使用

特定のプロジェクト ルートでコマンドを実行できます。

# 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

デプロイ、ソース取得、その他のプロジェクト固有の操作などのコマンドを実行するには、プロジェクトディレクトリを指定する必要があります。複数のルートが設定されている場合、特に指定がない限り、デフォルトのルートが使用されます。

実装された主なツール

次のコマンドは具体的に実装されており、動作が保証されています。

組織管理

  • sf_org_list - Salesforce 組織の一覧

    • パラメータ: jsonverbose

  • sf_auth_list_orgs - 認証された Salesforce 組織を一覧表示する

    • パラメータ: jsonverbose

  • sf_org_display - 組織の詳細を表示する

    • パラメータ: targetusernamejson

  • sf_org_open - ブラウザで組織を開く

    • パラメータ: targetusernamepathurlonly

アペックスコード

  • sf_apex_run - 匿名の Apex コードを実行する

    • パラメータ: targetusernamefileapexcodejson

  • sf_apex_test_run - Apex テストを実行する

    • パラメータ: targetusernametestnamessuitenamesclassnamesjson

データ管理

  • sf_data_query - SOQLクエリを実行する

    • パラメータ: targetusernamequeryjson

  • sf_schema_list_objects - 組織内の sObject を一覧表示する

    • パラメータ: targetusernamejson

  • sf_schema_describe - Salesforce オブジェクトを記述する

    • パラメータ: targetusernamesobjectjson

展開

  • sf_project_deploy_start - ソースを組織にデプロイする

    • パラメータ: targetusernamesourcedirjsonwait

動的に検出されたツール

サーバーは利用可能なすべての Salesforce CLI コマンドを検出し、 sf_<topic>_<command>の形式でツールとして登録します。

例えば:

  • sf_apex_run - 匿名の Apex コードを実行する

  • sf_data_query - SOQLクエリを実行する

ネストされたトピック コマンドの場合、ツール名にはアンダースコアを含む完全なパスが含まれます。

  • sf_apex_log_get - Apexログを取得する

  • sf_org_login_web - Webフローを使用して組織にログインする

サーバーは、可能な場合は、一般的なネストされたコマンドの簡略化されたエイリアスも作成します。

  • sf_apex_log_getのエイリアスとしてのsf_get

  • sf_org_login_webのエイリアスとしてのsf_web

使用できるコマンドは、インストールされている Salesforce CLI プラグインによって異なります。

**注:**コマンド検出は起動時のパフォーマンス向上のためキャッシュされます。新しいSF CLIプラグインをインストールする場合は、 sf_cache_refreshツールを使用してキャッシュを更新し、サーバーを再起動してください。

リソース

次のリソースには、Salesforce CLI に関するドキュメントが提供されています。

  • sf://help - メインの CLI ドキュメント

  • sf://topics/{topic}/help - トピックのヘルプドキュメント

  • sf://commands/{command}/help - コマンドのヘルプドキュメント

  • sf://topics/{topic}/commands/{command}/help - トピックコマンドのヘルプドキュメント

  • sf://version - バージョン情報

  • sf://roots - 設定されているすべてのプロジェクトルートを一覧表示します

  • sf://roots/{root}/commands/{command} - 特定のプロジェクトルートでコマンドを実行する

仕組み

  1. 起動時に、サーバーはキャッシュされたコマンドのリスト( ~/.sf-mcp/command-cache.jsonに保存されている)をチェックします。

  2. 有効なキャッシュが存在する場合は、コマンドを登録するために使用されます。そうでない場合は、コマンドは動的に検出されます。

  3. 検出中に、サーバーはsf commands --json照会して、利用可能なコマンドの完全なリストを取得します。

  4. コマンドメタデータ(パラメータと説明を含む)はJSON出力から直接抽出されます。

  5. すべてのコマンドは適切なパラメータスキーマを持つMCPツールとして登録されます

  6. ヘルプドキュメント用のリソースが登録されています

  7. ツールが呼び出されると、対応するSalesforce CLIコマンドが実行されます。

プロジェクトルーツマネジメント

Salesforce プロジェクトコンテキストを必要とするコマンドの場合:

  1. サーバーは、 sf_set_project_directory経由でプロジェクトルートが設定されているかどうかを確認します。

  2. 複数のルートが設定されている場合は、特定のルートが指定されていない限り、デフォルトのルートが使用されます。

  3. ルートが設定されていない場合、サーバーはユーザーにプロジェクトディレクトリを指定するように要求します。

  4. コマンドは適切なプロジェクトディレクトリ内で実行され、適切なコンテキストが確保されます。

  5. ユーザーは必要に応じて複数のプロジェクトルートを追加したり切り替えたりすることができます。

プロジェクト固有のコマンド(デプロイ、取得など)は、適切なプロジェクトディレクトリで自動的に実行されます。プロジェクトのコンテキストを必要としないコマンドの場合、作業ディレクトリは関係ありません。

特定のプロジェクト ルートでコマンドを実行するには、次の操作を行います。

  • リソース URI の使用: sf://roots/{rootName}/commands/{command}

  • コマンドツールにrootNameパラメータを提供する(内部実装の詳細)

  • sf_set_project_directory --isDefault=trueを使用して特定のルートをデフォルトとして設定する

コマンドキャッシュ

起動パフォーマンスを向上させるために、MCP サーバーは検出されたコマンドをキャッシュします。

  • キャッシュは~/.sf-mcp/command-cache.jsonに保存されます。

  • すべてのトピック、コマンド、パラメータ、説明が含まれています

  • キャッシュには検証タイムスタンプとSF CLIバージョンチェックがあります

  • デフォルトでは、キャッシュは7日後に期限切れになります。

  • 新しいSalesforce CLIプラグインをインストールするときは、 sf_cache_refreshを使用してキャッシュを更新します。

キャッシュの問題のトラブルシューティング

サーバーの初回起動時には完全なコマンド検出が実行されるため、多少時間がかかる場合があります。コマンドの欠落やキャッシュの問題などの問題が発生した場合は、以下の手順に従ってください。

  1. MCP サーバーを停止します (実行中の場合)

  2. キャッシュファイルを手動で削除します: rm ~/.sf-mcp/command-cache.json

  3. サーバーを再起動します: npm start

これにより、公式の CLI メタデータを使用してすべてのコマンドの完全な再検出が強制されます。

特定のコマンドがまだ見つからない場合、または新しい SF CLI プラグインをインストールした場合:

  1. Claude Desktopのsf_cache_refreshツールを使用する

  2. MCPサーバーを停止して再起動します

ネストされたトピックの処理

Salesforce CLI は、複数レベルに渡る階層的なコマンド構造を持っています。この MCP サーバは、これらのネストされたコマンドを次のように処理します。

  • コロンで区切られたパスをアンダースコア形式に変換する ( apex:log:getsf_apex_log_get )

  • 可能な場合は、一般的なディープコマンドにエイリアスを提供します( sf_apex_log_getの場合はsf_get

  • ツール名に完全なコマンド階層を保持する

  • sf commands --json使用する

ネストされたトピック コマンドは、可能な場合は 2 回登録されます。1 回は完全な階層名で、もう 1 回は簡略化されたエイリアスで登録されるため、簡単に見つけて使用できます。

ライセンス

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
    -