AI DirScanCAUTION
可用于AI进行自动目录扫描的MCP辅助工具
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
🔗 项目地址: https://github.com/Elitewa/ai_dirscan
📖 项目简介
本项目可以说是MCP+AI和传统安全融合的一个示范,鉴于现在关于MCP for Security的知识还不够完善,也算是抛砖引玉了,如果有更好的建议欢迎指出🤩
AI DirScan 是基于 MCP协议 的新一代智能安全扫描工具,创新性地将传统目录爆破工具 dirsearch 与大型语言模型(LLM)相结合,实现:
✨ 核心功能 ✅ 自动化目录扫描与状态码分析 ✅ 智能结果解析与漏洞关联分析 ✅ 主流大模型兼容支持(需自行配置API)
🚀 技术亮点
- 采用 FastMCP 框架实现高并发处理
- 使用mcp协议中的sse方案,增加对扫描工具超时优化
- 支持 200/403/500 等状态码智能筛选分析
- 可配合Cline进行扫描全流程自动化,产出相应md格式漏洞报告
🧑🏻💻 功能预览
该MCP工具可自动获取对话中的URL地址,并进行目录扫描
自动分析非200页面网页内容,可用于发现服务器版本泄露,框架类型版本泄露,网站绝对路径泄露等漏洞,并在分析完所有扫描得到的路径之后,会产出md格式漏洞报告(依赖于cline)
为节省LLM的api tokens,对扫描结果进行了数据筛选工作,以 状态码+返回包大小 作为判断标识,同样的组合仅保留分析一组
🛠️ 快速开始
环境要求
- Python 3.10+
- UV 虚拟环境工具
- 支持的大模型API密钥
- 新版Cline IDE插件
初始化环境
MacOS/Linux:
# 克隆仓库 git clone https://github.com/Elitewa/ai_dirscan.git cd ai_dirscan # 创建虚拟环境 uv venv .venv # 激活环境 source .venv/bin/activate # 安装虚拟环境依赖 uv add "mcp[cli]" uv add requests deactivate # 退出虚拟环境,在系统主环境执行以下命令 cd dirsearch pip install -r requirements.txt pip install setuptools
Windows:
# 克隆仓库 git clone https://github.com/Elitewa/ai_dirscan.git cd ai_dirscan # 创建虚拟环境 uv venv .venv # 激活环境 .venv\Scripts\activate.bat # 安装依赖 uv add "mcp[cli]" uv add requests deactivate # 退出虚拟环境,在系统主环境执行以下命令 cd dirsearch pip install -r requirements.txt pip install setuptools
对接Cline
进入项目目录,允许以下命令,开启sse服务
uv run main.py
如图便是开启成功
Vscode下载最新版Cline插件,进入远程MCP服务添加页面,名称自定义,URL填写 http://0.0.0.0:8000/sse,并保存
在已导入的MCP服务中,将超时时长设置为10min(视扫描时长而定),如果保存后无法连接mcp服务器,建议点击 Configu
74d6422ace0aOBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add ai-dirscan -- uvx ai-dirscan
{
"mcpServers": {
"ai-dirscan": {
"command": "uvx",
"args": [
"ai-dirscan"
]
}
}
}Exposed tools (2)
2 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
get_content | read | |
scan_dir | read |
Trust audit
CAUTIONgrade B · trust 84/100 Install with care. The audit found things worth knowing before you trust its output.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- declared (2 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (7)
self.session.verify = False
sse
Vscode下载最新版Cline插件,进入远程MCP服务添加页面,名称自定义,URL填写 `http://0.0.0.0:8000/sse`,并保存
PySocks, Jinja2, certifi, urllib3, cryptography, cffi, defusedxml, markupsafe
assets/image-20250410162827424.png
curl -fsSL https://get.docker.com | bash
Gates applied: no_behavioural_pass, no_license.
74d6422ace0afull audit observations/trust-audit/mcp-server/elitewa__ai-dirscan.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 74d6422ace0a | CAUTION | B | 84 | first audit |
Questions
What is the AI DirScan MCP server?
可用于AI进行自动目录扫描的MCP辅助工具
What tools does AI DirScan expose?
2 in total: 2 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is AI DirScan safe to connect to an agent?
With care. The audit graded it B (84/100) and found 7 things worth knowing before you trust this server, listed below with the exact line each was found on.
What credentials does AI DirScan need?
No credential environment variables were found in its source, so it appears to need none.
How does AI DirScan run?
It speaks sse, so it runs as a service you connect to over the network. It is published on PyPI as ai-dirscan.
How current is this page?
The grade is for one exact copy of the source (74d6422ace0a), read on 2026-10-08. The repository is watched and re-audited when it changes.