
Raven Nest Mcp
io.github.tidynest由 GitHub 账号 tidynest 发布v0.4.1更新于 Oct 24, 2026
AI-driven penetration testing - 22 security tools behind safety-hardened MCP endpoints
概览
一个进攻性安全 MCP 服务器,让 AI 助手运行 22 种渗透测试工具、记录漏洞发现并生成报告。
- 可以做什么
- 运行侦察与枚举工具,如 nmap、masscan、subfinder、dnsx、whatweb,以及 katana 爬取和 enum4linux-ng、netexec(受限)的 SMB/AD 枚举。运行漏洞扫描与 Web 模糊测试工具,包括 nuclei、nikto、wpscan、dalfox、feroxbuster、ffuf,以及 sqlmap、hydra、john 等利用或破解工具。用 gitleaks、trufflehog 扫描密钥,用 testssl.sh 检查 TLS,或在启用 MSF 的构建中操作 Metasploit 模块与会话。管理后台扫描(启动、状态、结果、列表、取消),保存、列出、删除漏洞发现并生成报告,支持扫描差异对比和按主机的发现跟踪。生成 Markdown、JSON、SARIF 或 HTML 格式报告,并通过只读资源浏览发现、报告和扫描。
- 适用场景
- 适用于对自有系统或已获明确书面授权的系统进行授权渗透测试和安全评估,希望由助手驱动标准安全工具、留存发现记录并产出报告的场景。不适用于未经授权扫描第三方系统。
- 运行要求
- 以本地 stdio 进程运行。推荐使用已发布的 Docker 镜像,其中在 Kali 基础上打包了服务器和全部 22 种工具;masscan 和 nmap 操作系统探测需要 NET_RAW 与 NET_ADMIN 权限。从源码构建需要 Rust 1.93+ 并自行安装外部工具。配置从 TOML 文件读取,可通过 RAVEN_CONFIG 环境变量指定路径。Metasploit 支持需要启用 MSF 的构建以及配置好的主机、端口和密码。
安装
在 SourceWeft 中
- 打开 控制台中的 Raven Nest Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Raven Nest MCP
[License: Apache-2.0] [CI] [Release] [MCP tools: 46] [MCP] [Canopii Trust Score]
A pentesting toolkit that runs as an MCP server, giving AI assistants structured access to industry-standard security tools through a safety-hardened interface.
Authorized use only. Raven Nest is an offensive-security tool intended solely for testing systems you own or have explicit written permission to assess. Unauthorized scanning, enumeration, or exploitation may be illegal. You are solely responsible for obtaining authorization and complying with all applicable laws. The software is provided "as is", without warranty of any kind - see LICENSE.
Demo
Real MCP traffic to the tools - no LLM in the loop, fully deterministic. Targets are the authorized public test hosts example.com / scanme.nmap.org.
Scan → structured finding → report
[Scan to structured finding to report]
Recon flow - connectivity, ports, web stack
[Recon flow: ping, nmap, whatweb]
Metasploit module discovery - requires an MSF-enabled build; the default container image excludes Metasploit
[Metasploit search and module info]
What It Does
Raven Nest wraps 22 security tools plus Metasploit Framework behind an MCP interface with input validation, output quality assessment, session-aware context budgeting, and configurable safety limits. It handles tool execution, restart-safe background scans (completed results survive a server restart; interrupted ones surface as failed), vulnerability finding persistence, target discovery tracking, scan diffing, and multi-format report generation (Markdown, JSON, SARIF, HTML). Findings, reports, and scans are also exposed as MCP resources for browsing. 46 MCP endpoints total.
Supported Tools
How It Fits Together
Raven Nest is an MCP server - it doesn't do anything on its own. An MCP host launches it over stdio and drives the tools. Pick whichever host suits you:
- Any MCP host (recommended) - point Claude Desktop, Cursor, or any MCP client at the Docker image below; the host spawns the server for you.
- Companion REPL -
raven-nest-clientis a TypeScript terminal client (tab-completion, scan/finding/report commands, engagement scoping) for driving Raven Nest by hand. It can launch either a localraven-serverbuild or the Docker image.
The server is the same stdio binary in both cases.
Quick Start
Run with Docker (recommended)
The published image bundles raven-server and all 22 wrapped tools on a Kali
base, so you don't have to install them yourself. Point your MCP client at it
(stdio):
masscan and nmap -O need raw sockets - append --cap-add=NET_RAW and
--cap-add=NET_ADMIN to args if you use them (the container runs as a
dedicated non-root user; the runtime grants those capabilities to the container
process directly, so they keep working without root). The server is also listed
on the MCP Registry as
io.github.tidynest/raven-nest-mcp.
Prerequisites
- Rust 1.93+ (2024 edition)
- One or more external tools installed (nmap, nuclei, nikto, etc.)
Build
Configure your MCP client
Create .mcp.json in your project root (or configure your MCP client directly):
The server communicates over stdio and requires no network ports.
Configuration
Raven Nest loads configuration from TOML, resolved in order:
RAVEN_CONFIGenvironment variable (path to file)config/default.tomlnext to the binaryconfig/default.tomlin the working directory- Built-in defaults
Key configuration sections:
See docs/USAGE.md for the full parameter reference and per-tool configuration options.
Safety Architecture
Every tool call passes through six layers:
- Allowlist -- only explicitly permitted tools can execute
- Input validation -- targets must be valid IPs, hostnames, CIDRs, or URLs; shell metacharacters are rejected
- Preset arguments -- users pick scan types, never raw CLI flags
- Execution containment -- configurable timeouts with
kill_on_drop - Output sanitisation -- ANSI stripping, truncation at configurable limits (UTF-8 safe)
- Quality assessment -- detects empty results, rate-limiting, and WAF blocks
Additional hardening:
- Config validation at startup -- safety limits (sqlmap level/risk, hydra tasks, masscan rate) are range-checked; the server refuses to start with out-of-range values or default MSF credentials
- Wordlist path validation -- hydra, john, feroxbuster, and ffuf only accept wordlists under
/usr/share/,/usr/lib/, or the configuredoutput_dir; path traversal (..) is rejected - Positional-argument guards -- free-text values passed to tools as positional arguments are charset-checked so they can't be re-parsed as flags: hydra
service(lowercase/digits/hyphens) andform_params(no leading-, no control chars), sqlmaptechnique(subset ofBEUSTQ), ffuffilter_size(digits/commas). Targets get the same treatment (-oN/tmp/evilis rejected as flag-like) - Port spec validation -- nmap and masscan port parameters accept only digits, commas, and hyphens
- File permissions -- cookie files and scan spill files are created with
0o600(owner-only) - Markdown escaping -- report generation escapes user-supplied finding fields to prevent markdown injection
- Finding ID validation -- finding get/delete operations require valid UUID format, preventing path traversal
- Engagement scope -- an optional authorization allowlist (
[scope]): when enabled, every target must match an allowed CIDR/domain and must not match a denied one (deny wins); loopback is allowed unless disabled.http_requestre-validates each redirect hop against the scope, so a redirect cannot escape it. Off by default - Audit logging -- every tool execution is appended to
{output_dir}/audit.logwith the tool, target, and redacted arguments - Proactive cooldown -- an optional
min_exec_gap_msspaces out consecutive tool launches so back-to-back aggressive tools don't trip a target's WAF or rate-limiter, andper_target_min_gap_msdoes the same per host while independent targets proceed in parallel; complements the reactive WAF/rate-limit detection. Both off by default
Metasploit integration adds a 5-layer safety model: disabled by default, per-tool allowlisting, path-boundary module blocklist, exploit confirmation gate (double-call to execute), and session command filtering. Passwords are redacted from error messages, and TLS certificate bypass is restricted to localhost connections. See docs/METASPLOIT.md.
Tools requiring root (masscan, nmap OS detection) can be run via passwordless sudo without elevating the entire server. See sudo_tools in the configuration docs.
Context Budget
A session-aware context budget tracker dynamically adjusts per-tool output caps based on remaining context window space. This prevents context overflow on local AI models with limited context windows (49-64K tokens).
- Full mode -- all findings, all details, up to 8K chars per tool call
- Compact mode -- top-N results, critical/high findings only (triggers at 40% consumed)
- Minimal mode -- one-line summaries (triggers at 70% consumed)
Parser result caps scale dynamically via scale_cap() -- each tool's output parser adjusts its result limit based on the active budget mode. All tool output passes through centralised ANSI stripping and budget-aware truncation in wrap_result().
When the budget is exhausted, the server returns a message directing the AI to save findings and generate a report rather than running additional scans.
Target Discovery Tracking and Scan Diffing
Every nmap result (run_nmap and background nmap scans) accumulates into a
per-host discovery record: ports, states, services, versions, and OS guesses,
with first/last-seen timestamps. Re-scanning merges rather than overwrites, so
the record shows how the target evolved.
list_targets/get_target_inforecall the tracked hosts and full per-host service tables without re-scanning.diff_scanscompares two completed nmap scans: added/removed hosts and ports, plus per-port state/service/version changes (open (ssh OpenSSH 8.9) → open (ssh OpenSSH 9.0)).- Discovery data is engagement-scoped like findings (
{engagement}/targets/) and persists across restarts.
run_nmap and run_nuclei also attach machine-readable structured_content
to their responses (hosts/ports/CVEs; findings list), uncapped by the context
budget, so clients can process results without parsing prose.
Report Generation
The generate_report endpoint produces a structured report -- Markdown by default, or JSON, SARIF, or HTML via the format parameter -- containing:
- Table of Contents with linked findings
- Executive Summary with severity breakdown table and overall risk rating
- Methodology section (PTES framework)
- Tools Used (deduplicated from findings)
- Scope & Timeline -- targets assessed and the engagement window, derived from the findings
- Numbered Findings with severity, target, tool, CVSS score, CVE identifier, OWASP Top 10 category, evidence, and remediation guidance
The Markdown and HTML formats render the full narrative (table of contents, methodology, scope, generation timestamp); JSON and SARIF are structured envelopes for tooling. Findings support an owasp_category field for mapping vulnerabilities to the OWASP Top 10 (e.g. "A03:2021 Injection").
MCP Resources
Beyond tools, the server exposes its data as read-only MCP resources under the raven:// scheme, so a client can browse or attach them without a tool call:
raven://findings-- JSON index of every saved findingraven://findings/{id}-- a single finding as JSONraven://reports/{markdown|json|sarif|html}-- a report rendered on demandraven://scans-- JSON index of background scansraven://scans/{id}-- a scan's captured output
Each saved finding and tracked scan is also listed individually, so they show up as browsable entries in resource-aware clients.
Output Parsers
Every security tool has a structured output parser that extracts key data from raw tool output:
- nmap -- XML parser with NSE script extraction (vulners CVEs by CVSS)
- nuclei -- JSONL parser with severity filtering
- nikto/feroxbuster/ffuf/masscan -- line-oriented parsers with configurable result caps
- sqlmap -- injection type and parameter extraction
- testssl -- vulnerability and certificate finding extraction
- hydra/whatweb -- credential and technology identification
- subfinder/dnsrecon/dnsx -- subdomain and DNS record extraction
- httpx/katana -- HTTP fingerprint and crawled-endpoint extraction
- dalfox/wpscan/enum4linux-ng/john -- structured finding extraction
- netexec -- authentication verdict and per-host enumeration extraction
All parsers return Option<String> and fall back to raw output when parsing fails. Result limits scale dynamically based on the active budget mode.
Authenticated Scanning
The http_request tool maintains a shared cookie jar that persists within a session and across context clears (saved to disk). External subprocess tools (sqlmap, nikto, feroxbuster, etc.) do not share this jar -- pass cookies via each tool's cookie parameter.
Testing
381 unit and integration tests across 3 crates:
A Python-based MCP integration test harness is also available:
Project Structure
Documentation
- docs/USAGE.md -- tool installation, configuration reference, full parameter docs
- docs/MCP_TOOLS.md -- machine-readable manifest of all 46 tools (name + description)
- docs/LOCAL_AI_INTEGRATION.md -- using Raven Nest with local models (Ollama, LM Studio)
- docs/METASPLOIT.md -- Metasploit Framework integration setup and safety model
- docs/DATA_FLOW.md -- data flow and sources of truth: which module owns each piece of state
- raven-nest-client -- companion TypeScript REPL client (versioned in lockstep with the server)
- CHANGELOG.md -- release history (current: v0.4.1)
License
来源:README.md,提交 b36a161
工具
0版本历史
2- v0.4.1最新Sep 21, 2026
- v0.3.0Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分