mcp-audit GitHub

Open-source MCP and AI agent security scanner

Exposure management for your AI agent stack.

Your developers have installed MCP servers and agent tools that your existing scanners don't inventory. mcp-audit discovers them across 10 AI clients, matches them against published advisories, and shows what each one can reach. It runs on your machine: a default scan reads files, never runs them, and makes no network calls.

pip install mcp-audit-scannermcp-audit scan --project . --include-agent-files

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.

Install and run For security teams

Current release: 0.32.0, released 2026-11-16. Apache 2.0, every feature free.

mcp-audit in 58 seconds: why agent files are a risk, how a scan works, and what it checks. No sound; every point is on screen.

What it reads in a repository

your-repo/
  • Can start a program: .mcp.jsonTRUSTCREDSCTOXIC
  • Can start a program: opencode.jsonTRUSTCREDSCTOXIC
  • Can start a program: opencode.jsoncTRUSTCREDSCTOXIC
  • Read as instructions: CLAUDE.mdMEM
  • Read as instructions: CLAUDE.local.mdMEM
  • Read as instructions: AGENTS.mdMEM
  • Read as instructions: AGENTS.override.mdMEM
  • Read as instructions: SOUL.mdMEM
  • Read as instructions: USER.mdMEM
  • Read as instructions: MEMORY.mdMEM
  • Read as instructions: HEARTBEAT.mdMEM
  • .agents/
    • Read as instructions: skills/**/SKILL.mdSKILL
  • .amazonq/
  • .claude/
    • Can start a program: settings.jsonTRUSTHARNESSPERMSANDBOXHOOK
    • Can start a program: settings.local.jsonTRUSTHARNESSPERMSANDBOXHOOK
    • Can start a program: scheduled_tasks.jsonTRUST
    • Can start a program: workflowsTRUST
    • Read as instructions: commands/*.mdSKILL
    • Read as instructions: skills/**/SKILL.mdSKILL
    • Read as instructions: CLAUDE.mdMEM
    • Read as instructions: agents/**/*.mdAGENT
    • Read as instructions: rules/**/*.mdMEM
    • Read as instructions: AGENTS.mdMEM
  • .codex/
  • .cursor/
  • .gemini/
  • .github/
    • Read as instructions: skills/**/SKILL.mdSKILL
    • Read as instructions: copilot-instructions.mdSKILL
    • Read as instructions: instructions/*.instructions.mdSKILL
    • Read as instructions: prompts/*.prompt.mdSKILL
    • Can start a program: workflows/*.ymlWORKFLOW
  • .mcphub/
    • Can start a program: servers.jsonTRUST
  • .vscode/

can start a program, on your machine or in CI is read by the agent as instructions

Taken from the scanner's own discovery lists. The tags are the finding families checked in each file.

What it checks

225 finding IDs, grouped by what mcp-audit reads. The catalog shows what each one flags, its severity and its OWASP MCP Top 10 category.

Repository files that run code8 checks

Files a cloned repository can use to start programs when you open or trust it: project MCP configs, VS Code tasks that run when the folder opens, auto-run files for Gemini CLI, Codex and Claude Code, git settings and hooks that run a program when an agent runs git, and symlinks that point somewhere else.

TRUST

AI agents in CI workflows3 checks

GitHub Actions workflows where an AI coding agent step reads text a stranger can write, such as an issue or a comment, while it holds secrets, write access and tools that can run commands. Workflow files are parsed as data and never run.

WORKFLOW

Coding-agent settings and permission rules39 checks

Claude Code settings that skip permission prompts, approve every project server, or pre-approve commands that can write or reach the network. Permission rules that Claude Code ignores or that are not a boundary. Sandbox settings a repository can loosen. Hook commands that reach the network or touch agent config files. Servers that your organisation's managed Claude Code policy would block, policy set only where the user can change it, safety settings that got weaker since the last scan, editor extension allowlists that are not enforced, and credential files a session can read without a prompt.

CFHYGEXTPOLGUARDHARNESSHOOKMANAGEDPERMREACHSANDBOX

Agent instruction files, skills and subagents22 checks

Text the agent reads as instructions: Claude Code commands, CLAUDE.md and AGENTS.md files, the files they import, Cursor rules, and Copilot instruction and prompt files. mcp-audit looks for injected orders, hidden characters, outside links and heartbeat files that hide a step. It reads every file in a Claude Code skill, not only SKILL.md, for install steps that run remote code. It reads subagent definitions for looser permissions, hooks and their own MCP servers, and reports when an instruction file changed since the last scan.

AGENTINSTRMEMSKILL

Claude Code plugins and mods10 checks

Installed plugins whose recorded version or checkout does not match their marketplace pin, or that follow an unpinned branch, and mods that can approve tool calls, read secrets and send data out, change what Claude reads, or start programs. Mods are read, never run.

MODPLUGIN

MCP server configs20 checks

How each configured server is launched and reached: secrets written into the config, plain-HTTP endpoints, sudo launches, unpinned package fetches, remote servers with no authentication, and config files other users can read or write. If a check crashes on a server, the scan reports it instead of passing that server as clean.

AUTHCFHYGCREDSCANTRANSPORT

Tool descriptions29 checks

Orders hidden in the descriptions an agent reads: exfiltration instructions, prompt-format injection, behaviour overrides, invisible Unicode and lookalike characters. With --connect it reads live tool lists, flags a tool name claimed by two servers, and flags descriptions that name another server's tool or tell the agent to rewrite other tools' arguments. It also flags a tool marked read-only whose own inputs run commands or write.

ANNOTCOLLIDEDELEGPOISON

Dangerous combinations of servers12 checks

Servers that are harmless alone but together let an injected prompt read data and send it out, including by posting to GitHub, Slack or Jira, or write a file another server can run. killchain ranks the changes that break the most paths.

INTEGTOXIC

Packages and supply chain18 checks

Lookalike package names, unscoped twins of known servers, packages listed as malicious in OSV, recorded advisories for a package, deprecated versions, and missing or mismatched Sigstore provenance. Provenance, hash and CVE checks use the network, so they are opt-in.

ATTESTSCVULN

Approved servers and drift23 checks

What changed since you approved a setup: servers added, removed or launched differently, a hand-edited lock file, and, with --connect, tools added or changed since approval. A server started through mcp-audit run is checked against the lock as it launches and while it runs, and a policy can require every server to be wrapped that way.

BLLOCKRUGPULLRUNWRAP

Community rules41 checks

YAML rules in an open format that run on every scan: risky launch commands, inline code, shell metacharacters, sensitive variable names, sampling, and more.

COMMSTDIO

Browse the full catalog

Two ways in

The same scanner, from one developer's laptop to every repository and machine in an organisation. A plain scan uses no network, and the commands that do are listed on the security page.

For developers

  • Check a server before you install it

    mcp-audit vet @modelcontextprotocol/server-filesystem

    Publisher, recorded advisories, capabilities and lookalike names, offline.

  • Scan a cloned repo before your editor trusts it

    mcp-audit scan --project . --include-agent-files

    Project MCP configs, agent settings, editor auto-run files and instruction files.

  • Grade your setup and apply safe fixes

    mcp-audit check

    The top findings with a fix for each. mcp-audit fix shows the safe fixes as a diff; --apply writes them.

  • See findings as you work

    Use the editor extension for VS Code and Cursor and pre-commit hooks.

Developer quick start

For security teams

  • Gate pull requests in CI

    The GitHub Action uploads SARIF to code scanning, fails at the severity you choose and verifies mcp-lock.json against the servers you approved.

  • Enforce what is allowed

    A .mcp-audit-policy.yml file sets approved servers, a minimum score, transport rules and finding tolerances. Scans find it on their own.

  • See every machine

    mcp-audit shadow lists servers nobody approved; mcp-audit merge turns many machines' scans into one fleet report.

  • Keep evidence

    CycloneDX SBOMs, Sigstore-signed snapshots you can replay later, and a PDF report from scan --report pdf.

  • Feed your vulnerability management

    SARIF, Nucleus Security FlexConnect through push-nucleus, and NDJSON streams for a SIEM.

Guide for security teams

Fits the tools you already run

Open formats in, open formats out. No agent to deploy and no service to connect.

  • GitHub code scanningSARIF output with the OWASP MCP Top 10 taxonomy.
  • GitHub ActionsA composite Action, pinned to v0.32.0, that scans, uploads SARIF and gates the job.
  • pre-commit2 hooks: a scan, and lock verification that blocks drift.
  • VS Code and CursorAn Open VSX extension that shows findings inline as you edit.
  • Nucleus SecurityFlexConnect output and a direct push for vulnerability management programs.
  • CycloneDXSBOMs and AI/ML-BOM snapshots, optionally signed with Sigstore.
  • OSVA signed advisory feed with a bundle osv-scanner can read.
  • SIEMNDJSON from snapshot --stream and shadow --continuous, with Splunk and Sentinel recipes.

CI, editor and output setup

Look up a server before you install it

The registry lists 56 MCP server packages (45 npm, 11 PyPI). 26 have a verified publisher. 15 have recorded advisories, and 5 of those have at least one with no fix. Each package has a page and a JSON verdict.

Browse the registry Add your server

Why remote servers matter

  • A measurement study found that 40.55% of 7,973 live remote MCP servers expose tools without authentication (arXiv 2605.22333). AUTH-001 flags a remote server in your config that sends no credentials.
  • Censys counted 12,520 MCP services reachable from the internet (MCP Servers on the Internet).

We publish our false positives

We scanned the 100 most-downloaded MCP servers on npm and published every aggregate number. mcp-audit's poisoning rules raised 661 findings, and none of them was a real attack. 488 of them came from one rule, POISON-060, which the data shows misfiring.

What we measured

Recent releases

The lead lines of the newest entries in the changelog.

0.32.0 2026-11-16

  • CRED-006: a Claude Code settings file that a container image or npm package will ship
  • Known-malicious packages that npx ran on this machine (SC-011, CRITICAL; STORY-0158)
  • Skills in every agent's skills directory, not only Claude Code's

0.31.0 2026-11-16

  • agent-files scan now checks AGENTS.md, CLAUDE.md, GEMINI.md and .cursorrules left in Downloads and Desktop (MEM-007, MEDIUM), and flags instruction files that tell the agent to edit a machine-wide agent config, change the model base URL, or turn approvals off (MEM-008; HIGH outside a git repository, MEDIUM inside one)
  • HOOK-004 / HOOK-005: guard hooks that will never run, and Cursor hooks.json files
  • CRED-005: a secret in a permission rule that git history still holds
  • Registry: this week's malicious MCP packages, the MCP Inspector RCE, and affected for CVE-2026-88968

0.30.0 2026-11-11

  • mcp-audit run: launch an MCP server through mcp-audit
  • mcp-audit run can refuse a server that isn't approved
  • mcp-audit run checks the tools a server offers while it runs
  • mcp-audit run also checks live tool text for poisoning

Read the full changelog

Open source, with nothing held back

mcp-audit is Apache 2.0. Every command ships in the free package: no license keys, no seats, no account and no paid tier. The source, the test suite, the detection sources and the known gaps are all public.

The community rule format is open. Accepted rules are credited in the changelog and in the contributors list.

Source on GitHub Write a rule