mcp-wireshark
The mcp-wireshark server gives AI assistants direct access to Wireshark/tshark, enabling network traffic analysis, filtering, capture, and export. Capabilities include:
Installation check – Verify tshark is installed and view its version.
Interface listing – List all available network interfaces for live capture.
Packet reading – Load and preview packets from
.pcap/.pcapngfiles with optional display filters.Display filtering – Apply Wireshark display filter syntax (e.g.,
tcp.port == 80,dns) to captured traffic.High-level summary – Get I/O stats, protocol hierarchy, and top talkers from a capture file.
Protocol hierarchy statistics – Break down traffic by protocol layer.
Follow TCP/UDP streams – Reassemble and read the payload of a specific TCP or UDP stream by index.
Expert analysis – Surface tshark's built-in warnings, errors, and notes grouped by severity.
Protocol field decoding – Extract specific protocol fields (HTTP, DNS, TLS, GOOSE, SV, MMS, SIP, ICMP, or custom fields) as a compact table.
Aggregate statistics – Run tshark
-zreports for conversations, endpoints, HTTP/DNS/SMB stats, and more.IEC 61850 health analysis – Triage GOOSE, Sampled Values (SV), and MMS captures for sequence gaps, TTL violations, sync issues, and errors.
Live capture – Capture real-time traffic from an interface (capped at 5 minutes / 10,000 packets) with optional filtering.
Export to JSON – Export packets from a pcap file to a JSON file at a user-specified path, with optional filtering.
All tools enforce security constraints: file path validation, display filter sanitization, no shell injection, and hard caps on packet count and capture duration.
Provides tools for analyzing packet captures, including reading pcap files, applying display filters, following TCP/UDP streams, summarizing traffic, decoding protocols, and capturing live traffic via tshark.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-wireshark From ./traffic.pcap, show me only HTTP requests."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-wireshark
Community-maintained MCP server for Wireshark /
tshark. Not affiliated with Wireshark or Anthropic. Give your AI assistant direct access to packet captures. Ask Claude to summarize a.pcap, follow a TCP stream, filter for a specific protocol, or capture live traffic — all without leaving the chat.

Quick start with Claude Code
pip install mcp-wireshark
claude mcp add --transport stdio --scope user mcp-wireshark -- mcp-wiresharkThat's it. Open Claude Code and try:
"Summarize ./capture.pcap and tell me which IPs talked the most."
--scope user makes the server available across every Claude Code project. Drop the flag to install it for the current project only. See claude mcp docs for more.
Verify the install
claude mcp listYou should see mcp-wireshark listed. Inside Claude Code, ask:
"Run check_installation."
If tshark is on your PATH, it returns the version. If not, see troubleshooting.
Related MCP server: Wireshark-MCP
Tools
The server exposes 14 tools, split cleanly between read tools (safe, no side effects) and write tools (capture traffic or write files). Both groups are annotated with the standard MCP readOnlyHint so any compliant client can surface the distinction.
Read tools
Safe to call freely — they only inspect state.
Tool | What it does |
| Verify tshark is installed and show version |
| List network interfaces available to capture from |
| Read packets from a |
| Apply a Wireshark display filter to a pcap |
| High-level summary: I/O stats, protocol hierarchy, top talkers |
| Protocol hierarchy statistics |
| Reassemble a TCP stream and return its payload |
| Reassemble a UDP stream and return its payload |
| tshark expert analysis: warnings, errors, and notes grouped by severity |
| Extract protocol fields as a TSV table. Curated defaults for HTTP, DNS, TLS, GOOSE, MMS, SV, SIP, ICMP; arbitrary fields for any other protocol |
| Aggregate |
| Health triage for GOOSE/SV/MMS captures: per-source OK/WARN/FAIL with sqNum/stNum gaps, TTL violations, smpCnt discontinuities, lost sync, and MMS errors |
Write tools
These create files or capture live traffic. Compliant clients may prompt before invoking.
Tool | What it does |
| Capture live traffic from an interface (capped at 5 minutes / 10k packets) |
| Export packets from a pcap to a JSON file at a path you choose |
See it in action
These clips run the real tools against demo/demo.pcapng — a
short home-network capture. Regenerate them with python demo/render_gif.py <scene>.
summarize_pcap — characterize an unknown capture at a glance

decode_protocol — filter to a protocol and get a compact table (here: TLS SNI and DNS-over-HTTPS lookups)

expert_info — let tshark surface the warnings and anomalies for you

