audit-mcp-cli
Audits remote GitHub repositories (public or private) by specifying the repository and reference, leveraging GitHub's API for dependency analysis.
Supports CI/CD integration with GitHub Actions via the --fail-on option to fail workflows when vulnerabilities exceed a specified severity threshold.
Audits npm projects for dependency vulnerabilities, using npm lockfiles to detect and report security issues.
Audits pnpm projects for dependency vulnerabilities, using pnpm lockfiles to detect and report security issues.
audit-mcp-cli
English | 中文
A lightweight dependency vulnerability audit tool for Node.js projects. Supports CLI and MCP Server modes, covers npm and pnpm projects, and generates structured Markdown/HTML reports with full dependency chains.
Features
Full dependency chains — traces the complete path from your package.json to each vulnerable package
npm + pnpm support — auto-detects package manager by lockfile
Remote GitHub audit — audit any public or private repo without cloning
MCP Server — integrates with AI coding assistants (Claude, Cursor, etc.)
Markdown / HTML reports — clean, structured reports sorted by severity
CI gate —
--fail-onexit code for CI/CD pipelinesIgnore mechanism — suppress accepted vulnerabilities with expiration dates
Severity filtering — show only vulnerabilities above a threshold
Install
# Run directly
npx audit-mcp-cli
# Or install globally
npm install -g audit-mcp-cliRequires Node.js >= 18.
Usage
# Audit current directory
audit-mcp-cli
# Specific project path
audit-mcp-cli --path /path/to/project
# Remote GitHub repo (branch)
audit-mcp-cli --remote github:facebook/react --ref main
# Remote GitHub repo (tag)
audit-mcp-cli --remote github:facebook/react --ref v18.2.0
# Remote GitHub repo (commit SHA)
audit-mcp-cli --remote github:facebook/react --ref abc123def
# HTML report
audit-mcp-cli --format html --output report.html
# CI: fail if high+ severity vulnerabilities found
audit-mcp-cli --fail-on high
# Severity filtering (only show high and critical)
audit-mcp-cli --severity highCLI Options
Option | Description | Default |
| Local project path |
|
| Remote repo: | — |
| Git ref (branch name / tag / commit SHA) |
|
| GitHub personal access token (for private repos) |
|
| Report format: |
|
| Output file path |
|
| Minimum severity to display: |
|
| CI fail threshold — exit 1 if vulnerabilities at this level or above exist | — |
| Start as MCP Server | — |
| Language: | Auto-detect from system |
--fail-on exit codes
Value | Exits 1 when |
| Any critical vulnerability found |
| Any high or critical found |
| Any moderate, high, or critical found |
| Any vulnerability found |
(not set) | Always exits 0 |
MCP Server
Run as an MCP stdio server for AI assistants:
audit-mcp-cli --mcpClaude Desktop
Basic (local projects & public repos):
{
"mcpServers": {
"audit-mcp-cli": {
"command": "npx",
"args": ["-y", "audit-mcp-cli", "--mcp"]
}
}
}With GitHub token (private repos / avoid rate limits):
{
"mcpServers": {
"audit-mcp-cli": {
"command": "npx",
"args": ["-y", "audit-mcp-cli", "--mcp"],
"env": {
"GITHUB_TOKEN": "ghp_xxxx"
}
}
}
}Cursor
Add to .cursor/mcp.json:
Basic (local projects & public repos):
{
"mcpServers": {
"audit-mcp-cli": {
"command": "npx",
"args": ["-y", "audit-mcp-cli", "--mcp"]
}
}
}With GitHub token (private repos / avoid rate limits):
{
"mcpServers": {
"audit-mcp-cli": {
"command": "npx",
"args": ["-y", "audit-mcp-cli", "--mcp"],
"env": {
"GITHUB_TOKEN": "ghp_xxxx"
}
}
}
}Tool: audit_dependencies
The MCP server exposes one tool that supports both local and remote auditing:
Parameter | Description |
| Local project path |
| Remote repo: |
| Git ref (branch / tag / SHA) |
| GitHub token (for private repos, or use |
|
|
| Minimum severity filter |
| Custom output file path |
Returns: report file path + structured vulnerability details (CVSS, dependency chains, fix suggestions).
Token is optional. Local project auditing never requires a token. Remote public repos work without a token (60 requests/hour). Only private repos require a GitHub token.
Ignore Mechanism
Create .audit-mcp-cli-ignore.json in your project root to suppress accepted vulnerabilities:
{
"ignore": [
{
"packageName": "minimist",
"advisorySource": 1179,
"reason": "Accepted risk, limited impact in our usage",
"expiresAt": "2025-12-31T00:00:00Z"
}
]
}packageName— match all advisories for this package, or combine withadvisorySourcefor exact matchexpiresAt— optional, ignore auto-expires after this dateIgnored vulnerabilities are shown in a separate section of the report and excluded from
--fail-onchecks
CI Integration
# GitHub Actions example
- name: Security Audit
run: npx audit-mcp-cli --fail-on high# Generic CI
npx audit-mcp-cli --fail-on high && echo "pass" || echo "fail"License
Appeared in Searches
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/double527/audit-mcp-cli'
If you have feedback or need assistance with the MCP directory API, please join our Discord server