Wireshark MCP
Works with any stdio MCP host (Cursor, Claude, VS Code, custom agents).
When to use
- Live or offline packet analysis via the
wiresharkMCP server - Choosing the right tool (
quick_capture, DNS/HTTP analysis, expert info, etc.) - Editing this repository’s MCP tools/prompts
Hard rules
- Call
list_interfacesfirst; pass an exact returned interface name. - Prefer short captures (
duration3–10s, modestpacket_limit). - Never invent traffic. If a tool returns
Error: ..., report that failure. - Only capture traffic you are authorized to inspect.
- Treat pcaps and verbose dumps as sensitive; redact secrets before sharing.
Setup / online status
Hosts show the MCP online only after the process starts. This server exits if TShark is missing. If offline:
python -m wireshark_mcp doctorpython -m wireshark_mcp setup(prompts for TShark path; writes/printsmcpServersJSON)- Reload/restart MCP in the host
In-session: check_environment, configure_tshark. See docs/Setup.md.
Tool cheat-sheet
| Goal | Tool |
|---|---|
| Deps / path | check_environment, configure_tshark |
| List NICs | list_interfaces |
| Quick sample | quick_capture |
| Quick insights | quick_traffic_analysis |
| Deep tabular | deep_packet_analysis |
| Protocol tree | protocol_hierarchy_statistics |
| DNS | analyze_dns_traffic |
| HTTP/TLS tables | analyze_http_traffic_tabular |
| Offline summary | read_pcap_file |
| HTTP from file | analyze_http_traffic |
| Display filter | filtered_packet_display |
| Expert warnings | expert_information |
| Save pcap | save_capture_to_file |
MCP prompts
investigate_live_trafficanalyze_pcap_filesecurity_traffic_reviewsafe_capture_rulespacket_capture_help
Local run
python -m wireshark_mcp setup
python -m wireshark_mcp
Requires TShark (PATH or TSHARK_PATH) and Npcap (Windows) / libpcap (Unix) for live capture.