
Wireshark Mcp
io.github.bx33661由 GitHub 账号 bx33661 发布v0.6.5更新于 Oct 24, 2026
Professional network analysis with tshark. Security audits, deep-dives, and threat detection.
概览
封装 tshark,让助手能打开数据包捕获、提取字段、运行统计并扫描安全异常。
- 可以做什么
- 提供 52 个由真实 tshark 输出支撑的工具:打开 pcap、快速分析、数据包列表与详情、跟踪流、字段提取(HTTP、DNS、任意字段)、聚合与统计、约 20 种协议的协议分析、TLS/WPA 解密,以及凭据扫描、端口扫描、DNS 隧道、DoS、信标、数据外泄和 YARA 等安全检查。可选的 Wireshark 套件工具(capinfos、mergecap、editcap、dumpcap、text2pcap)会被自动检测并增加捕获、合并、裁剪和导出功能。full、analysis、core 三种配置可缩减对外暴露的工具数量。
- 适用场景
- 当你希望助手用自然语言检查 .pcap 文件或实时流量时使用:事件排查、威胁狩猎、协议故障诊断,或从捕获中提取特定字段而无需自己编写 tshark 命令。
- 运行要求
- 本地进程:需要 Python 3.10+ 以及已安装 Wireshark 且 tshark 在 PATH 中;通过 pip 或 uvx(wireshark-mcp)安装。可选的套件工具可启用额外功能。未声明账户、API 密钥或环境变量,但文档提到 WIRESHARK_MCP_MAX_RESULT_CHARS 和 WIRESHARK_MCP_ALLOWED_DIRS 用于调优和文件写入权限。
安装
在 SourceWeft 中
- 打开 控制台中的 Wireshark Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Wireshark MCP
Give your AI assistant a packet analyzer.
Drop a .pcap file, ask questions in plain English — get answers backed by real tshark data.
[CI] [GitHub Release] [PyPI] [Python] [MIT License] [Featured by Awesome REA]
What is this?
An MCP server that wraps tshark (and optional Wireshark suite tools) into a structured analysis interface. Works with Claude Desktop, Claude Code, Cursor, VS Code, and 18+ other MCP clients.
New in 4.0
- Capture index. With the optional
[index]extra,wireshark_indexdissects a capture once into a local DuckDB file. Laterwireshark_aggregateandwireshark_extract_fieldscalls read it with answers identical to tshark: 408× faster at 1 GB, and at 10 GB it answers questions the tshark path stops on. It also adds read-only SQL, capture sets, first-seen timelines, capture or window diffs and Parquet export. See Capture index. - One finding shape. Every detector returns
data.findingswith a stable id, evidence anchors, a nativetsharkcommand to re-check it and candidate ATT&CK techniques. - Case files.
wireshark_casekeeps captures, recorded results, findings and analyst verdicts in a JSON case file, so a long investigation survives a context reset. See Findings and cases.
Upgrading from 3.x needs no configuration change. Scripts that parsed the plain-text output of wireshark_detect_beaconing, wireshark_detect_exfiltration, wireshark_detect_protocol_anomalies, wireshark_detect_arp_spoofing, wireshark_yara_scan or wireshark_quick_analysis should read the JSON envelope instead. Full notes: 4.0.0 changelog.
Install
Claude Code / Codex plugin route
Prerequisites: uv and Wireshark CLI (tshark). The plugin includes this project and both skills; the client runs the locked Python project through uv over stdio. It does not install Wireshark or capture drivers.
From a checkout containing these plugin manifests, choose your client:
See plugin distribution for local installation, old-version refresh, environment settings and the GitHub entrypoint after publication. Choose this route or the traditional registration route below, not both.
Traditional Python package route
Prerequisites: Python 3.10+ and Wireshark with tshark on PATH.
Wireshark MCP runs on the stable MCP Python SDK 2.x line (mcp>=2.1.1,<3).
For scripts/non-interactive terminals, select clients explicitly. Preview before installing into the current project:
The default scope is global. Repeat --client or explicitly use --client all. Restart the client to load configuration. See the installation guide for updates, removal, backups and exit codes.
Optional extras add features on top of the base install: index (DuckDB capture index for large captures), geoip (GeoIP enrichment) and yara (YARA scanning), or all:
The container image and the plugin route ship without extras. Every setting, extra and limit is listed in the configuration reference.
The project also ships MCP and full TShark CLI analysis skills; see skill discovery and usage.
Run wireshark-mcp doctor if anything looks off. See docs/manual-configuration.md for manual setup or platform-specific notes.
Quick Start
Point your AI client at a .pcap file and try:
For a large capture, or several related ones, build the index first and keep the investigation in a case file:
Tools
54 tools, each backed by real tshark output — organized into categories:
One tool covers 25 protocols rather than 25 tools covering one each: wireshark_analyze_protocol takes a protocol argument (tls_handshakes, mqtt, modbus, s7comm, zigbee, wifi, rtp, kerberos, …) and applies the right fields and display filter for it. The field names are the point — s7comm.param.item.dbnum is not something a caller should have to guess, and a wrong guess returns an empty result that reads like a clean capture.
The server starts with only tshark required. Optional tools (capinfos, mergecap, editcap, dumpcap, text2pcap) are auto-detected and enable extra features when present.
Context cost
The tool list travels in the prompt prefix of every request your client sends, so its size is a fixed per-request cost. The default surface is ~23 KB — about 9 KB of parameter schema, 5 KB of descriptions, and 3 KB of read/write annotations — and it is byte-identical across restarts so clients can cache the prefix rather than re-reading it each session.
If your client never captures live traffic or writes pcaps, --profile advertises less:
Runtime prompts and protocol recommendations respect the selected profile. Static guides may describe full-only workflows, but the server never recommends an excluded tool during capture discovery.
Tool results are bounded too, since a result stays in the conversation for the rest of the session. Output over 8000 characters is truncated head-and-tail with a marker, and the tool's offset / limit / display_filter parameters are the way to page through the rest. Raise or lower the ceiling with:
Every tool also declares whether it reads or writes, so clients can auto-approve the 41 read-only analysis tools and still prompt for the 12 that create files (live capture, merge, filter-save, editcap, text2pcap, frame extract, object export, case files). wireshark_index is marked non-destructive: it writes only the server's own index cache.
Since 3.0, those tools fail closed until WIRESHARK_MCP_ALLOWED_DIRS names existing directories. Remote HTTP/SSE binding also stays loopback-only unless --allow-insecure-http is explicitly supplied behind a trusted authenticated TLS proxy. See the 3.0 security migration guide.
Documentation
Development
See CONTRIBUTING.md for the full guide.
来源:README.md,提交 23afd00
工具
0版本历史
1- v0.6.5最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分