mcp-audit GitHub

Install and run mcp-audit

One package, every command, no account. Current release: 0.21.1, released 2026-10-25.

Install

pip install mcp-audit-scanner

Or with uv: uv tool install mcp-audit-scanner. The package is mcp-audit-scanner; the command is mcp-audit. It needs Python 3.11 or later. Standalone binaries for macOS (Apple silicon), macOS (Intel), Linux (x86-64) and Windows (x86-64) are on GitHub Releases.

Optional extras add features that need more dependencies:

InstallAdds
mcp-audit-scanner[attestation]Sigstore provenance checks: scan --verify-signatures.
mcp-audit-scanner[mcp]Live connections: scan --connect and lock --connect.
mcp-audit-scanner[sbom]CycloneDX SBOM output: mcp-audit sbom.

First run, by job

  1. Before you install a server

    mcp-audit vet @modelcontextprotocol/server-filesystem

    Registry status, recorded advisories, capabilities and lookalike names for a public package. Exits 1 for an advisory with no fix or a lookalike name. Add --format json for the verdict document.

  2. Before you open a cloned repo

    mcp-audit scan --project ./cloned-repo --include-agent-files

    Walks the repo for MCP configs, agent settings, editor auto-run files and instruction files, and reports what each can do.

  3. On your machine

    mcp-audit checkmcp-audit fixmcp-audit fix --apply

    check gives a grade and the top findings with a fix for each. fix shows the safe fixes as a diff; --apply writes them and keeps a .bak copy.

  4. Lock what you approved

    mcp-audit lockgit add mcp-lock.jsonmcp-audit lock --verify

    lock records the approved servers, never secret values. lock --verify exits 1 when anything drifts; lock --accept records a reviewed change.

  5. Find servers nobody approved

    mcp-audit shadow --allowlist .mcp-audit-allowlist.yml

    Lists every MCP server on the machine as sanctioned or shadow (OWASP MCP09). Add --continuous to emit events when configs change.

  6. Cut the blast radius

    mcp-audit killchain

    Ranks the few changes that break the most attack paths between your servers.

In CI

GitHub Action

The Action installs mcp-audit, scans the MCP configs and Claude Code settings in the checked-out repository, uploads SARIF to GitHub code scanning, and fails the job at the severity you choose. With lock-verify, it also fails when the repo drifts from mcp-lock.json.

name: mcp-audit
on: [push, pull_request]
jobs:
  mcp-audit:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      security-events: write
    steps:
      - uses: actions/checkout@v4
      - uses: adudley78/mcp-audit@v0.21.1
        with:
          severity-threshold: high
          lock-verify: true

Pin the Action to a release tag. Before 1.0 there is no floating major tag such as @v1.

All 14 inputs
InputDefaultWhat it does
modescanAction mode: scan (default — full static analysis) or diff (MCP-aware diff between two git refs, suitable for PR comments).
config-pathsnoneSpace-separated list of paths to MCP config files or directories to scan.
severity-thresholdhighMinimum severity to fail the build.
sarif-outputmcp-audit.sarifPath to write SARIF output file.
upload-sariftrueUpload SARIF to GitHub Code Scanning automatically.
check-vulnsfalseRun OSV.dev dependency vulnerability scan (Layer 3).
verify-signaturesfalseRun Sigstore signature verification (Layer 2).
run-sastfalseAlso run mcp-audit SAST analysis against the path specified by sast-path.
sast-pathsrc/Path to run SAST analysis against.
baseline-namenoneName of a saved baseline to compare against.
fail-on-findingstrueFail the workflow step if findings meet or exceed severity-threshold.
lock-verifyfalseVerify mcp-lock.json (if one exists in the repo) via mcp-audit lock --verify.
lock-resolvefalseWith lock-verify, also re-resolve floating specs against the registry (network access; produces LOCK-004 for drifted versions).
versionlatestmcp-audit release tag to install (e.g. "v0.10.0") or "latest" to resolve the current latest release automatically.

pre-commit

Add to .pre-commit-config.yaml:

repos:
  - repo: https://github.com/adudley78/mcp-audit
    rev: v0.21.1
    hooks:
      - id: mcp-audit
      - id: mcp-audit-lock-verify
  • mcp-audit: Scan MCP server configuration files for security vulnerabilities (runs mcp-audit scan --severity-threshold high).
  • mcp-audit-lock-verify: Block a commit that drifts from the reviewed mcp-lock.json (runs mcp-audit lock --verify --if-present).

