wireshark-gui-mcp
Drives the local Wireshark toolchain on Windows: enumerates interfaces and performs bounded live captures via dumpcap, runs tshark/capinfos for display-filtered packet reads with field projection and pagination, protocol hierarchy, conversation and endpoint statistics, stream reassembly (ASCII/hex/raw), and packet detail trees. Also controls the desktop Wireshark.exe GUI, opening a capture at a specified display filter (-Y), packet number (-g) or jump filter (-J) and grabbing a Win32 PrintWindow PNG screenshot of the window.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
wireshark-gui-mcp
Local Windows Model Context Protocol (MCP) server for Wireshark. Combines headless packet capture and analysis (dumpcap.exe, tshark.exe, capinfos.exe) with desktop Wireshark.exe GUI control and native Win32 window screenshot capture over stdio.
Most Wireshark MCP servers are CLI-only tshark wrappers. wireshark-gui-mcp bridges both modes:
Headless analysis + desktop GUI handoff: Triage a capture with
dumpcapandtshark, jumpWireshark.exedirectly to a display filter (-Y), packet number (-g), or jump filter (-J), and capture a clean PNG of the GUI window via Win32PrintWindow.Context-budget protection:
wireshark_read_packetsdefaults to-n(no reverse-DNS stalls),fieldsprojection, paginatedlimit/offset, and early-stop-cso large.pcapngfiles do not stall or overflow model context. Live captures require bounded stop conditions (duration_seconds1-300 orpacket_count1-100,000).Single-call composite workflows:
wireshark_triage_pcapruns packet count, protocol hierarchy, TCP conversations, and packet preview in parallel (asyncio.gather), whilewireshark_open_and_screenshotlaunches the GUI, captures the PNG, and optionally closes the window in one tool call.

