mcp-wireshark

v0.5.1
mcp-wireshark Checked 3 hours ago Published 19 days ago

[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.

ParameterTypeDescription
file_path *stringPath to the .pcap or .pcapng file
display_filterstringWireshark display filter to apply (optional)
packet_countnumberMaximum 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.

ParameterTypeDescription
file_path *stringPath to the .pcap or .pcapng file
filter *stringWireshark display filter (e.g., 'tcp.port == 80', 'http')
packet_countnumberMaximum 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.

ParameterTypeDescription
file_path *stringPath to the .pcap or .pcapng file

stats_by_proto

Generate the protocol hierarchy statistics for a pcap file.

ParameterTypeDescription
file_path *stringPath to the .pcap or .pcapng file

follow_tcp

Follow a TCP stream by index and return its ASCII payload.

ParameterTypeDescription
file_path *stringPath to the .pcap or .pcapng file
stream_idnumberTCP stream index to follow (default: 0)

follow_udp

Follow a UDP stream by index and return its ASCII payload.

ParameterTypeDescription
file_path *stringPath to the .pcap or .pcapng file
stream_idnumberUDP 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.

ParameterTypeDescription
file_path *stringPath to the .pcap or .pcapng file
severitystringMinimum 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).

ParameterTypeDescription
file_path *stringPath to the .pcap or .pcapng file
protocol *stringProtocol name or display filter (e.g. 'http', 'goose', 'mms', 'sv', 'sip', or any tshark display filter such as 'icmp.type == 8')
fieldsarrayOptional override of the field list. If omitted and the protocol has curated defaults, those are used. Required for protocols without defaults. Max 20 fields.
filterstringOptional additional display filter ANDed with the protocol filter (e.g. 'goose.stNum >= 5'). Numeric comparisons with == != >= <= are supported.
packet_countnumberMaximum 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.

ParameterTypeDescription
file_path *stringPath to the .pcap or .pcapng file
protocol *stringStat family: 'io', 'conv', 'endpoints', 'http', 'http_req', 'dns', 'smb', 'smb2', 'rpc', 'sip'
variant *stringVariant within the family: e.g. 'phs', 'stat', 'tree', 'srt', 'ip', 'ipv6', 'tcp', 'udp', 'eth'
max_linesnumberMaximum 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.

ParameterTypeDescription
file_path *stringPath to the .pcap or .pcapng file
protocol *stringIEC 61850 protocol to analyze
filterstringOptional 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.

ParameterTypeDescription
interface *stringNetwork interface name (e.g., eth0, Wi-Fi)
display_filterstringWireshark display filter to apply (optional)
durationnumberCapture duration in seconds (default: 10, max: 300)
packet_countnumberMaximum 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.

ParameterTypeDescription
file_path *stringPath to the source .pcap or .pcapng file
output_path *stringPath where the JSON output will be written
display_filterstringWireshark display filter to apply (optional)
packet_countnumberMaximum number of packets to export (default: 1000)