Secure MCP tools before agents run them.

Local-first scanner for risky shell commands, leaked secrets, broad filesystem access, remote MCP endpoints, and unpinned packages.

Local-first No config upload Baseline mode Apache-2.0 open source
mcp-guard Scan completed · 2s
Risk Score 98 Critical
  • 2 Critical
  • 5 High
  • 2 Medium

Top Issues

Critical Shell injection via bash -c mcp-servers.json:12
High Broad filesystem access args: ["/"]
High Secret-like header configured Authorization=Bea...ken
SARIF HTML JSON
{
  "ruleId": "MCP010",
  "level": "error",
  "message": "Shell command executes inline script",
  "uri": "mcp-servers.json"
}
›_

Scan locally with the CLI

Fast, private, and simple enough for local review or pre-commit workflows.

npm i -g agent-mcp-guard
mcp-guard init
mcp-guard scan --policy .mcp-guard-policy.json --format html
  • Bootstrap a GitHub Action in one command
  • Detect risky shell commands and broad access
  • Enforce approved commands, packages, directories, and URLs
  • Redact secret-like env vars and headers
  • Output text, Markdown, HTML, JSON, and SARIF
View npm package
GH

Automate with GitHub Action

Block risky MCP config changes before they merge, with reports attached to the run.

- uses: ChaoYue0307/mcp-guard-action@v0.4.4
  with:
    config: .mcp.json
    # policy: .mcp-guard-policy.json
    baseline: .mcp-guard-baseline.json
    fail-on: high
    comment-pr: "true"
    upload-sarif: "true"
  • Deterministic action from the pinned tag
  • PR comment and job summary for review
  • Baseline mode for accepted known findings
  • SARIF upload for GitHub code scanning
View Marketplace listing Inspect failing demo PR

Ship review-ready reports

Turn raw config risk into a report a founder, security lead, or engineering team can act on.

98/100

Critical 2

High 5

Medium 2

  • Server inventory and finding table
  • Active vs baseline-accepted findings
  • Evidence and remediation guidance
  • Useful for internal security reviews
Ask about setup

Outputs that match developer workflows.

Use one scanner across local review, pull requests, artifacts, and GitHub Security. Reports are generated locally and secret-like values are redacted before output.

SARIF GitHub Security tab

Rules and findings map to SARIF 2.1.0 so teams can track MCP risks beside other code scanning alerts.

HTML Readable security report

Readable risk score, server inventory, severity summary, evidence, and remediation guidance.

JSON Automation and dashboards

Machine-readable active findings, accepted baseline findings, stable fingerprints, and summary counts.

Team-ready guardrail

Accept known findings. Block only new risk.

Real repositories rarely start clean. Baseline mode lets teams commit the current reviewed state, keep those findings visible, and fail pull requests only when new high-risk MCP changes appear.

mcp-guard scan --config .mcp.json \
  --write-baseline .mcp-guard-baseline.json

mcp-guard scan --config .mcp.json \
  --baseline .mcp-guard-baseline.json \
  --fail-on high
01 Generate

Create a JSON baseline with stable fingerprints for current findings.

02 Review

Commit the baseline after reviewing accepted risk and reasons.

03 Enforce

CI reports accepted findings but fails only on new active findings.

Transparent example

Inspect the exact input, command, and generated reports.

This is a reproducible example generated by the current CLI from a committed MCP config. The config is synthetic, but the findings and reports are real outputs from `mcp-guard`.

Input 3 MCP servers

Unpinned `npx`, broad `/` filesystem access, shell installer, remote endpoint, and secret-like values.

Result 9 findings · score 98

2 critical, 5 high, and 2 medium findings with rule IDs, evidence, and remediation guidance.

Artifacts Markdown, HTML, JSON, SARIF

Open the generated files and compare them against the input config.

Need help wiring this into a real repo?

mcp-guard is an automated local scanner. Paid setup pilots are available for teams that want the CLI, GitHub Action, baseline, PR comments, and SARIF reporting wired into a real repository without sending configs to a hosted service.

Solo / indie $199-500

One repo, one MCP config, workflow setup, baseline, and handoff note.

Startup team $750-2,000

Multiple configs, CI rollout, SARIF, rule feedback, and remediation notes.

Private pilot $2,000-5,000

Team workflow hardening and product feedback loop for real agent setups.

Setup pilot scope

  • Run the CLI against local MCP configs
  • Generate Markdown, HTML, JSON, and SARIF reports
  • Add the GitHub Action to pull request checks
  • Create a reviewed baseline for accepted known findings
  • Enable PR comments for active risk summaries
  • Collect missing patterns for future rules
  • Keep configs local and redact secret-like values
Contact for setup pilot