flowchart LR
Client["MCP Client (Antigravity / Claude / Cursor)"] -->|"stdio (JSON/Markdown)"| Server["wireshark-gui-mcp"]
Server -->|"interfaces & live capture"| Dumpcap["dumpcap.exe"]
Server -->|"filter, dissect, follow, stats"| Tshark["tshark.exe / capinfos.exe"]
Server -->|"launch -r -Y -g -J & Win32 PrintWindow"| GUI["Wireshark.exe (Windows GUI)"]Use Cases
Incident triage with human handoff: Let an agent scan a noisy
.pcapngfor retransmissions, resets, or DNS errors, then openWireshark.exeon the exact offending frame for interactive review or attach a screenshot directly to a ticket.Socket, API, and backend QA: Capture loopback or interface traffic during integration tests to inspect 3-way handshakes, HTTP/TLS streams, timeouts, and
FINvsRSTteardown behavior.Security triage and CTF forensics: Extract top talkers (
endpoints,ip), DNS query stats (dns,tree), and reassembledtcp/udp/tls/httppayloads in ASCII, hex, or raw format.Reproducible technical documentation: Capture traffic and generate consistent Wireshark GUI PNGs programmatically for runbooks, postmortems, and lab reports.
Related MCP server: WiFi PCAP Analyzer MCP
Quickstart
Requirements
Windows 10 or Windows 11
Wireshark 4.2+ installed with
tshark.exe,dumpcap.exe,capinfos.exe,Wireshark.exe, and Npcap (enable Npcap loopback support for\Device\NPF_Loopbackcaptures)Python 3.12+ and
uv
Choose either automated setup with an AI agent or manual installation below.
Option 1: Setup with an AI Agent
Paste this prompt into an AI coding agent (Antigravity, Claude Code, Cursor, or Codex) to check prerequisites, install dependencies, register the MCP server, and verify it on Windows:
Set up the wireshark-gui-mcp server from https://github.com/Erlangga235/wireshark-gui-mcp.git on this Windows machine:
1. Check prerequisites:
- Confirm Python 3.12+ and `uv` are installed (`uv --version`; if missing, install `uv` via `winget install --id astral-sh.uv -e` or ask me to install it).
- Locate Wireshark binaries (`tshark.exe`, `dumpcap.exe`, `capinfos.exe`, `Wireshark.exe`) in `C:\Program Files\Wireshark` or on `PATH`. If Wireshark or Npcap is missing, install `WiresharkFoundation.Wireshark` via winget or stop and ask me to run the Wireshark/Npcap installer with loopback capture enabled.
2. Clone the repo to a clean local directory (or use the current workspace if already cloned) and run `uv sync` to create `.venv` with `mcp`, `pillow`, and `pydantic`.
3. Verify the installation and Wireshark/Npcap access:
- Run `uv run python -c "import asyncio; from wireshark_mcp import server, tshark; print('tools:', len(asyncio.run(server.mcp.list_tools())), 'interfaces:', len(asyncio.run(tshark.list_interfaces())))"` (if `dumpcap -D` reports no interfaces, remind me to enable/reinstall Npcap with loopback support).
4. Register `"wireshark"` in my active MCP client config (`mcp_config.json`, `claude_desktop_config.json`, or `.cursor/mcp.json`) without removing existing servers:
- `command`: `"uv"`
- `args`: `["--directory", "<repo>", "run", "wireshark-mcp"]`
- Only add `env` (`WIRESHARK_DIR`) if Wireshark is installed outside `PATH` and `C:\Program Files\Wireshark`.
5. Tell me to reload the MCP client, then confirm `wireshark_list_interfaces` works.Option 2: Manual Setup
If you prefer to install and configure it manually:
Clone the repository and sync dependencies:
git clone https://github.com/Erlangga235/wireshark-gui-mcp.git
cd wireshark-gui-mcp
uv syncAdd the server to your MCP client configuration (Antigravity
mcp_config.json, Claude Desktopclaude_desktop_config.json, or Cursor.cursor/mcp.json):
{
"mcpServers": {
"wireshark": {
"command": "uv",
"args": ["--directory", "C:\\path\\to\\wireshark-gui-mcp", "run", "wireshark-mcp"]
}
}
}Optional env overrides if needed: WIRESHARK_DIR (when Wireshark is not on PATH or in C:\Program Files\Wireshark) and WIRESHARK_MCP_OUTPUT_DIR (defaults to <repo>\artifacts).
Example Workflows
These scenarios require correlating fields across multiple protocols, pivoting between summary stats and individual frames, and producing desktop visual proof—work that normally takes several manual filter passes in Wireshark.
Root-cause intermittent HTTPS/TLS failures in a large capture
Problem: A noisy production
.pcapngmixes normal traffic with sporadic port 443 resets or TLS handshake alerts, making manual scrolling slow.Prompt: "Analyze
checkout_fail.pcapngfor failed or reset port 443 connections, inspect the failing TLS handshake parameters, and capture a Wireshark screenshot of the reset frame for the incident ticket."Automated MCP chain:
wireshark_triage_pcap(pcap_file="checkout_fail.pcapng", display_filter="tcp.port == 443 || dns")— gets packet count, protocol hierarchy, and active TCP conversations in parallel.wireshark_read_packets(pcap_file="checkout_fail.pcapng", display_filter="(tls.alert_message || tcp.flags.reset == 1) && tcp.port == 443", fields=["frame.number", "frame.time_relative", "tcp.stream", "ip.src", "ip.dst", "tls.alert_message.desc", "_ws.col.info"])— pulls only port 443 error frames via-nand early-stop-c(note:tls.alert_messagematches unencrypted pre-ServerHello alerts unless a TLS keylog file is configured in Wireshark).wireshark_read_packets(pcap_file="checkout_fail.pcapng", display_filter="tcp.stream == <N> && tls.handshake", fields=["frame.number", "tls.handshake.type", "tls.handshake.extensions_server_name", "tls.handshake.ciphersuite"])+wireshark_packet_details(pcap_file="checkout_fail.pcapng", packet_number=<frame>, output_mode="tree")— distinguishes ClientHello offered suites from ServerHello selected suite viatls.handshake.typeand inspects the failure layer.wireshark_open_and_screenshot(pcap_file="checkout_fail.pcapng", display_filter="tcp.stream == <N>", packet_number=<frame>, close_after=True)— jumpsWireshark.exeto the failing stream/frame and writes a ticket-ready PNG.
Hunt suspicious DNS and plaintext C2 / exfiltration in a forensic PCAP
Problem: Anomalous traffic hides inside thousands of benign frames as failed or unusually long DNS lookups, HTTP beacons, or raw TCP payloads on non-standard ports.
Prompt: "Check
endpoint_capture.pcapngfor rare external endpoints, NXDOMAIN bursts or long DNS queries, and non-TLS HTTP/raw TCP payloads; reconstruct the suspicious stream and save GUI evidence."Automated MCP chain:
wireshark_protocol_stats(pcap_file="endpoint_capture.pcapng", stat_type="endpoints,ip")+wireshark_protocol_stats(pcap_file="endpoint_capture.pcapng", stat_type="dns,tree")— surfaces unusual remote hosts and DNS error rates.wireshark_read_packets(pcap_file="endpoint_capture.pcapng", display_filter="dns.flags.rcode == 3 || dns.qry.name.len > 50 || http.request", fields=["frame.number", "ip.dst", "dns.qry.name", "http.host", "http.request.uri", "tcp.stream"], limit=100)+ a raw TCP passwireshark_read_packets(pcap_file="endpoint_capture.pcapng", display_filter="tcp.len > 0 && !tls && !http", fields=["frame.number", "ip.dst", "tcp.dstport", "tcp.stream", "tcp.len", "_ws.col.info"], limit=100)— catches NXDOMAIN responses, long DNS tunneling queries, HTTP beacons, and non-HTTP/non-TLS payloads without loading full packet trees.wireshark_follow_stream(pcap_file="endpoint_capture.pcapng", protocol="http", stream_index=<idx>, mode="ascii")(orprotocol="tcp", mode="hex"for binary protocols) — reassembles the full exfiltrated/command payload.wireshark_open_and_screenshot(pcap_file="endpoint_capture.pcapng", display_filter="tcp.stream == <idx>", packet_number=<first_frame>, close_after=True)— saves visual proof of the exact conversation.
Debug wire-level socket timeouts and framing bugs live
Problem: Intermittent timeout or abrupt-teardown bugs require capturing live with a BPF filter, checking per-stream inter-packet deltas and raw bytes, and handing the exact frame off to a developer.
Prompt: "Capture loopback traffic on port 5000 during my test run, find any stream with >10s gaps or
RSTteardown, inspect the raw bytes, and leave Wireshark open on that packet."Automated MCP chain:
wireshark_list_interfaces()->wireshark_capture_packets(interface="<loopback_id_or_name>", capture_filter="tcp port 5000", duration_seconds=20)— resolves the host's\Device\NPF_Loopbackinterface (Adapter for loopback traffic capture) dynamically and captures targeted traffic viadumpcap.exe.wireshark_read_packets(pcap_file=..., display_filter="tcp.time_delta > 10 || tcp.flags.reset == 1", fields=["frame.number", "tcp.time_delta", "tcp.stream", "tcp.flags.str", "tcp.len", "_ws.col.info"], limit=100)— uses per-streamtcp.time_deltaand filters beforelimit=100so concurrent streams or high packet counts do not hide stalls or late resets.wireshark_follow_stream(pcap_file=..., protocol="tcp", stream_index=<idx>, mode="hex")+wireshark_packet_details(pcap_file=..., packet_number=<frame>, output_mode="hex")— checks byte-level framing and TCP header flags.wireshark_open_gui(pcap_file=..., display_filter="tcp.stream == <idx>", packet_number=<frame>)— opensWireshark.exeon the desktop focused directly on the offending packet.
Tool Reference
Every tool accepts strict Pydantic-validated inputs (extra="forbid") and supports response_format ("markdown" or "json") where structured summaries apply.
Tool | Backend | Purpose | Key Options |
|
| List Windows capture interfaces. |
|
|
| Capture live traffic to |
|
|
| Filter, extract fields, and paginate packets. |
|
|
| Decode all protocol layers for one packet. |
|
|
| Reassemble a conversation payload. |
|
|
| Generate Wireshark protocol/endpoint tables. |
|
|
| Run packet count, |
|
|
| Launch desktop GUI on a file or live interface. |
|
| Win32 API | List open |
|
| Win32 | Capture a PNG from a Wireshark GUI window. |
|
|
| Open GUI on a capture/filter/packet, screenshot it, and optionally close it. |
|
| Win32 / | Close one or all open Wireshark GUI windows. |
|
Architecture & Performance
Shell-free async subprocesses:
tshark.pyexecutesdumpcap.exe,tshark.exe, andcapinfos.exeviaasyncio.create_subprocess_execwith explicit timeouts and no shell expansion.Non-blocking GUI calls: All synchronous Win32 and
Wireshark.exeoperations inwin_gui.pyrun insideasyncio.to_thread(...)so the MCP stdio event loop stays responsive.DPI-aware Win32 capture:
win_gui.pyenables Per-Monitor V2 DPI awareness, reads window rectangles viaDwmGetWindowAttribute(DWMWA_EXTENDED_FRAME_BOUNDS), and renders windows offscreen withPrintWindow(PW_RENDERFULLCONTENT)with blank-frame detection andImageGrabfallback.
Measured locally on Windows 11 (Loopback interface, 4-packet ICMP .pcapng):
Operation | Measured Time | Notes |
|
| Uses |
|
| Uses |
|
| Uses |
|
| Runs |
|
| Launches |
License
MIT — see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Eyes and hands on real Windows PCs — observe, click, type via Glasswarp API.
Windows computers for AI agents. Office, desktop apps, browser tasks, testing and file transfer.
Agent network status and free guest tools for text insights and SHA-256.
Securely control computers you explicitly pair through files, terminals, processes, screenshots, desktop UI/input, clipboard, browser automation, diagnostics, and document tools.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceWireshark MCP server for Windows that enables AI agents to capture live packets, analyze pcap files, apply display filters, reassemble TCP/UDP streams, generate statistics, and export packets or protocol objects.-
- FlicenseAqualityCmaintenanceEnables local inspection and analysis of Wi-Fi PCAP and PCAPNG files through tools for loading captures, summarizing them, filtering packets, and dissecting packet details.23-
- AlicenseNot gradedqualityBmaintenanceEnables remote control of a Windows desktop via MCP, including screenshots, mouse and keyboard, window management, PowerShell, files, services, registry, scheduled tasks, event log, and network checks.74 npm4GPL 3.0
- AlicenseAqualityCmaintenanceEnables AI agents to analyze local or base64-encoded PCAP/PCAPng captures through bounded MCP tools for protocol summaries, conversations, DNS/HTTP/TLS/QUIC inspection, credential and beacon detection, entropy checks, filtering, and Zeek-compatible export.1528 npm8Apache 2.0