Skip to main content
Glama
qpulce-dev

salesforce-deployment-guard

by qpulce-dev

Salesforce Deployment Guard MCP

CI

ローカルのみで動作する Model Context Protocol サーバーで、Salesforce 形式のデプロイ証跡を構造化された検出結果と是正手順に変換します。

これはクリーンルーム方式のポートフォリオプロジェクトです。決定論的ルールと合成例を使用しており、Salesforce 組織、認証情報、LLM、テレメトリ、ネットワークアクセスは一切使用しません。

ツール

ツール

目的

analyze_deployment_log

欠落メタデータ、無効な参照、Apex テストの失敗、権限の失敗、不正な XML、不明な証跡を分類します。

validate_metadata_manifest

欠落した依存関係、重複、無効な名前、自己依存、循環を検出します。

assess_permission_risk

広範なシステム権限、オブジェクトの Modify All、重複した変更、読み取りなし書き込みの組み合わせにフラグを立てます。

build_remediation_plan

検出結果を決定論的な優先順位付きチェックリストに変換します。

すべてのツールは読み取り専用で、人間が読めるテキストと構造化 JSON の両方を返します。

Related MCP server: Security & GRC MCP Server

クイックスタート

必要条件: Node.js 20.19 以降。

git clone https://github.com/qpulce-dev/salesforce-deployment-guard-mcp.git
cd salesforce-deployment-guard-mcp
npm ci
npm run verify
npm run build

MCP クライアントを接続する

Codex CLI:

codex mcp add salesforce-deployment-guard -- node "/absolute/path/to/salesforce-deployment-guard-mcp/dist/server.js"

Claude Desktop 互換の設定:

{
  "mcpServers": {
    "salesforce-deployment-guard": {
      "command": "node",
      "args": [
        "/absolute/path/to/salesforce-deployment-guard-mcp/dist/server.js"
      ]
    }
  }
}

MCP 設定を変更した後、クライアントを再起動してください。

実際の MCP トランスクリプト

ビルド済みサーバーに stdio 経由で接続した実際の MCP クライアントから取得したものです:

connected: salesforce-deployment-guard-mcp
tools: analyze_deployment_log, validate_metadata_manifest, assess_permission_risk, build_remediation_plan
call: analyze_deployment_log
arguments: {"log":"Error: no CustomField named Demo__c.Region__c found"}
{
  "status": "issues_found",
  "findings": [
    {
      "code": "SF_MISSING_METADATA",
      "category": "missing_dependency",
      "severity": "error",
      "evidence": "Error: no CustomField named Demo__c.Region__c found",
      "likelyCause": "A referenced metadata component is absent from the deployment set or target org.",
      "nextChecks": [
        "Confirm the referenced component exists in source control.",
        "Add the dependency to the deployment manifest before its consumer."
      ]
    }
  ]
}

fixtures/ ディレクトリには追加の合成入力が含まれています。

アーキテクチャ

MCP client
  -> Zod input schema
  -> small tool handler
  -> deterministic domain function
  -> structured JSON + concise text
  • src/server.ts はツールを登録し、stdio の起動を管理します。

  • src/domain/ には純粋な診断ロジックと計画ロジックが含まれます。

  • src/tools/result.ts は安定した MCP レスポンスを整形します。

  • tests/ はドメインの動作、プライバシールール、実際の stdio MCP ハンドシェイクをカバーします。

  • fixtures/ には合成例のみが含まれます。

検証

npm run verify

このコマンドは、フォーマット、ESLint、厳格な TypeScript チェック、39 件のテスト、本番ビルド、プライバシースキャンを実行します。MCP スモークテストは、ビルド済みサーバーを起動し、クライアント接続をネゴシエートし、4 つのツールすべてを一覧表示し、1 つのツールを呼び出します。

CI は Node.js 20.19 と 22 で同じ検証を実行します。

プライバシーとセキュリティ

  • 実行時のネットワーク呼び出しはありません。

  • データの永続化やテレメトリはありません。

  • 環境変数や認証情報は必要ありません。

  • 入力は分析前に制限されます。

  • エラーはスタックトレースやローカルパスを返しません。

  • 含まれる例では、Demo__c や Demo_Access などの名前を使用しています。

  • プライバシースキャナーは、ファイルとルールの識別子のみを報告し、一致したシークレットテキストは決して報告しません。

