mcp-wireshark
v0.5.1[Unofficial/Community] MCP server for Wireshark/tshark integration with AI tools
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
check_installation
Check if Wireshark/tshark is installed and return version info.
list_interfaces
List all network interfaces available for packet capture.
read_pcap
Read and analyze packets from a .pcap or .pcapng file. Returns a preview of up to 5 packets in JSON plus the total match count.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the .pcap or .pcapng file |
display_filter | string | Wireshark display filter to apply (optional) |
packet_count | number | Maximum number of packets to read (default: 100) |
display_filter
Apply a Wireshark display filter to a pcap file and return a preview of matching packets.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the .pcap or .pcapng file |
filter * | string | Wireshark display filter (e.g., 'tcp.port == 80', 'http') |
packet_count | number | Maximum number of packets to return (default: 100) |
summarize_pcap
Get a high-level summary of a pcap file: I/O stats, protocol hierarchy, and top IP conversations. Prefer this over read_pcap when the goal is to characterize a capture.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the .pcap or .pcapng file |
stats_by_proto
Generate the protocol hierarchy statistics for a pcap file.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the .pcap or .pcapng file |
follow_tcp
Follow a TCP stream by index and return its ASCII payload.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the .pcap or .pcapng file |
stream_id | number | TCP stream index to follow (default: 0) |
follow_udp
Follow a UDP stream by index and return its ASCII payload.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the .pcap or .pcapng file |
stream_id | number | UDP stream index to follow (default: 0) |
expert_info
Run tshark expert analysis on a pcap file. Returns warnings, errors, and notes grouped by severity. Useful for diagnosing protocol issues without reading individual packets.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the .pcap or .pcapng file |
severity | string | Minimum severity to report: 'chat', 'note', 'warn', or 'error' (default: 'warn') |
decode_protocol
Extract protocol-specific fields from a pcap file using tshark '-T fields'. Pass a known protocol name to use curated defaults (supported: dns, goose, http, icmp, mms, sip, sv, tls), or supply your own 'fields' list for any other protocol. Returns a tab-separated table — much smaller than full JSON. Use a 'filter' to narrow results (e.g. only request packets, only specific stNum values).
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the .pcap or .pcapng file |
protocol * | string | Protocol name or display filter (e.g. 'http', 'goose', 'mms', 'sv', 'sip', or any tshark display filter such as 'icmp.type == 8') |
fields | array | Optional override of the field list. If omitted and the protocol has curated defaults, those are used. Required for protocols without defaults. Max 20 fields. |
filter | string | Optional additional display filter ANDed with the protocol filter (e.g. 'goose.stNum >= 5'). Numeric comparisons with == != >= <= are supported. |
packet_count | number | Maximum number of packets to return (default: 50) |
protocol_stats
Run a tshark '-z' aggregate-statistics report on a pcap file and return its parsed output. Use this for protocol-hierarchy, conversation, endpoint, and per-protocol stat tables — much more compact than per-packet JSON. Supported (protocol, variant) pairs: conv: eth, ip, ipv6, tcp, udp; dns: tree; endpoints: eth, ip, ipv6, tcp, udp; http: stat, tree; http_req: tree; io: phs, stat; rpc: srt; sip: stat; smb: srt; smb2: srt.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the .pcap or .pcapng file |
protocol * | string | Stat family: 'io', 'conv', 'endpoints', 'http', 'http_req', 'dns', 'smb', 'smb2', 'rpc', 'sip' |
variant * | string | Variant within the family: e.g. 'phs', 'stat', 'tree', 'srt', 'ip', 'ipv6', 'tcp', 'udp', 'eth' |
max_lines | number | Maximum number of output lines to return (default: 100). Conversation/endpoint tables can be very long. |
analyze_iec61850
Analyze an IEC 61850 capture for protocol health and return a compact, worst-first OK/WARN/FAIL report per source. protocol is one of 'goose' (stNum/sqNum gaps, timeAllowedtoLive violations, state-change storms), 'sv' (smpCnt continuity, loss of time sync, confRev changes), or 'mms' (error/reject PDUs, unpaired requests, slow responses). Streams matching frames and returns a bounded summary.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the .pcap or .pcapng file |
protocol * | string | IEC 61850 protocol to analyze |
filter | string | Optional display filter ANDed with the protocol filter to scope to one gocbRef/svID/host (e.g. goose.gocbRef contains "gcb01"). Filters on sequence numbers, timestamps, or PDU types can hide packets n… |
live_capture
Capture live network traffic from an interface. Writes to a temporary pcap that is deleted after the preview is returned.
| Parameter | Type | Description |
|---|---|---|
interface * | string | Network interface name (e.g., eth0, Wi-Fi) |
display_filter | string | Wireshark display filter to apply (optional) |
duration | number | Capture duration in seconds (default: 10, max: 300) |
packet_count | number | Maximum number of packets to capture (optional) |
export_json
Export packets from a pcap file to a JSON file at output_path. Creates the output file if it does not exist; overwrites if it does.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Path to the source .pcap or .pcapng file |
output_path * | string | Path where the JSON output will be written |
display_filter | string | Wireshark display filter to apply (optional) |
packet_count | number | Maximum number of packets to export (default: 1000) |