Security Audit MCP server

Integrates with npm-audit-report and npm-registry-fetch to analyze and report potential vulnerabilities in Node.js project dependencies, offering actionable security insights for development teams.
Back to servers
Setup instructions
Provider
esx
Release date
Feb 21, 2025
Language
TypeScript
Package
Stats
2.2K downloads
40 stars

Security Audit Tool is a powerful MCP (Model Context Protocol) Server that performs real-time security vulnerability scanning for npm package dependencies. It integrates with remote npm registries to provide detailed vulnerability reports, severity levels, and automatic fix recommendations.

Installation Options

Installing via Smithery

To install Security Audit Tool for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @qianniuspace/mcp-security-audit --client claude

MCP Integration

Option 1: Using NPX (Recommended)

Add MCP configuration to Claude/Cursor:

{
  "mcpServers": {
    "mcp-security-audit": {
      "command": "npx",
      "args": ["-y", "mcp-security-audit"]
    }
  }
}

Option 2: Manual Installation

  1. Clone the repository:
git clone https://github.com/qianniuspace/mcp-security-audit.git
cd mcp-security-audit
  1. Install dependencies and build:
npm install
npm run build
  1. Add MCP configuration to Claude/Cursor:
{
  "mcpServers": {
    "mcp-security-audit": {
      "command": "npx",
      "args": ["-y", "/path/to/mcp-security-audit/build/index.js"]
    }
  }
}

Using the Security Audit Tool

Once installed and configured, the Security Audit Tool will automatically scan your npm packages for vulnerabilities. The tool provides detailed information about any security issues found.

Key Features

  • Real-time security vulnerability scanning
  • Remote npm registry integration
  • Detailed vulnerability reports with severity levels
  • Support for multiple severity levels (critical, high, moderate, low)
  • Compatible with npm/pnpm/yarn package managers
  • Automatic fix recommendations
  • CVSS scoring and CVE references

Understanding the Response Format

The tool provides detailed vulnerability information in a structured JSON format:

When Vulnerabilities Are Found

{
  "content": [{
    "vulnerability": {
      "packageName": "lodash",
      "version": "4.17.15",
      "severity": "high",
      "description": "Prototype Pollution in lodash",
      "cve": "CVE-2020-8203",
      "githubAdvisoryId": "GHSA-p6mc-m468-83gw",
      "recommendation": "Upgrade to version 4.17.19 or later",
      "fixAvailable": true,
      "fixedVersion": "4.17.19",
      "cvss": {
        "score": 7.4,
        "vector": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N"
      },
      "cwe": ["CWE-1321"],
      "url": "https://github.com/advisories/GHSA-p6mc-m468-83gw"
    },
    "metadata": {
      "timestamp": "2024-04-23T10:00:00.000Z",
      "packageManager": "npm"
    }
  }]
}

When No Vulnerabilities Are Found

{
  "content": [{
    "vulnerability": null,
    "metadata": {
      "timestamp": "2024-04-23T10:00:00.000Z",
      "packageManager": "npm",
      "message": "No known vulnerabilities found"
    }
  }]
}

Interpreting Results

Severity Levels

The tool uses standard severity levels:

  • Critical: Vulnerabilities that need immediate attention
  • High: Serious vulnerabilities that should be prioritized
  • Moderate: Vulnerabilities with significant impact but lower urgency
  • Low: Minor vulnerabilities with limited impact

Fix Recommendations

For each vulnerability, the tool provides:

  • Package name and affected version
  • Description of the vulnerability
  • CVE identifier and GitHub Advisory ID when available
  • Specific recommendation for fixing the issue
  • Fixed version information
  • CVSS score and vector for assessing impact

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "mcp-security-audit" '{"command":"npx","args":["-y","mcp-security-audit"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "mcp-security-audit": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-security-audit"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "mcp-security-audit": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-security-audit"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later