追加のローカル組織名チェックを行う場合:

PRIVATE_ORG_NAMES="Private Org One,Private Org Two" npm run privacy:scan

実際の本番ログを公開の issue、コミット、fixtures に貼り付けないでください。

制限事項

このサーバーは決定論的なレビューガイダンスを提供します。Salesforce に接続したり、実組織に対して検証したり、セキュリティレビューの代わりになったり、デプロイの成功を保証したりすることはありません。不明な証跡は unknown として分類されたままです。

ライセンス

MIT © 2026 Queanu Pulce

Available Tools

4 tools
analyze_deployment_logAnalyze Salesforce Deployment LogA
Read-only

Classify common Salesforce deployment failures using deterministic, local-only rules.

ParametersJSON Schema
NameRequiredDescriptionDefault
logYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
statusYes
findingsYes

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the tool is known to be safe. The description adds meaningful behavioral context: 'deterministic, local-only rules' indicates that it does not depend on external services or randomness. This goes beyond the annotation coverage without contradicting it.

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, dense sentence that front-loads the core action and key constraints. Every word contributes value, with no filler or repetition.

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

Completeness4/5

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

The tool is simple (one parameter) and has an output schema, so return values need no explanation. The description conveys the purpose, the deterministic and local nature, and the scope ('common' failures). It lacks explicit guidance on what to pass as the log, but the parameter name and title make this reasonably clear. Overall, it is complete for an agent to call the tool correctly.

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?

Schema description coverage is 0% and the description does not elaborate on the expected format or content of the 'log' parameter beyond the name and the implied context of deployment logs. It provides some meaning through the tool title and phrase 'deployment failures,' but the agent must infer what a valid log looks like. This is only minimally sufficient compensation for the missing schema description.

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

Purpose5/5

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

The description uses a specific verb ('classify') and resource ('common Salesforce deployment failures'), and adds a distinguishing method ('deterministic, local-only rules'). It clearly separates this from sibling tools that validate, assess, or build plans.

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 the tool is used when you have a deployment log to classify, but it does not explicitly state when to use it versus the siblings, nor when not to use it. The context is inferable from the tool name and description, but no alternatives or exclusions are given.

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

assess_permission_riskAssess Salesforce Permission RiskA
Read-only

Review synthetic permission changes for broad access and least-privilege concerns.

ParametersJSON Schema
NameRequiredDescriptionDefault
changesYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
riskYes
findingsYes

TDQS

A3.8/5.0
Behavior4/5

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

Annotations indicate read-only behavior, and the description aligns with that by using 'review'. It adds useful context about the focus (broad access and least-privilege) beyond the bare annotation, which helps the agent understand the tool's purpose without overexplaining.

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, focused sentence with no redundant words. It immediately conveys the primary action and intent, making it easy to parse and understand.

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?

The description gives a clear purpose but omits details about input/output behavior, such as what the tool returns or how to interpret results. Given that an output schema exists, the description does not need to elaborate on return, but it could mention expected usage patterns or any prerequisites. It is adequate but not thorough.

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

Parameters2/5

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

The description offers minimal insight into the 'changes' parameter. It implies that 'changes' are permission changes, but does not explain the structure, required fields, or enums present in the schema. Since schema coverage from the description is 0%, the description does not compensate for the lack of parameter documentation.

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

Purpose5/5

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

The description clearly states a specific action ('review') and a specific subject ('synthetic permission changes') with a clear objective ('broad access and least-privilege concerns'). It distinguishes itself from sibling tools like 'analyze_deployment_log' and 'validate_metadata_manifest' which focus on other aspects.

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 when to use the tool (when reviewing permission changes for broad access and least-privilege) but does not explicitly contrast it with alternatives or state exclusion criteria. The sibling tools are not mentioned, so an agent might not know whether to pick this over 'build_remediation_plan' without additional context.

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

build_remediation_planBuild Salesforce Deployment Remediation PlanB
Read-only

Turn diagnostic findings into a deterministic, prioritized remediation checklist.

ParametersJSON Schema
NameRequiredDescriptionDefault
findingsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
stepsYes
statusYes

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds behavioral context by saying the output is deterministic and prioritized, but it does not disclose ordering logic, edge-case handling, or whether anything is persisted. This is adequate for a read-only transformation but not rich.

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 front-loaded sentence with no filler. Every word contributes meaning: it specifies input, transformation, determinism, prioritization, and output.

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?

