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-scannerOr 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:
| Install | Adds |
|---|---|
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
Before you install a server
mcp-audit vet @modelcontextprotocol/server-filesystemRegistry 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 jsonfor the verdict document.Before you open a cloned repo
mcp-audit scan --project ./cloned-repo --include-agent-filesWalks the repo for MCP configs, agent settings, editor auto-run files and instruction files, and reports what each can do.
On your machine
mcp-audit checkmcp-audit fixmcp-audit fix --applycheckgives a grade and the top findings with a fix for each.fixshows the safe fixes as a diff;--applywrites them and keeps a.bakcopy.Lock what you approved
mcp-audit lockgit add mcp-lock.jsonmcp-audit lock --verifylockrecords the approved servers, never secret values.lock --verifyexits 1 when anything drifts;lock --acceptrecords a reviewed change.Find servers nobody approved
mcp-audit shadow --allowlist .mcp-audit-allowlist.ymlLists every MCP server on the machine as sanctioned or shadow (OWASP MCP09). Add
--continuousto emit events when configs change.Cut the blast radius
mcp-audit killchainRanks 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: truePin the Action to a release tag. Before 1.0 there is no floating major tag such as @v1.
All 14 inputs
| Input | Default | What it does |
|---|---|---|
mode | scan | Action mode: scan (default — full static analysis) or diff (MCP-aware diff between two git refs, suitable for PR comments). |
config-paths | none | Space-separated list of paths to MCP config files or directories to scan. |
severity-threshold | high | Minimum severity to fail the build. |
sarif-output | mcp-audit.sarif | Path to write SARIF output file. |
upload-sarif | true | Upload SARIF to GitHub Code Scanning automatically. |
check-vulns | false | Run OSV.dev dependency vulnerability scan (Layer 3). |
verify-signatures | false | Run Sigstore signature verification (Layer 2). |
run-sast | false | Also run mcp-audit SAST analysis against the path specified by sast-path. |
sast-path | src/ | Path to run SAST analysis against. |
baseline-name | none | Name of a saved baseline to compare against. |
fail-on-findings | true | Fail the workflow step if findings meet or exceed severity-threshold. |
lock-verify | false | Verify mcp-lock.json (if one exists in the repo) via mcp-audit lock --verify. |
lock-resolve | false | With lock-verify, also re-resolve floating specs against the registry (network access; produces LOCK-004 for drifted versions). |
version | latest | mcp-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-verifymcp-audit: Scan MCP server configuration files for security vulnerabilities (runsmcp-audit scan --severity-threshold high).mcp-audit-lock-verify: Block a commit that drifts from the reviewed mcp-lock.json (runsmcp-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 --formatwritesterminal,json,sarif,nucleus. SARIF carries OWASP MCP Top 10 codes into GitHub code scanning.dashboardopens a self-contained HTML attack graph; nothing is loaded from a CDN.scan --report pdfwrites a PDF report.sbomandsnapshotwrite CycloneDX documents;snapshot --streamemits one finding per line for a SIEM.push-nucleussends a scan to Nucleus Security through its FlexConnect API, andmergecombines 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.
| Command | What it does |
|---|---|
mcp-audit advise | Scan TARGET and publish signed, OSV-compatible advisories to ./feed. |
mcp-audit check | One-command security verdict: grade, top findings, and fix hints. |
mcp-audit dashboard | Run a full scan and open an interactive attack-graph dashboard. |
mcp-audit diff | MCP-aware diff for PRs and CI gates. |
mcp-audit discover | List all detected MCP clients and server configurations. |
mcp-audit fix | Apply safe remediations directly to MCP config files. |
mcp-audit killchain | Find the 2–3 changes that cut your blast radius. |
mcp-audit lock | Write, verify, or re-accept a committable MCP server lock. |
mcp-audit merge | Merge JSON scan outputs from multiple machines into a fleet report. |
mcp-audit pin | Record current MCP server configurations as the trusted baseline. |
mcp-audit push-nucleus | Run a scan and push results to Nucleus Security via FlexConnect API. |
mcp-audit register | Opt-in registration: get new rule notifications and follow-up support. |
mcp-audit sast | Scan MCP server source code with Semgrep SAST rules. |
mcp-audit sbom | Generate a CycloneDX 1.5 SBOM for all MCP servers in PATH. |
mcp-audit scan | Scan MCP configurations for security issues. |
mcp-audit shadow | Find your shadow MCP servers — OWASP MCP09. |
mcp-audit snapshot | Time-stamped signed forensic snapshots of every MCP server on this host. |
mcp-audit update-registry | Fetch the latest known-server registry from the upstream repository. |
mcp-audit verify | Verify package integrity by comparing hashes against registry pins. |
mcp-audit version | Show version information. |
mcp-audit vet | Pre-install verdict on a public MCP server package. |
mcp-audit watch | Continuously monitor MCP configs and scan on changes. |
mcp-audit agent-files discover | Discover agent instruction and memory files across supported AI clients. |
mcp-audit agent-files scan | Scan agent instruction and memory files for security issues. |
mcp-audit baseline save | Capture a baseline snapshot of the current MCP configuration. |
mcp-audit baseline list | List all saved baselines. |
mcp-audit baseline compare | Compare the current MCP configuration against a saved baseline. |
mcp-audit baseline delete | Delete a saved baseline. |
mcp-audit baseline export | Write a baseline as raw JSON to stdout (pipeable) or a file. |
mcp-audit extensions discover | Discover installed IDE extensions across supported AI coding clients. |
mcp-audit extensions scan | Scan installed IDE extensions for security issues. |
mcp-audit feed verify | Re-canonicalize and verify every signature in a feed directory. |
mcp-audit plugins discover | List installed Claude Code plugins, their source pin, and what they ship. |
mcp-audit plugins scan | Scan installed Claude Code plugins: pin integrity, mods, skills, MCP servers. |
mcp-audit policy validate | Validate a governance policy file (schema check only). |
mcp-audit policy init | Write a commented governance policy template to disk. |
mcp-audit policy check | Evaluate governance policy violations only (no full security scan). |
mcp-audit rule validate | Validate a rule file without running a scan. |
mcp-audit rule test | Test a rule file against a specific MCP config file. |
mcp-audit rule list | List all currently loaded rules (bundled + user-local). |
Documentation
The full documentation lives in the repository. Start with the README and the changelog.
- docs-usage.md Getting started, all CLI commands and flags, common workflows
- github-action.md GitHub Action setup, example workflows, exit code behaviour
- building-binaries.md How the shipped PyInstaller binary is built (one composite, CI and release); per-release CycloneDX SBOMs
- scoring.md Scan score methodology, grade thresholds, score/filter interaction
- telemetry.md Privacy policy: what mcp-audit does and does not collect
- baselines.md Baseline snapshot workflow, drift detection, commands
- governance.md Governance policy schema, quickstart, worked examples
- writing-rules.md Policy-as-code YAML rule format, match types, contributing
- sast-rules.md Semgrep rule catalog, severity rationale, false positive guidance
- extensions.md IDE extension scanner overview, supported clients, analysis layers
- supply-chain.md Supply chain attestation, hash verification, contribution guide
- dependency-reachability.md Why Dependabot findings in transitives are unused, and which call-site changes invalidate those dismissals
- severity-framework.md CVSS base scores and OWASP Agentic Top 10 mappings for every finding ID; decision tree for calibrating new findings
- registry.md Known-server registry reference, contributing entries
- registry-contributions.md How to submit new registry entries
- research/2026-10-top100-npm/ Scan of the 100 most-downloaded MCP servers on npm (2026-10-22): corpus, aggregate numbers, scripts
- nucleus-integration.md push-nucleus command, FlexConnect API, fleet push examples
- fleet-scanning.md Fleet merge workflow, asset prefix, enterprise deployment
- enterprise-deployment.md Fleet deployment guide for IT/security teams
- pre-commit.md Pre-commit hook setup and configuration
- contributing-rules.md Community detection rule contribution guide (template, bounty, attribution)
- contributing-sast-rules.md Semgrep SAST rule authoring guide
- community-rule-spec.md Community rule YAML format specification (Apache 2.0; ecosystem-adoptable)
- contributors.md Attribution list for accepted community contributors
- manual-test-matrix.md Release-candidate manual validation checklist
- offline-verification-findings.md Empirical test of cosign's *keyless* verification path with zero network access. Not about the advisory feed, which signs with a static key and is offline by construction — see the scope note at the top