Skip to main content
Glama
salesforce-deployment-guard

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.

Inputs: log (required). Returns: status, findings

assess_permission_riskAssess Salesforce Permission RiskA
Read-only

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

Inputs: changes (required). Returns: risk, findings

build_remediation_planBuild Salesforce Deployment Remediation PlanB
Read-only

Turn diagnostic findings into a deterministic, prioritized remediation checklist.

Inputs: findings (required). Returns: steps, status

validate_metadata_manifestValidate Salesforce Metadata ManifestA
Read-only

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

Inputs: components (required). Returns: valid, findings, componentCount

Tool Schema Changelog

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

Loading tool schema changelog…

    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.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      Not graded
      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.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables safe, local DevOps inspection through a JSON-lines server with schema validation, path isolation, and redaction, supporting read-only Git operations, Kubernetes YAML validation, Terraform plan summaries, and sanitized log analysis.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables read-only diagnosis of deployment failures across AWS, Vercel, Docker, CI/CD, and application stacks by correlating project files, logs, and provider evidence into ranked findings with safe recommendations and verification steps.
      2
      MIT