这是一个轻量级的 MCP(模型上下文协议)服务器,专为 Garak 打造,可助力进行 LLM 漏洞扫描。
示例链接: https://github.com/user-attachments/assets/f6095d26-2b79-4ef7-a889-fd6be27bbbda
本 MCP 服务器可用于 Garak 进行 LLM 漏洞扫描,通过提供的一系列工具,能方便地列出模型类型、模型、攻击探测器,获取报告以及运行攻击等操作。
# 检查你的 Python 版本
python --version
pip install uv
或使用 Homebrew:brew install uv
ollama serve
git clone https://github.com/BIGdeadLock/Garak-MCP.git
{
"mcpServers": {
"garak-mcp": {
"command": "uv",
"args": ["--directory", "path-to/Garak-MCP", "run", "garak-server"],
"env": {}
}
}
}
名称 | 描述 |
---|---|
list_model_types | 列出所有可用的模型类型(ollama、openai、huggingface、ggml) |
list_models | 根据给定的模型类型列出所有可用模型 |
list_garak_probes | 列出所有可用的 Garak 攻击/探测器 |
get_report | 获取上次运行的报告 |
run_attack | 使用指定模型和探测器运行攻击 |
list_model_types
list_models
model_type
(字符串,必需):要列出的模型类型(ollama、openai、huggingface、ggml)list_garak_probes
get_report
run_attack
model_type
(字符串,必需):要使用的模型类型model_name
(字符串,必需):要使用的模型名称probe_name
(字符串,必需):要使用的攻击/探测器名称