wireshark-mcp
Provides tools for capturing live network traffic and analyzing capture files using Wireshark's tshark, dumpcap, and capinfos, including packet summaries, protocol hierarchies, conversations, endpoints, expert info, IO stats, and stream reassembly.
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., "@wireshark-mcp Start a 30-second capture on Wi-Fi and show me the top TCP conversations."
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.
wireshark-mcp
An MCP server that exposes Wireshark's CLI tools (tshark, dumpcap,
capinfos) to a local LLM client. It lets a model start bounded live
captures and analyze existing capture files — packet summaries, protocol
hierarchies, conversations, endpoints, expert info, stream reassembly —
without ever handing it a shell.
Security
This server lets a local language model capture and read your network traffic. That is its purpose, and you should install it only if you want that.
What it does to stay bounded:
No shell. Every subprocess runs with
shell=Falseand an argument list built in code. The model supplies typed values, never flags.No arbitrary-command tool. There is no
run_tshark. The tool surface is fixed.Path sandbox. Capture files are read only from the server's own workdir and from directories you list in
read_only_dirs. Traversal, symlink escapes, UNC paths, and drive-relative paths are rejected.Bounded captures. Every capture requires both a duration and a packet cap, ceilings 300 seconds and 100,000 packets. An unbounded capture cannot be requested.
Interface allowlist. Set
interface_allowlistto limit which interfaces can be captured on.Audit log. Every capture and every read is appended to
audit.login the workdir.
What it does not protect you from: captured packets contain whatever crossed the wire, including credentials sent over cleartext protocols. Anything the model reads from a capture is in the model's context.
Related MCP server: Wireshark MCP
Prerequisites
Wireshark (which bundles tshark, dumpcap, and capinfos) must be
installed and on PATH, or pointed to explicitly in config.toml.
Supported platforms: macOS and Windows. Linux is expected to work but is untested and is not a release target.
macOS
Install Wireshark (e.g.
brew install --cask wireshark).For non-root live capture, install ChmodBPF (bundled with the Wireshark installer/cask) so your user can open
/dev/bpf*. Without it, live capture requires running as root; file analysis works regardless.
Windows
Install Wireshark, which offers to install Npcap — required for live capture.
If Npcap was installed with "Restrict Npcap driver's access to Administrators only", the MCP client (e.g. LM Studio) must run elevated for live capture to work. File analysis works either way.
Install and run
uvx --from git+https://github.com/MrDadpool/wireshark-mcp wireshark-mcpThis runs the wireshark-mcp console script (wireshark_mcp.server:main)
over stdio, for use by any MCP-speaking client.
Use with LM Studio
Add to LM Studio's mcp.json (Program → Install → Edit mcp.json):
{
"mcpServers": {
"wireshark": {
"command": "uvx",
"args": ["--from", "git+https://github.com/MrDadpool/wireshark-mcp", "wireshark-mcp"]
}
}
}On Windows, if Npcap was installed with "Restrict Npcap driver's access to Administrators only", LM Studio must run elevated for live capture to work. File analysis works either way.
Tools
There are 12 tools. Ceilings: duration_s <= 300, max_packets <= 100,000,
limit <= 500.
Tool | Parameters | Description |
| — | List capture interfaces, with whether live capture is currently permitted. |
|
| Capture live packets on an interface. Always bounded by both duration and packet count. |
| — | List capture files this server has stored. |
|
| One line per packet, optionally narrowed by a Wireshark display filter. |
|
| Full decoded protocol tree for a single frame. |
|
|
|
|
| Protocol hierarchy statistics for the whole capture. |
|
| Conversation statistics. |
|
| Endpoint statistics. |
|
| Traffic volume over time, bucketed by |
|
| Wireshark expert info: retransmissions, resets, malformed packets, warnings. |
|
| Reassemble one stream as ASCII. |
There is deliberately no run_tshark or other arbitrary-command tool.
Configuration
The server reads an optional TOML file from its workdir:
macOS:
~/.wireshark-mcp/config.tomlWindows:
%LOCALAPPDATA%\wireshark-mcp\config.toml
See examples/config.toml for every available
setting (workdir, read_only_dirs, interface_allowlist, and
[binaries] overrides for tshark/dumpcap/capinfos). Every setting is
optional; a missing file is not an error.
Development
uv sync --extra dev
uv run ruff check .
uv run pytest -vTests are split into unit tests (always run) and two markers that require local capabilities not present on CI runners:
requires_tshark— needs a resolvabletsharkbinary.requires_capture— needs live capture permission on the host.
CI (.github/workflows/ci.yml) runs on macos-latest and windows-latest,
where Wireshark is not installed, so those two tiers skip there; that is
expected. The platform, sandbox, argv, and error tests are what CI actually
guards, and they are the tests that catch cross-platform regressions.
Available Tools
12 toolscapture_infoC
capinfos summary: packet count, duration, byte totals, encapsulation.
Inputs: capture (required).
conversationsC
Conversation statistics. type is one of tcp, udp, ip, eth.
Inputs: capture (required), type.
endpointsC
Endpoint statistics. type is one of tcp, udp, ip, eth.
Inputs: capture (required), type.
expert_infoC
Wireshark expert info: retransmissions, resets, malformed packets, warnings.
Inputs: capture (required).
follow_streamC
Reassemble one stream as ASCII. protocol is one of tcp, udp, http.
Inputs: capture (required), index, protocol.
io_statsC
Traffic volume over time, bucketed by interval_s seconds.
Inputs: capture (required), interval_s.
list_capturesA
List capture files this server has stored.
Inputs: no named parameters.
list_interfacesA
List capture interfaces, with whether live capture is currently permitted.
Inputs: no named parameters.
packet_detailB
Full decoded protocol tree for a single frame.
Inputs: capture (required), frame_no (required).
packet_summaryB
One line per packet, optionally narrowed by a Wireshark display filter.
Inputs: capture (required), limit, display_filter.
protocol_hierarchyC
Protocol hierarchy statistics for the whole capture.
Inputs: capture (required).
start_captureB
Capture live packets on an interface. Always bounded by BOTH duration_s and max_packets.
Inputs: interface (required), bpf_filter, duration_s, max_packets.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool targets a distinct task: capture management, packet inspection, and separate statistical views. packet_summary and packet_detail are clearly differentiated by granularity, and capture_info, protocol_hierarchy, conversations, endpoints, io_stats, and expert_info all answer different questions.
Names are readable lower_snake, but the pattern is mixed: list_captures, list_interfaces, start_capture, and follow_stream are verb_noun while packet_summary, packet_detail, capture_info, protocol_hierarchy, conversations, endpoints, io_stats, and expert_info are noun-style result names. The split between command-style and result-style names is noticeable but not chaotic.
Twelve tools is a well-scoped set for a Wireshark-oriented server: capture control, packet inspection, and a range of statistical analyses each earn their place. It stays within the ideal range and avoids unnecessary overlap.
The surface covers the core workflow: discover interfaces, start bounded captures, list stored captures, inspect frames, and compute standard Wireshark statistics. It includes both packet-level detail and protocol/expert diagnostics, so there are no obvious dead ends.
Maintenance
Related MCP Connectors
Provide detailed Pokémon data and information through a standardized MCP interface. Enable LLMs an…
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Remote streamable-HTTP MCP server running on a single Cloudflare Worker. Your assistant gets live Airbnb, Amazon, Booking.com, Google Flights, Maps and Reddit data, social search on X, Instagram and TikTok, the Meta Ad Library, and image/video generation without any keys. Connect your own accounts to let it send WhatsApp or Telegram messages, work an IMAP inbox, manage Meta Ads campaigns and publish to X and LinkedIn. OAuth 2.1 with PKCE; stored credentials are AES-256-GCM encrypted.
Read-only Linux server and Docker monitoring for AI assistants: CPU, memory, disk, network.
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
- FlicenseNot gradedqualityDmaintenanceExposes Wireshark/tshark packet capture, analysis, threat detection, and reporting tools for AI agents and local testing.-
- AlicenseCqualityDmaintenanceEnables LLMs to perform automated network forensics, threat hunting, and traffic analysis using Wireshark/TShark.344MIT
- FlicenseCqualityDmaintenanceEnables LLMs to capture, analyze, and summarize network traffic using Wireshark CLI tools, supporting live capture, pcap analysis, and LLM-oriented summaries.76-