A network analysis MCP server providing 23 tools for packet capture, protocol analysis, and cryptographic inspection, including TLS handshake, certificate extraction, and SM2/SM3/SM4 support.
SaferSkills independently audited RainyMCP (MCP Server) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
一个真正支持 AI IDE(暂不支持Antigravity)的 Rainy MCP 服务器,实现了符合 MCP (Model Context Protocol) 规范的 SSE 传输层。(由 RainyMarks 开发)
mcp 包┌─────────────────┐ GET /sse ┌──────────────────┐
│ Cursor IDE │ ◄───────────────► │ SSE MCP Server │
│ (MCP Client) │ │ │
│ │ POST /messages │ - SessionMgr │
│ │ ────────────────► │ - ToolRegistry │
│ │ │ - RainyMCP │
└─────────────────┘ └──────────────────┘
│
▼
┌──────────────┐
│ tshark │
│ (Wireshark) │
└──────────────┘tshark 命令行工具)Windows:
C:\Program Files\Wireshark)macOS:
brew install wiresharkLinux (Ubuntu/Debian):
sudo apt install tshark# 克隆项目
git clone <repository-url>
cd Rainy_mcp
# 安装依赖
pip install -r requirements.txtpython rainy_mcp.py可选参数:
python rainy_mcp.py --host 127.0.0.1 --port 3000 --tshark-path /path/to/tshark启动成功后会显示:
服务器地址: http://127.0.0.1:3000
SSE 端点: http://127.0.0.1:3000/sse
消息端点: http://127.0.0.1:3000/messages
已注册 8 个 Rainy 工具在项目根目录创建 mcp.json(或 .cursor/mcp.json):
{
"mcpServers": {
"rainy": {
"url": "http://127.0.0.1:3000/sse"
}
}
}重启 Cursor 或刷新 MCP 连接后,可以直接使用 Rainy 工具:
"帮我分析这个 pcap 文件中的 HTTP 流量"
>
"列出所有可用的网络接口"
>
"提取流量包中的所有 IP 地址"
| 工具名称 | 描述 |
|---|---|
list_interfaces | 列出所有可用的网络接口 |
capture_live | 实时抓包分析,支持过滤器 |
analyze_pcap | 分析 pcap/pcapng 文件内容 |
get_protocols | 获取 tshark 支持的协议列表 |
get_packet_statistics | 获取数据包统计信息(I/O、会话、端点) |
extract_fields | 提取数据包中的特定字段 |
analyze_protocols | 分析特定协议(HTTP、TCP、DNS 等) |
analyze_errors | 分析网络错误(重传、丢包等) |
#### TLS/SSL 分析
| 工具名称 | 描述 | 考试用途 |
|---|---|---|
analyze_tls_handshake | TLS 握手完整分析 | 🔥 提取 random 随机数、cipher_suites |
extract_certificates | 提取 TLS 证书 | 🔥 获取签名证书和加密证书 |
get_cipher_suites | 获取加密套件列表 | 🔥 找出四个 cipher suite |
#### IPSec/ISAKMP 分析
| 工具名称 | 描述 | 考试用途 |
|---|---|---|
analyze_ipsec | 分析 ESP/AH 协议 | IPSec 协议分析 |
analyze_isakmp | IKE/ISAKMP 分析 | 🔥 主模式前四个包、DH公钥、证书 |
#### 数字证书解析
| 工具名称 | 描述 | 考试用途 |
|---|---|---|
parse_certificate | X.509 证书深度解析 | 🔥 序列号、公钥、签名值、SM3摘要 |
extract_public_key | 提取公钥 | 🔥 RSA/SM2(512bit)/ECC 公钥 |
get_signature_value | 获取签名值 | 🔥 ServerKeyExchange签名、SM2签名 |
#### 流重组与协议分析
| 工具名称 | 描述 |
|---|---|
follow_tcp_stream | TCP 流追踪重组 |
follow_udp_stream | UDP 流追踪重组 |
extract_http_objects | HTTP 对象提取 |
analyze_dns_detail | DNS 深度分析 |
#### 安全检测与智能摘要
| 工具名称 | 描述 |
|---|---|
detect_anomalies | 异常检测(端口扫描、可疑流量) |
generate_traffic_summary | 智能流量摘要报告 |
get_conversation_graph | IP 通信图谱数据 |
输出控制:证书/签名相关工具(如analyze_tls_handshake、extract_certificates、parse_certificate、extract_public_key、get_signature_value)新增参数full_output(默认 false),开启后不再截断长字段;流重组工具follow_tcp_stream/follow_udp_stream新增max_lines(默认 2000,<=0 表示不截断)。
列出系统上所有可用的网络接口。
// 无需参数
{}实时抓包分析。需要管理员/root 权限。
{
"interface": "eth0", // 必需:网络接口名称
"duration": 10, // 可选:抓包时长(秒),默认 10
"filter": "tcp port 80", // 可选:BPF 过滤器
"max_packets": 100 // 可选:最大数据包数,默认 100
}分析已保存的 pcap 文件。
{
"file_path": "capture.pcap", // 必需:文件路径
"filter": "http", // 可选:显示过滤器
"max_packets": 100 // 可选:最大数据包数
}提取特定字段并统计。
{
"file_path": "capture.pcap",
"fields": ["ip.src", "ip.dst"], // 必需:字段列表
"filter": "", // 可选:显示过滤器
"max_packets": 5000 // 可选:最大数据包数
}分析网络传输错误。
{
"file_path": "capture.pcap",
"error_type": "all", // 可选:all/malformed/tcp/retransmission/duplicate_ack/lost_segment
"max_packets": 5000
}> "分析这个pcap中的TLS握手,找出random随机数和cipher_suites"
> "提取第一个包的随机数和第二个包选中的加密套件"> "分析ISAKMP流量,找出主模式的前四个包"
> "提取IKE密钥交换中的DH公钥和证书"> "解析流量中的证书,提取公钥和签名值"
> "根据证书序列号找到对应的公钥"> "提取SM2签名值(r,s)和公钥,准备验签"
> "找出签名报文和签名原文"> "从证书中提取国密SM3摘要值"| 端点 | 方法 | 描述 |
|---|---|---|
/ | GET | 状态页面 |
/status | GET | 状态页面 |
/sse | GET | SSE 长连接端点,返回 text/event-stream |
/messages | POST | JSON-RPC 消息接收端点 |
1. Client ──GET /sse──────────────────────────► Server
2. Client ◄──event: endpoint, data: /messages?session_id=xxx── Server
3. Client ──POST /messages?session_id=xxx────► Server
(JSON-RPC: initialize)
4. Client ◄──event: message, data: {result}─── Server
5. Client ──POST /messages (tools/list)──────► Server
6. Client ◄──event: message, data: {tools}─── Server
7. Client ──POST /messages (tools/call)──────► Server
8. Client ◄──event: message, data: {content}─ ServerA: 列出网络接口需要管理员权限。请以管理员身份运行 PowerShell/终端后启动服务器。
mcp.json 配置是否正确(使用 url 而非 serverUrl)确保 Wireshark 已安装且 tshark 在系统 PATH 中。可以通过 --tshark-path 参数指定完整路径:
python rainy_mcp.py --tshark-path "C:\Program Files\Wireshark\tshark.exe"MIT License
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.