
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.
概覽
一個靜態安全稽核伺服器,讓 AI 助理掃描 MCP 伺服器儲存庫或本機程式碼,檢查指令注入、金鑰外洩、路徑穿越等問題
- 可以做什麼
- 稽核公開的 MCP 伺服器 Git 儲存庫,可限定子目錄,回傳信任分數、字母評級、附 CWE 編號的問題清單與 Markdown 報告。稽核本機目錄中的 MCP 伺服器原始碼,回傳結構化 JSON 結果與修復清單。檢查項目涵蓋指令注入、路徑穿越、硬編碼金鑰、公開傳輸缺少驗證,以及工具或提示注入風險。分析採靜態 AST,不執行被掃描的程式碼。
- 適用情境
- 在安裝或連線第三方 MCP 伺服器之前做預檢,或在部署自家 MCP 伺服器原始碼之前使用。適合需要快速取得分級風險摘要、而非逐行人工審查的情境。
- 執行需求
- 清單登錄的是遠端 streamable HTTP 端點,未宣告驗證、環境變數或請求標頭。README 則說明可用 python3 或 Docker 在本機執行;儲存庫稽核工具需要公開的 Git 位址與網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 MCP Security & Vulnerability Auditor,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
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.
- CWE-78 (Command Injection): Detects unsanitized
- 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:
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:
💻 Example Agent Usage
Once connected, your AI assistant can execute security pre-flight checks before installing tools:
🔒 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版本歷史
1- v1.0.0最新Sep 16, 2026
評分
已滿足適用檢查項的 85%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具必需15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分