MCP Security & Vulnerability Auditor

io.github.Ansarii由 GitHub 账号 Ansarii 发布v1.0.0更新于 Oct 24, 2026

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

已验证Streamable HTTP可网页运行开发者工具安全与监控

概览

AI 生成的概览

一个静态安全审计服务器,让 AI 助手扫描 MCP 服务器仓库或本地代码,检查命令注入、密钥泄露、路径穿越等问题

可以做什么
审计公开的 MCP 服务器 Git 仓库,可限定子目录,返回信任分、字母评级、带 CWE 编号的问题列表和 Markdown 报告。审计本地目录中的 MCP 服务器源码,返回结构化 JSON 结果和修复清单。检查项涵盖命令注入、路径穿越、硬编码密钥、公开传输缺少认证,以及工具或提示注入风险。分析基于静态 AST,不执行被扫描的代码。
适用场景
在安装或连接第三方 MCP 服务器之前做预检,或在部署自己的 MCP 服务器源码之前使用。适合需要快速获得分级风险摘要、而非逐行人工审查的场景。
运行要求
清单中登记的是远程 streamable HTTP 端点,未声明认证、环境变量或请求头。README 则说明可用 python3 或 Docker 在本地运行;仓库审计工具需要公开的 Git 地址和网络访问。
安装前请注意
README 称扫描器不会执行被审计的代码,但本地目录审计会读取你提供的路径下的文件,请只指向你愿意暴露的目录。结果是启发式静态发现和信任分、评级,并不保证安全;高分只能作为参考之一,而非放行依据。清单与 README 对运行方式的说明不一致,连接前请确认实际端点。

安装

在 SourceWeft 中

  1. 打开 控制台中的 MCP Security & Vulnerability Auditor,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.Ansarii%2Fmcp-security-auditor/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "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.

来源:README.md,提交 a07efcd

工具

0
SourceWeft 尚未读取此服务器的工具。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 85%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分