MCP Audit Tool logo

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.

Publishergraygnatconsole
Repositorymcp-audit-tool
LanguagePython
Forks
2
Stars
123
Available tools
0
Transport typestdio
LicenseMIT
Links
  • Connect tools to AI workflows

    MCP Audit Tool exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    123 stars and 2 forks from the linked 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

Use MCP Audit Tool MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once MCP Audit Tool is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add MCP Audit Tool as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the MCP Audit Tool MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "mcp-audit-tool": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the MCP Audit Tool MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the MCP Audit Tool MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MCP Audit Tool to help me with this task?
MCP Audit Tool
Sure. I read it.
Here is what I found using MCP Audit Tool.

Frequently asked questions

What is the MCP Audit Tool MCP server used for?

MCP Audit Tool is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use MCP Audit Tool MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use MCP Audit Tool with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use MCP Audit Tool MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With MCP Audit Tool connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect MCP Audit Tool MCP to TypingMind?

MCP Audit Tool runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does MCP Audit Tool MCP provide in TypingMind?

MCP Audit Tool exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use MCP Audit Tool MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If MCP Audit Tool requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter ๐Ÿ‘‡