MCP Security & Vulnerability Auditor

io.github.AnsariiPublished by GitHub account Ansariiv1.0.0Updated Oct 24, 2026

Static AST security scanner detecting command injection, leaked secrets, and SSRF in MCP tools.

VerifiedStreamable HTTPWeb executableDeveloper ToolsSecurity & Monitoring

Overview

AI-generated overview

A static security auditor that lets an AI assistant scan MCP server repositories or local code for command injection, leaked secrets, path traversal and similar

What you can do
Audit a public Git repository of an MCP server, optionally limited to a subdirectory, and get a trust score, letter grade, CWE-tagged findings and a markdown report. Audit a local directory of MCP server source before deployment and get structured JSON findings with a remediation checklist. Checks cover command injection, path traversal, hardcoded secrets, missing authentication on public transports, and tool or prompt injection risks. Analysis is static AST-based and does not execute the scanned code.
When to use it
Use it as a pre-flight check before installing or connecting to a third-party MCP server, or before deploying your own MCP server source. Useful when you want a quick graded risk summary rather than a manual code review.
Requirements
The manifest lists a remote streamable HTTP endpoint with no declared authentication, environment variables or headers. The README instead documents running it locally with python3 or Docker, and the repository audit tool needs a public Git URL and network access.
Before you install
The README states the scanner never executes the audited code, but a local directory audit reads files from a path you supply, so point it only at directories you intend to expose. Results are heuristic static findings with a trust score and grade, not a guarantee of safety; treat a high grade as one input, not a clearance. The manifest and README disagree on how the server is run, so confirm the actual endpoint before connecting.

Installation

In SourceWeft

  1. Open MCP Security & Vulnerability Auditor in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.Ansarii%2Fmcp-security-auditor/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "security-vulnerability-auditor": {
      "type": "http",
      "url": "https://neon_innovation_lab--mcp-security-auditor.apify.actor/mcp"
    }
  }
}

README

MCP Security Auditor Server

[Model Context Protocol] [Glama Quality Score] [Python 3.12] [License: MIT] [Transport: stdio]

A production-ready Model Context Protocol (MCP) Server providing AI coding assistants (Claude Desktop, Cursor, Windsurf, Cline) with native security analysis tools. It enables AI agents to statically audit other MCP servers, tool repositories, and local codebases for critical security vulnerabilities before onboarding or executing them.


🛠️ MCP Tools Exposed

This server implements the official Model Context Protocol specification (tools/list and tools/call):

1. audit_mcp_repository

Performs an automated, zero-execution static Abstract Syntax Tree (AST) security audit on a Git repository containing an MCP server implementation.

  • Parameters:
    • repository_url (string, required): Public Git URL of the MCP server repository to audit (e.g. https://github.com/example/mcp-server).
    • sub_directory (string, optional): Specific subdirectory within the repository to inspect (useful for monorepos).
  • Vulnerability Checks Conducted:
    • CWE-78 (Command Injection): Detects unsanitized subprocess.run, child_process.exec, shell invocation in tool execution blocks.
    • CWE-22 (Path Traversal): Flags unrestricted file read/write operations lacking path canonicalization (os.path.realpath, boundary checks).
    • CWE-798 (Hardcoded Secrets): Identifies leaked API keys, tokens, and corporate credentials in tool schemas or server definitions.
    • CWE-306 (Missing Authentication): Flags public HTTP/SSE transports exposing destructive capabilities without bearer auth.
    • CWE-1336 (Tool & Prompt Injection): Flags tool descriptions susceptible to prompt hijacking.
  • Returns:
    • trust_score (0–100): Weighted security index.
    • grade ("A+", "A", "B", "C", "F"): Security letter grade.
    • findings (array): Line-by-line vulnerability records with CWE identifiers and remediation instructions.
    • markdown_report (string): Pre-formatted human-readable audit report.

2. audit_local_directory

Audits a local filesystem directory containing MCP server source code before deployment.

  • Parameters:
    • directory_path (string, required): Absolute or relative filesystem path to the target directory.
  • Returns: Structured JSON audit record and remediation checklist.

🚀 Client Configuration & Quickstart

1. Claude Desktop Setup

Add the server to your claude_desktop_config.json:

json
{  "mcpServers": {    "mcp-security-auditor": {      "command": "python3",      "args": ["/path/to/mcp-security-auditor/server.py"]    }  }}

2. Cursor IDE / Windsurf Setup

In Cursor, go to Settings → Features → MCP → Add New MCP Server:

  • Name: mcp-security-auditor
  • Type: command
  • Command: python3 /absolute/path/to/server.py

3. Docker Container Execution

Run isolated via Docker using the pre-configured Dockerfile:

json
{  "mcpServers": {    "mcp-security-auditor": {      "command": "docker",      "args": [        "run",        "-i",        "--rm",        "ghcr.io/ansarii/mcp-security-auditor"      ]    }  }}

💻 Example Agent Usage

Once connected, your AI assistant can execute security pre-flight checks before installing tools:

text
User: "Audit the MCP server at https://github.com/modelcontextprotocol/servers before I install it."
Claude (Tool Call):audit_mcp_repository({  "repository_url": "https://github.com/modelcontextprotocol/servers",  "sub_directory": "src/fetch"})
Result:{  "status": "success",  "target_name": "servers:src/fetch",  "trust_score": 95,  "grade": "A+",  "findings_count": 0,  "recommendation": "SAFE_TO_CONNECT"}

🔒 Security Guarantee: Zero Execution

Unlike runtime scanners that execute arbitrary stdio binaries (creating direct Remote Code Execution risks on the host), this MCP server uses pure static Abstract Syntax Tree (AST) analysis. It inspects Python, TypeScript, and JSON-RPC implementations without ever executing untrusted code.


📜 License

MIT License — Copyright (c) 2026 Neon Innovation Lab.

Source: README.md at commit a07efcd

Tools

0
SourceWeft has not read this server's tools yet.

Version history

1
  1. v1.0.0LatestSep 16, 2026

Score

85% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts