Skip to main content
Glama
salesforce-deployment-guard

salesforce-deployment-guard

by qpulce-dev

Salesforce Deployment Guard MCP

CI

一个仅限本地的 Model Context Protocol 服务器,可将 Salesforce 风格的部署证据转化为结构化的发现结果和修复步骤。

这是一个净室(clean-room)作品集项目。它使用确定性规则和合成示例——不涉及 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 冒烟测试会启动构建后的服务器,协商客户端连接,列出全部四个工具,并调用其中一个工具。

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