Pull request comments

mcp-audit diff <base> <head> --format pr-comment summarises what a pull request changes in MCP configs: servers, tools, credentials and endpoints, with a risk level. The Action's mode: diff input posts it for you.

In your editor

The mcp-audit extension on Open VSX (mcp-audit.mcp-audit-vscode) shows findings as you edit an MCP config in VS Code-compatible editors such as Cursor: underlines on the server, hover cards with the fix, and the grade in the status bar. It calls the mcp-audit command, so install the package first.

Output and integrations

  • scan --format writes terminal, json, sarif, nucleus. SARIF carries OWASP MCP Top 10 codes into GitHub code scanning.
  • dashboard opens a self-contained HTML attack graph; nothing is loaded from a CDN. scan --report pdf writes a PDF report.
  • sbom and snapshot write CycloneDX documents; snapshot --stream emits one finding per line for a SIEM.
  • push-nucleus sends a scan to Nucleus Security through its FlexConnect API, and merge combines scans from many machines into one fleet report.

Every command 40

Read from the source at build time. Run mcp-audit <command> --help for flags.

CommandWhat it does
mcp-audit adviseScan TARGET and publish signed, OSV-compatible advisories to ./feed.
mcp-audit checkOne-command security verdict: grade, top findings, and fix hints.
mcp-audit dashboardRun a full scan and open an interactive attack-graph dashboard.
mcp-audit diffMCP-aware diff for PRs and CI gates.
mcp-audit discoverList all detected MCP clients and server configurations.
mcp-audit fixApply safe remediations directly to MCP config files.
mcp-audit killchainFind the 2–3 changes that cut your blast radius.
mcp-audit lockWrite, verify, or re-accept a committable MCP server lock.
mcp-audit mergeMerge JSON scan outputs from multiple machines into a fleet report.
mcp-audit pinRecord current MCP server configurations as the trusted baseline.
mcp-audit push-nucleusRun a scan and push results to Nucleus Security via FlexConnect API.
mcp-audit registerOpt-in registration: get new rule notifications and follow-up support.
mcp-audit sastScan MCP server source code with Semgrep SAST rules.
mcp-audit sbomGenerate a CycloneDX 1.5 SBOM for all MCP servers in PATH.
mcp-audit scanScan MCP configurations for security issues.
mcp-audit shadowFind your shadow MCP servers — OWASP MCP09.
mcp-audit snapshotTime-stamped signed forensic snapshots of every MCP server on this host.
mcp-audit update-registryFetch the latest known-server registry from the upstream repository.
mcp-audit verifyVerify package integrity by comparing hashes against registry pins.
mcp-audit versionShow version information.
mcp-audit vetPre-install verdict on a public MCP server package.
mcp-audit watchContinuously monitor MCP configs and scan on changes.
mcp-audit agent-files discoverDiscover agent instruction and memory files across supported AI clients.
mcp-audit agent-files scanScan agent instruction and memory files for security issues.
mcp-audit baseline saveCapture a baseline snapshot of the current MCP configuration.
mcp-audit baseline listList all saved baselines.
mcp-audit baseline compareCompare the current MCP configuration against a saved baseline.
mcp-audit baseline deleteDelete a saved baseline.
mcp-audit baseline exportWrite a baseline as raw JSON to stdout (pipeable) or a file.
mcp-audit extensions discoverDiscover installed IDE extensions across supported AI coding clients.
mcp-audit extensions scanScan installed IDE extensions for security issues.
mcp-audit feed verifyRe-canonicalize and verify every signature in a feed directory.
mcp-audit plugins discoverList installed Claude Code plugins, their source pin, and what they ship.
mcp-audit plugins scanScan installed Claude Code plugins: pin integrity, mods, skills, MCP servers.
mcp-audit policy validateValidate a governance policy file (schema check only).
mcp-audit policy initWrite a commented governance policy template to disk.
mcp-audit policy checkEvaluate governance policy violations only (no full security scan).
mcp-audit rule validateValidate a rule file without running a scan.
mcp-audit rule testTest a rule file against a specific MCP config file.
mcp-audit rule listList all currently loaded rules (bundled + user-local).

Documentation

The full documentation lives in the repository. Start with the README and the changelog.