Example prompts
Drop these into Claude Code as-is:
List my network interfaces.
Summarize ./traffic.pcap.
From ./traffic.pcap, show me only HTTP requests.
Follow TCP stream 0 in ./traffic.pcap and tell me what protocol is in it.
Capture 30 seconds of traffic on Wi-Fi filtered to tcp.port == 443.
Export every DNS packet from ./traffic.pcap to ./dns.json.
Decode the GOOSE messages in ./substation.pcapng — only stNum >= 1.
Run expert analysis on ./traffic.pcap and group findings by severity.
Show me the IP conversations in ./traffic.pcap.Useful display filters
Filter | Matches |
| HTTP |
| HTTPS |
| All DNS |
| HTTP requests only |
| Traffic to/from a specific host |
| TCP SYN packets only |
For substation engineers analyzing IEC 61850 traffic:
Filter | Matches |
| All GOOSE messages |
| GOOSE messages with state changes |
| All MMS traffic |
| Sampled Values |
Other clients
Anything that speaks MCP works. The package installs an mcp-wireshark binary on PATH.
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"wireshark": {
"command": "mcp-wireshark"
}
}
}Create .vscode/mcp.json in your workspace:
{
"servers": {
"wireshark": {
"command": "mcp-wireshark"
}
}
}Use the same stdio invocation: command: mcp-wireshark. No transport flags.
Prerequisites
Python 3.10+
Wireshark installed;
tsharkreachable onPATH
Install with pip or uv:
pip install mcp-wireshark
# or
uvx mcp-wiresharkTroubleshooting
Add Wireshark to your system PATH:
Press
Win+R→ runsysdm.cpl→ Advanced → Environment VariablesEdit
Path→ addC:\Program Files\WiresharkRestart your terminal and Claude Code, then re-run
check_installation
(Avoid passing PATH through claude mcp add --env — values are taken literally, no %PATH% expansion.)
Add yourself to the wireshark group, then log out and back in:
sudo usermod -aG wireshark $USERConfirm the interface name from
list_interfaces(Wireshark uses different names thanifconfig/ip)On macOS, you may need to install ChmodBPF (ships with the Wireshark
.dmg)Check that no display filter is excluding everything
Development
git clone https://github.com/khuynh22/mcp-wireshark.git
cd mcp-wireshark
python -m venv venv && source venv/bin/activate # Windows: venv\Scripts\activate
pip install -e ".[dev]"
pytest # tests
black src tests # format
ruff check src tests # lint
mypy src # type checkThe codebase is organized so new tools land in one of two clearly-scoped files:
src/mcp_wireshark/read_tools.py— anything that just inspects statesrc/mcp_wireshark/write_tools.py— anything that captures traffic or writes files
server.py only contains routing. See CLAUDE.md and CONTRIBUTING.md.
Security
Every file path is validated (.. rejected, extension allow-listed). Every display filter is checked for shell metacharacters. tshark is always invoked via asyncio.create_subprocess_exec, never shell=True. Hard caps: 10k packets per call, 5 min per live capture. See SECURITY.md.
License
MIT — see LICENSE.
Available Tools
14 toolsanalyze_iec61850ARead-only
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.
Inputs: protocol (required), file_path (required), filter.
check_installationARead-only
Check if Wireshark/tshark is installed and return version info.
Inputs: no named parameters.
decode_protocolARead-only
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).
Inputs: protocol (required), file_path (required), fields, filter, +1 more.
display_filterARead-only
Apply a Wireshark display filter to a pcap file and return a preview of matching packets.
Inputs: filter (required), file_path (required), packet_count.
expert_infoARead-only
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.
Inputs: file_path (required), severity.
export_jsonA
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.
Inputs: file_path (required), output_path (required), packet_count, display_filter.
follow_tcpARead-only
Follow a TCP stream by index and return its ASCII payload.
Inputs: file_path (required), stream_id.
follow_udpARead-only
Follow a UDP stream by index and return its ASCII payload.
Inputs: file_path (required), stream_id.
list_interfacesARead-only
List all network interfaces available for packet capture.
Inputs: no named parameters.
live_captureA
Capture live network traffic from an interface. Writes to a temporary pcap that is deleted after the preview is returned.
Inputs: interface (required), duration, packet_count, display_filter.
protocol_statsARead-only
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.
Inputs: variant (required), protocol (required), file_path (required), max_lines.
read_pcapARead-only
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.
Inputs: file_path (required), packet_count, display_filter.
stats_by_protoBRead-only
Generate the protocol hierarchy statistics for a pcap file.
Inputs: file_path (required).
summarize_pcapARead-only
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.
Inputs: file_path (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Several analysis tools overlap: summarize_pcap, stats_by_proto, and protocol_stats can all produce protocol-hierarchy-style output, and read_pcap vs display_filter are close but distinguishable. The descriptions help guide selection (e.g., prefer summarize_pcap over read_pcap), but stats_by_proto in particular looks like a narrower duplicate of protocol_stats.
Most names follow a verb_noun pattern: follow_tcp, read_pcap, summarize_pcap, decode_protocol, export_json. A few are noun phrases or non-verb-led (stats_by_proto, expert_info, protocol_stats, live_capture), but the overall convention remains readable and predictable.
Fourteen tools is well within the ideal range for a packet-analysis server and covers distinct stages from setup checks and capture to analysis and export. The count is well scoped, even if a couple of analysis tools are redundant.
The surface covers installation checks, interface discovery, live capture, pcap reading/filtering, summaries, protocol statistics, stream following, field decoding, and export. Minor gaps exist, such as detailed single-packet inspection and pcap-to-pcap filtering/merging, but core workflows are covered.
Maintenance
Related MCP Connectors
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
IP intelligence, network diagnostics, and AI service availability tools for AI agents.
AI helper for choosing and speccing network & security products from Cisco, Arista, Juniper and more
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides AI assistants with direct access to Wireshark network analysis capabilities, enabling AI-powered network troubleshooting, packet analysis, and network monitoring through a secure interface.14MIT
- AlicenseCqualityDmaintenanceEnables LLMs to perform automated network forensics, threat hunting, and traffic analysis using Wireshark/TShark.344MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to analyze network traffic using Wireshark/tshark, providing packet statistics, protocol analysis, and anomaly detection through natural language interaction.75MIT
- AlicenseNot gradedqualityDmaintenanceEnables natural language analysis of network packet captures, including protocol detection, flow analysis, and security threat identification, integrated with AI assistants.3MIT