The purpose and return intent are clear, and the output schema presumably covers the return structure. However, the description lacks usage guidance and adequate parameter semantics, making it incomplete for an agent that must decide when to call this tool and how to prepare the findings input.

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

Parameters2/5

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

Schema description coverage is 0%, and the description only references 'diagnostic findings' without explaining the structure or meaning of the findings array. The nested schema defines required fields and enums, but the description does not compensate for the lack of schema descriptions by clarifying what constitutes a finding or how the fields should be interpreted.

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

Purpose5/5

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

The description uses a specific verb ('Turn') with a clear resource ('diagnostic findings') and a concrete output ('deterministic, prioritized remediation checklist'). This differentiates it from siblings like analyze_deployment_log, validate_metadata_manifest, and assess_permission_risk, which focus on analysis, validation, and risk assessment rather than remediation planning.

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 does not state when to use this tool versus its siblings, nor does it mention prerequisites or downstream usage. It implies 'diagnostic findings' as input but never explains that the tool should be run after diagnosis or how it relates to the analyze/validate/assess pipeline.

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

validate_metadata_manifestValidate Salesforce Metadata ManifestA
Read-only

Detect missing dependencies, duplicate entries, invalid names, self-references, and dependency cycles.

ParametersJSON Schema
NameRequiredDescriptionDefault
componentsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
validYes
findingsYes
componentCountYes

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the description does not need to restate safety. It adds value by disclosing the specific types of issues it detects, which is beyond the annotations and helps the agent understand what to expect from the validation.

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, information-dense sentence that front-loads the verb 'Detect' and lists all validations. There is no filler or redundant wording, making it highly efficient.

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?

The tool has one undocumented parameter (high schema coverage gap) and the description provides no guidance on how to construct the 'components' input. While an output schema exists (so return format is covered), the missing parameter explanation makes the description incomplete for a tool that expects a complex array structure.

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

Parameters2/5

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

Schema description coverage is 0%, and the description does not explain the 'components' parameter at all. The schema structures the input (array of objects with name, type, dependsOn) but without descriptions, the agent is left to infer the meaning. The description should clarify what 'components' represents and the expected format, but it remains silent.

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

Purpose5/5

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

The description uses the specific verb 'Detect' and lists the exact validation checks (missing dependencies, duplicate entries, invalid names, self-references, dependency cycles). This clearly distinguishes it from sibling tools like analyze_deployment_log or build_remediation_plan, which address different concerns.

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 when to use this tool (when validating a manifest) but does not explicitly state when not to use it or provide alternatives. Sibling names are different enough that an agent can infer the purpose, but there is no explicit routing guidance.

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
    • First observedanalyze_deployment_log
    • First observedassess_permission_risk
    • First observedbuild_remediation_plan
    • First observedvalidate_metadata_manifest

TDQS

A4/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct role in the deployment-guard workflow: analyzing logs, validating manifests, reviewing permissions, and generating remediation plans. There is no overlap or ambiguity between them.

Naming Consistency5/5

All tool names follow the same verb_noun pattern (analyze_, validate_, assess_, build_), creating a predictable and consistent naming convention that makes it easy for an agent to infer each tool's purpose.

Tool Count5/5

Four tools is well-scoped for a deployment guard server. The set covers the essential phases—diagnosis, validation, risk assessment, and remediation—without unnecessary bloat or missing core functionality.

Completeness4/5

The four tools form a coherent pipeline from failure analysis through remediation planning. Minor gaps exist, such as no direct tool for retrieving raw deployment logs or applying fixes, but these are likely outside the server's declared guard purpose.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables local security scanning and compliance gap analysis for code and text, detecting secrets, PII, and OWASP vulnerabilities, and assessing readiness across major frameworks like NCA, ISO 27001, NIST CSF, and SOC 2.
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables security review of code diffs and files in Cursor/VS Code using local rule-based analysis with the same rule IDs as CI, no cloud required.
    -
  • A
    license
    A
    quality
    C
    maintenance
    Enables local SOC 2 compliance work by scanning Infrastructure-as-Code, mapping findings to SOC 2 Trust Services Criteria, explaining risks in plain English, and drafting audit-ready documents without uploading files.
    16
    1
    MIT