acunetix-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@acunetix-mcp-server Show me recent vulnerabilities found across all targets"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
非官方Awvs MCP Server
Model Context Protocol (MCP) server that lets any LLM (Claude, WorkBuddy, Cursor, etc.) directly operate an Acunetix / Invicti Web Vulnerability Scanner.
当前版本:v1.3.4
基于官方内置 API 文档(Swagger 2.0,111 路径 / 161 操作)与公开接口行为分析,将 Acunetix 的完整 API 协议(GraphQL + REST 双通道)封装为 23 个 LLM 可调用工具。官方已确认该产品提供完整 REST API,本 Server 是其 MCP 化封装。
Features
双通道 API 桥:GraphQL(
/graphql/,主 UI 通道)+ REST(/api/v1/,业务数据通道)两种官方认证:
官方 API Key(Profile 页生成,
X-Auth头,纯认证无会话)— 推荐会话登录(
loginUsermutation,密码 SHA-256 预哈希)
15 个 MCP 工具:认证 / GraphQL 通用执行器 / REST 通用执行器 / 目标 / 扫描 / 漏洞 / 报告 / 配置 / 统计 / 用户
健壮错误处理:429 限流自动退避、401 会话失效识别、GraphQL errors 解析、TLS 自签名证书兼容
安全设计:凭据经环境变量注入(不硬编码)、token 仅存内存、写操作工具显式标注
Related MCP server: pentestMCP
Design Philosophy(设计原则)
工具是被调用的能力层,不是决策层。
工具只负责:接受 LLM 参数 → 执行对应系统操作 → 完整结构化返回结果
工具不拦截 LLM 调用、不自动替 LLM 做决定、不隐藏额外行为(如自动重登/自动续期)
判断、规划、决策全部归 LLM;工具通过"信息完备 + 调用便利"支持决策
错误返回是"信息"(说明发生了什么 + 可选方向),不是"指令"(不强制 LLM 怎么做)
长时间阻塞类操作返回状态快照,由 LLM 决定是否轮询
辅助查询(如查重)做成独立工具,供 LLM 按需调用,而非内嵌自动执行
Quick Start
💡 首次使用? 请先阅读 examples/NEW_USER_GUIDE.md(5 步完整上手:获取 API Key → 填到哪 → 验证 → 使用 → 故障排查)。配置模板见 examples/.env.example 与 examples/mcp-config-absolute.example.json。
1. 安装
# 方式 A:源码运行(当前唯一方式,推荐)
pip install -r requirements.txt
2. 配置凭据(账号密码 / API Key 填这里)
凭据通过环境变量或 MCP 客户端的 environment 字段传入,不写进代码。
Linux / macOS(bash):
# 方式一(推荐):官方 API Key —— Acunetix 界面 → 你的用户名 → Profile → API Key → Generate new API key
export ACUNETIX_API_KEY="<your-api-key>"
# 方式二:账号密码(会话登录,有单会话约束)
export ACUNETIX_EMAIL="<your-email>"
export ACUNETIX_PASSWORD="<your-password>"
# 可选
export ACUNETIX_BASE_URL="https://localhost:3443"
export ACUNETIX_VERIFY_SSL="false"Windows(PowerShell):
$env:ACUNETIX_API_KEY="<your-api-key>"
$env:ACUNETIX_BASE_URL="https://localhost:3443"
$env:ACUNETIX_VERIFY_SSL="false"Windows(CMD):
set ACUNETIX_API_KEY=<your-api-key>
set ACUNETIX_BASE_URL=https://localhost:3443💡 通用建议:在 MCP 客户端(如 Claude Desktop / WorkBuddy)的配置文件
environment字段中设置凭据,即可跨平台免环境变量,各操作系统行为一致。
3. 验证配置(自检)
python -m acunetix_mcp --selftest预期输出:认证: 官方 API Key → REST me: <邮箱> → targets: <N> 个目标 → 自检通过。
4. 启动 MCP Server(两种方式)
# 方式 A:命令行直接启动(stdio 模式)
python -m acunetix_mcp
# 方式 B:MCP 客户端配置中声明(推荐,示例见 examples/mcp-config-absolute.example.json)
# 用 __main__.py 的绝对路径,无需依赖 PYTHONPATH,最稳妥{
"mcpServers": {
"acunetix-mcp": {
"type": "local",
"command": "python",
"args": ["-m", "acunetix_mcp"],
"environment": {
"ACUNETIX_BASE_URL": "https://localhost:3443",
"ACUNETIX_API_KEY": "<your-api-key>"
}
}
}
}没有预置凭据也能用:若客户端未配置 environment,可直接在对话中调用
acunetix_use_api_key("<key>")或acunetix_login(email="...", password="...")传入。
Available Tools (23)
Tool | Type | Description |
| auth | 会话登录(方式二,回退) |
| auth | 官方 API Key 认证(方式一,推荐) |
| auth | 清理本地会话 |
| query | 当前用户信息(GraphQL) |
| generic | 任意 GraphQL query/mutation(覆盖任意功能) |
| generic | 任意 REST 端点调用(GET/POST/PUT/DELETE) |
| business | 目标列表(附登录配置摘要) |
| business | 单目标详情(附 auth_config 登录摘要) |
| business | 扫描列表 |
| business | 漏洞列表 |
| business | 报告列表 |
| business | 扫描配置 |
| business | 用户统计(最易受攻击目标) |
| write | 新增目标(criticality: 30/20/10/0) |
| query | 扫描前登录就绪检查(coverage_risk/guidance) |
| write | 启动扫描(描述含登录前置检查引导) |
| write | 写入自定义 Cookie 建立登录态(回读验证落盘) |
| query | 核查自定义 Cookie 配置状态 |
| write | 清空自定义 Cookie(不自动改 login.kind) |
| write | 上传 .lsr 登录序列文件(LSR 流程) |
| write | 应用登录序列(login.kind=sequence) |
| query | 查询登录序列配置状态 |
| write | 删除登录序列(幂等) |
通用执行器(
acunetix_gql/acunetix_rest)可覆盖官方 YAML 中全部 111 路径 / 161 操作。
Typical Workflow (LLM 自主操作)
1. acunetix_use_api_key("<key>") 或 acunetix_login()
2. acunetix_list_targets() # 查看目标 → 取 target_id
3. acunetix_list_scan_profiles() # 查看配置 → 取 profile_id
4. acunetix_start_scan(target_id, profile_id)
5. acunetix_list_scans() # 轮询扫描状态(注意:progress 在扫描中恒 0,用 severity_counts/threat 变化判断进展,见 PROTOCOL §9)
6. acunetix_list_vulnerabilities() # 获取漏洞
7. acunetix_gql(GetReport) # 生成报告
8. acunetix_logout()Logged-in Scan(登录态扫描,可选)
部分站点使用非标准登录(无表单 / 风控 / 加密提交),automatic 自动登录无法生效。
此时可先在浏览器完成登录,将登录 Cookie 注入目标,使扫描器以登录态爬取受限区域:
1. (浏览器自动化,可选)打开登录页 → 完成登录 → 提取完整 Cookie 串
2. acunetix_set_custom_cookies(target_id, cookie_str) # 写入 + 回读验证
3. acunetix_verify_custom_cookies(target_id) # 核查已配置
4. acunetix_start_scan(target_id, profile_id) # 以登录态扫描
5. acunetix_list_vulnerabilities() # 获取漏洞可选配套工具:若需浏览器自动化完成登录与 Cookie 提取,可接入第三方 MCP
js-reverse-mcp(npm 一行安装,见 docs/AUTH_WORKFLOW.md):{ "mcpServers": { "js-reverse": { "command": "npx", "args": ["js-reverse-mcp"] } } }Cookie 会过期(有效期取决于目标站点),过期后需重新获取并再次写入。
备选:Login Sequence(.lsr 录制登录序列)
若需更强地对抗复杂登录流程(多步/动态验证),可用 Invicti 官方 Login Sequence Recorder
(GUI 录制一次真实登录生成 .lsr),再通过工具上传并应用:
1. Acunetix GUI 录制登录 → 生成 .lsr 文件(GUI 操作,AI 无法代做)
2. acunetix_upload_login_sequence(target_id, "<本地.lsr路径>") # 上传
3. acunetix_apply_login_sequence(target_id) # 应用(kind=sequence)
4. acunetix_start_scan(target_id, profile_id) # 按 .lsr 重放登录扫描
5. acunetix_get_login_sequence / acunetix_delete_login_sequence # 查询/删除上传要求 .lsr 来自 Login Sequence Recorder 录制(服务端校验格式);未上传时 apply 会提示先上传。
Documentation
docs/PROTOCOL.md — 协议说明(认证机制、双通道、限流、单会话约束)
docs/SECURITY.md — 安全性考量
docs/AUTH_WORKFLOW.md — 登录态重建工作流(Custom Cookies 全流程)
Security Notes
凭据安全:API Key / 密码仅通过环境变量传入,代码不落盘、不硬编码。
最小权限:建议为自动化创建独立低权限账号(本仓库默认凭据为演示用途)。
写操作:
acunetix_add_target/acunetix_start_scan为写操作,生产环境建议在 MCP 层加人工确认。TLS:本机自签名证书默认
verify_ssl=False,生产环境必须开启证书校验。
License
MIT
Disclaimer
本工具仅用于授权环境下的安全测试与自动化集成。使用前请确保你拥有目标系统的合法授权。Acunetix / Invicti 为相应公司的商标。
Available Tools
15 toolsacunetix_add_targetA
【写操作】新增扫描目标(POST /api/v1/targets)。
address: 目标 URL/IP,如 http://example.com
criticality: 官方枚举 Critical[30]/High[20]/Normal[10]/Low[0],默认 10;其他值报 400
Inputs: address (required), criticality, description.
acunetix_get_targetA
获取单个目标详情(GET /api/v1/targets/{id})。
Inputs: target_id (required).
acunetix_gqlA
【通用 GraphQL 执行器】—— 大模型自主操作的核心通道。 向 /graphql/ 发送任意已确认可用的 query/mutation。
operation_name: 操作名(如 loginUser / getSharedUIData / getSystemInfo)
query: 完整 GraphQL 文本(依据官方文档与已知操作清单)
variables: 变量对象(可选) 注意:本系统 introspection 已禁用,必须使用已知操作名与字段结构。
Inputs: query (required), operation_name (required), variables.
acunetix_list_reportsA
列出已生成报告(GET /api/v1/reports?l=N)。
Inputs: limit.
acunetix_list_scan_profilesA
列出扫描配置(GET /api/v1/scanning_profiles),用于启动扫描时选 profile。
Inputs: no named parameters.
acunetix_list_scansB
列出扫描任务(GET /api/v1/scans?l=N)。
Inputs: limit.
acunetix_list_targetsB
列出扫描目标(GET /api/v1/targets?l=N),含地址/ID/漏洞计数。
Inputs: limit.
acunetix_list_vulnerabilitiesB
列出漏洞(GET /api/v1/vulnerabilities?l=N)。
Inputs: limit.
acunetix_loginA
【会话登录】登录 Acunetix 系统并建立会话(方式二)。
email/password 省略时使用环境变量 ACUNETIX_EMAIL / ACUNETIX_PASSWORD
成功后 token 保存在内存中,后续工具自动携带认证
注意:系统有单会话约束,会话登录会顶掉其他在线会话 提示:官方推荐方式是 acunetix_use_api_key(无单会话约束)。
Inputs: email, password, otp_token.
acunetix_logoutA
登出并清理本地会话。
Inputs: no named parameters.
acunetix_meB
获取当前登录用户信息(GraphQL)。
Inputs: no named parameters.
acunetix_restB
【通用 REST 调用器】访问 /api/v1/* 端点。
method: GET/POST/PUT/DELETE/PATCH
path: 端点路径,如 targets / scans / vulnerabilities / reports / me
params: 查询参数(可选)
body: JSON 请求体(POST/PUT 等写操作需要) 高风险写操作请确保意图明确。
Inputs: path (required), method (required), body, params.
acunetix_start_scanA
【写操作】对目标启动扫描(POST /api/v1/scans)。
target_id: 目标 ID(acunetix_list_targets 获取)
profile_id: 扫描配置 ID(acunetix_list_scan_profiles 获取)
Inputs: target_id (required), profile_id (required).
acunetix_statsA
当前用户统计(GET /api/v1/me/stats):扫描/目标/漏洞汇总。
Inputs: no named parameters.
acunetix_use_api_keyA
【官方推荐认证】使用 Profile 页生成的 API Key 认证(方式一)。
api_key: Profile 页 → API Key → Generate new API key 生成的 64 位密钥
纯 X-Auth 头认证:REST 与 GraphQL 均可用,无需登录、无单会话约束
若在环境变量 ACUNETIX_API_KEY 中配置,MCP server 启动时已自动启用,无需调用本工具
Inputs: api_key (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Most tools are clearly distinct (list_targets vs add_target vs start_scan), but acunetix_rest and acunetix_gql are generic executors that overlap with the specific list/get tools. The descriptions clarify their generic purpose, but an agent may still be uncertain whether to use the specific or generic tool for a given operation.
All tools share the acunetix_ prefix, but naming patterns vary: some are verb-only (login, logout), some are nouns (me, gql, rest, stats), and some are verb_noun (list_targets, add_target). This mixed convention is still readable but not fully consistent.
15 tools is within the typically well-scoped range, but the set feels slightly heavier because generic executors (acunetix_rest, acunetix_gql) are included alongside specific wrappers for the same endpoints. Each tool has some justification, though some redundancy exists.
Core workflows are covered: add target, start scan, list vulnerabilities, and list reports. However, there are no dedicated update/delete tools for targets or scans. The generic REST and GraphQL executors fill these gaps, so agents can work around them, but the dedicated tool surface is not fully complete.
Maintenance
Related MCP Connectors
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
Security scanner for AI agents and MCP servers: injection, jailbreak, tool abuse.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that integrates various penetration testing tools, enabling security professionals to perform reconnaissance, vulnerability scanning, and API testing through natural language commands in compatible LLM clients like Claude Desktop.7-
- FlicenseNot gradedqualityCmaintenanceAn MCP server that exposes over 20 standard penetration testing utilities, such as Nmap, SQLMap, and OWASP ZAP, as callable tools for AI agents. It enables natural language control over complex security workflows for automated and interactive penetration testing.120-
- FlicenseNot gradedqualityDmaintenanceA lightweight MCP server that wraps OWASP ZAP's REST API as Model Context Protocol tools, enabling AI agents to perform automated security scanning.-
- AlicenseCqualityDmaintenanceAI-powered security scanning MCP server that exposes 25+ professional tools, enabling penetration testing and security assessments through natural language interaction with AI agents like Claude Desktop.31MIT