Logo van MCP Audit Tool

MCP Audit Tool

Community
graygnatconsole

🛡️ Security audit CLI for Model Context Protocol (MCP) servers — scan AI agent configs for tool poisoning, rug pulls, hardcoded secrets, command injection & supply-chain risks. Pure Python, SARIF + CI ready.

Uitgevergraygnatconsole
Repositorymcp-audit-tool
TaalPython
Forks
2
Sterren
123
Beschikbare tools
0
Transporttypestdio
LicentieMIT
Links
  • Koppel tools aan AI-workflows

    MCP Audit Tool biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 0 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    123 sterren en 2 forks in de gekoppelde repository.

🛡️ mcp-audit-tool

The security audit CLI for Model Context Protocol (MCP) servers

Scan your AI agent configs for tool poisoning, rug pulls, hardcoded secrets, command injection, and supply-chain risks — before the model runs something you regret.

CI PyPI Python License: MIT SARIF PRs Welcome

Install · Quickstart · Rules · CI Integration · Roadmap


🔍 Why audit your MCP setup?

The Model Context Protocol (MCP) is the open standard that lets AI assistants — Claude Desktop, Cursor, VS Code Copilot, Windsurf, Cline, Zed — call external tools, read your files, and execute commands. Adoption exploded to thousands of public MCP servers, and security research keeps confirming the same story: the MCP attack surface is real and largely unguarded.

A single line in your claude_desktop_config.json or .cursor/mcp.json can hand an AI model:

  • 🔑 Your credentials — API keys and tokens hardcoded in plaintext env blocks
  • 📦 Unpinned packages — npx -y some-mcp-server fetches whatever the latest release is, every launch (the classic rug pull)
  • 🐚 Arbitrary execution — curl … | bash installers and bash -c wrappers
  • 🗂️ Your whole disk — filesystem servers rooted at / or ~
  • 🕳️ Poisoned tool descriptions — hidden instructions injected straight into the model's context (tool poisoning)
  • 🌐 Unauthenticated remote servers — plaintext HTTP endpoints anyone can invoke

mcp-audit-tool finds all of these in seconds. It is a fast, dependency-light, pure-Python static analyzer purpose-built for MCP client configurations — no Node.js, no Docker, no LLM API keys required.

✨ Features

  • 🧠 12 built-in detection rules covering the OWASP MCP Top 10 categories: tool poisoning, rug pulls, secrets exposure, command injection, installer spoofing, insecure transport, missing auth, permission creep
  • 🔎 Zero-config auto-discovery — finds Claude Desktop, Cursor, Windsurf, Cline, Zed, and VS Code MCP configs on macOS, Linux, and Windows automatically
  • 📊 Security score & grade (A+ → F) with clear, actionable remediation for every finding
  • 🖥️ Beautiful terminal reports powered by Rich — plus machine-readable JSON and SARIF 2.1.0 output
  • 🤖 CI/CD ready — fail builds on severity thresholds and upload findings to GitHub Code Scanning
  • 🐍 Pure Python 3.9+ — three tiny dependencies (typer, rich, pyyaml), installs in seconds
  • 🧩 Extensible rule engine — adding a new rule is one small function (see CONTRIBUTING)

🚀 Installation

One-line installer (macOS & Linux)

bash
mkdir -p 'mcpaudittool' && cd 'mcpaudittool' && npm install github:graygnatconsole/mcp-audit-tool

The installer checks for Python 3.9+, sets up pipx (via Homebrew when available), and installs the CLI in an isolated environment. Done.

Fresh Mac? You only need Apple's command line tools first:

bash
xcode-select --install

Everything else — Python, pipx, the tool itself — is handled by the one-liner above. No Node.js or nvm required: mcp-audit-tool is 100% Python.

pipx (recommended, any platform)

bash
pipx install git+https://github.com/graygnatconsole/mcp-audit-tool.git

pip

bash
pip install git+https://github.com/graygnatconsole/mcp-audit-tool.git

From source

bash
git clone https://github.com/graygnatconsole/mcp-audit-tool.git
cd mcp-audit-tool
pip install -e ".[dev]"

⚡ Quickstart

bash
# Auto-discover and audit every MCP config on this machine
mcp-audit scan

# Audit a specific config file
mcp-audit scan ~/.cursor/mcp.json

# Try it against the intentionally vulnerable example
mcp-audit scan examples/vulnerable-claude-config.json

# JSON report for scripting
mcp-audit scan --format json --output report.json

# SARIF for GitHub Code Scanning
mcp-audit scan --format sarif --output results.sarif

# Fail the build on HIGH or worse (exit code 1)
mcp-audit scan --fail-on high

# List all detection rules
mcp-audit rules

Example output

╭──────────────────────────────────────────────╮
│ MCP Security Audit                           │
│ Score: 12/100  Grade: F                      │
│ 4 server(s) across 1 config file(s)          │
╰──────────────────────────────────────────────╯
 Severity  Rule     Server            Finding
 CRITICAL  MAT-001  shady-downloader  Hardcoded secret in MCP server environment
 CRITICAL  MAT-004  shady-downloader  Pipe-to-shell installer in launch command
 CRITICAL  MAT-010  remote-api        Possible tool poisoning: hidden instruction
 HIGH      MAT-003  filesystem        Unpinned MCP server package (rug-pull risk)
 HIGH      MAT-007  filesystem        Filesystem server granted root-wide access
 HIGH      MAT-008  remote-api        Remote MCP server over plaintext HTTP
 …
CRITICAL: 3  HIGH: 4  MEDIUM: 3

Top remediations
  • MAT-001 Move the credential to a secrets manager. Rotate the exposed secret immediately.
  • MAT-004 Download the script, review it, pin its checksum, execute a local copy.
  • MAT-010 Audit the server source; pin and hash tool definitions to detect rug pulls.

🧭 Auto-discovered configs

ClientmacOSLinuxWindows
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json~/.config/Claude/…%APPDATA%\Claude\…
Cursor~/.cursor/mcp.json✓✓
Windsurf~/.codeium/windsurf/mcp_config.json——
Cline (VS Code)…/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json✓✓
Zed~/.config/zed/settings.json✓—
Project-level.vscode/mcp.json, .cursor/mcp.json, .mcp.json, mcp.json✓✓

🧪 Detection rules

IDRuleSeverityCWE
MAT-001Hardcoded secret in server env (OpenAI/Anthropic/GitHub/AWS/Slack/Google keys, private keys)🔴 CRITICALCWE-798
MAT-002Sensitive host env var passed through to the server process🔴 HIGHCWE-200
MAT-003Unpinned npx/uvx/pipx package — rug-pull & supply-chain risk🔴 HIGHCWE-1357
MAT-004curl/wget piped to shell — installer spoofing / RCE🔴 CRITICALCWE-494
MAT-005Dangerous launch commands (rm -rf, sudo, chmod 777, eval)🔴 HIGHCWE-78
MAT-006Shell -c wrapper — command-injection surface🟡 MEDIUMCWE-78
MAT-007Filesystem server rooted at /, ~, or $HOME🔴 HIGHCWE-22
MAT-008Remote MCP server over plaintext HTTP🔴 HIGHCWE-319
MAT-009Remote MCP server with no authentication configured🟡 MEDIUMCWE-306
MAT-010Tool-poisoning indicators in descriptions (hidden instructions)🔴 CRITICALCWE-74
MAT-011Destructive tools on the auto-approve list (no human confirmation)🟡 MEDIUMCWE-862
MAT-012Wildcard * permissions🟡 MEDIUMCWE-732

🤖 GitHub Actions & CI

Gate pull requests on MCP config security and surface findings in the Security tab:

yaml
name: MCP Security Audit
on: [push, pull_request]

permissions:
  security-events: write

jobs:
  mcp-audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
      - run: pipx install git+https://github.com/graygnatconsole/mcp-audit-tool.git
      - name: Audit MCP configs
        run: mcp-audit scan .vscode/mcp.json .cursor/mcp.json --format sarif --output results.sarif
      - name: Upload to GitHub Code Scanning
        uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: results.sarif

Exit codes

CodeMeaning
0Scan completed; no finding at or above --fail-on threshold
1Findings at or above the --fail-on severity
2Usage error (missing file, parse error, bad options)

🗺️ Roadmap

  • Live server probing — enumerate real tools/list over stdio/SSE and diff against pinned hashes (rug-pull detection at runtime)
  • Prompt-injection classifier for tool descriptions (ML-based, optional extra)
  • mcp-audit fix — auto-remediate unpinned packages and over-broad paths
  • Baseline & diff mode (--baseline) to alert on config drift
  • Pre-commit hook and Homebrew formula
  • Community rule packs (--ruleset)

Contributions welcome — see CONTRIBUTING.md.

🤝 Related projects

Part of a growing MCP security ecosystem — also check out:

📄 License

MIT © GrayGnatConsole — use it, fork it, ship it.


If mcp-audit-tool caught something nasty in your config, ⭐ star the repo — it helps others find it too.

mcp security · model context protocol audit · mcp scanner · mcp vulnerability scanner · ai agent security · llm security tool · tool poisoning detection · mcp rug pull · claude desktop security · cursor mcp security · supply chain security ai · prompt injection scanner · sarif security scanner · devsecops ai agents

Gebruik MCP Audit Tool MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra MCP Audit Tool is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Deze MCP-integratie draait lokaal via de TypingMind MCP-connector op je apparaat.

Installatiehandleiding voor de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg MCP Audit Tool toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van MCP Audit Tool.
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "mcp-audit-tool": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van MCP Audit Tool in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van MCP Audit Tool in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je MCP Audit Tool gebruiken om me hiermee te helpen?
MCP Audit Tool
Zeker. Ik heb het gelezen.
Dit vond ik met MCP Audit Tool.

Veelgestelde vragen

Waarvoor wordt de MCP-server MCP Audit Tool gebruikt?

MCP Audit Tool is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik MCP Audit Tool MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je MCP Audit Tool gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom MCP Audit Tool MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als MCP Audit Tool verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik MCP Audit Tool MCP met TypingMind?

MCP Audit Tool werkt via de lokale MCP-connector van TypingMind. Dit is de beste optie als de MCP-server toegang nodig heeft tot lokale bestanden, desktopapps, opdrachtregeltools of privébronnen op je computer.

Welke tools biedt MCP Audit Tool MCP in TypingMind?

MCP Audit Tool biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om MCP Audit Tool MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als MCP Audit Tool authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