salesforce-deployment-guard
Salesforce Deployment Guard MCP
ローカルのみで動作する Model Context Protocol サーバーで、Salesforce 形式のデプロイ証跡を構造化された検出結果と是正手順に変換します。
これはクリーンルーム方式のポートフォリオプロジェクトです。決定論的ルールと合成例を使用しており、Salesforce 組織、認証情報、LLM、テレメトリ、ネットワークアクセスは一切使用しません。
ツール
ツール | 目的 |
| 欠落メタデータ、無効な参照、Apex テストの失敗、権限の失敗、不正な XML、不明な証跡を分類します。 |
| 欠落した依存関係、重複、無効な名前、自己依存、循環を検出します。 |
| 広範なシステム権限、オブジェクトの Modify All、重複した変更、読み取りなし書き込みの組み合わせにフラグを立てます。 |
| 検出結果を決定論的な優先順位付きチェックリストに変換します。 |
すべてのツールは読み取り専用で、人間が読めるテキストと構造化 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 buildMCP クライアントを接続する
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 textsrc/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 toolsanalyze_deployment_logAnalyze Salesforce Deployment LogARead-only
Classify common Salesforce deployment failures using deterministic, local-only rules.
Inputs: log (required). Returns: status, findings
assess_permission_riskAssess Salesforce Permission RiskARead-only
Review synthetic permission changes for broad access and least-privilege concerns.
Inputs: changes (required). Returns: risk, findings
build_remediation_planBuild Salesforce Deployment Remediation PlanBRead-only
Turn diagnostic findings into a deterministic, prioritized remediation checklist.
Inputs: findings (required). Returns: steps, status
validate_metadata_manifestValidate Salesforce Metadata ManifestARead-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
Scored across 4 tools
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.
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.
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.
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
Detects database migration table locks, terraform cost leaks, and OWASP API flaws.
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Generate SBOMs, scan vulnerabilities, and analyze dependencies from local projects or Git repos.
Deep security scans of repos you own from your editor: dependency CVEs, SAST, git-history secrets.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables auditors to scan cloud IAM policies for privilege-escalation paths, wildcards, and risky grants directly within Cursor or Claude Code, using a deterministic rule engine that runs entirely on local infrastructure.1-
- FlicenseNot gradedqualityNot gradedmaintenanceEnables 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.-
- AlicenseNot gradedqualityDmaintenanceEnables 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
- AlicenseNot gradedqualityCmaintenanceEnables 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.2MIT