An MCP server that exposes Wireshark/tshark capabilities to AI tools and IDEs. Capture live traffic, analyze .pcap files, apply display filters, follow TCP/UDP streams, and export to JSON — all via Claude Desktop, VS Code Copilot, or any MCP-compatible client. - Python 3.10+ - Wireshark/tshark installed and on PATH Linux: add your user to the wireshark group for non-root capture: Or with uv: ~/Lib
Add this skill
npx mdskills install khuynh22/mcp-wiresharkComprehensive network analysis toolkit with clear tool descriptions and practical examples
1# mcp-wireshark23> Community-maintained. Not affiliated with Wireshark or Anthropic.45An MCP server that exposes Wireshark/tshark capabilities to AI tools and IDEs. Capture live traffic, analyze `.pcap` files, apply display filters, follow TCP/UDP streams, and export to JSON — all via Claude Desktop, VS Code Copilot, or any MCP-compatible client.67[](https://badge.fury.io/py/mcp-wireshark)8[](https://github.com/khuynh22/mcp-wireshark/actions/workflows/ci.yml)9[](https://opensource.org/licenses/MIT)10[](https://www.python.org/downloads/)1112## Prerequisites1314- Python 3.10+15- [Wireshark/tshark](https://www.wireshark.org/download.html) installed and on `PATH`1617**Linux:** add your user to the `wireshark` group for non-root capture:18```bash19sudo usermod -aG wireshark $USER20```2122## Installation2324```bash25pip install mcp-wireshark26```2728Or with `uv`:29```bash30uvx mcp-wireshark31```3233## Configuration3435### Claude Desktop3637`~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)38`%APPDATA%\Claude\claude_desktop_config.json` (Windows)3940```json41{42 "mcpServers": {43 "wireshark": {44 "command": "mcp-wireshark"45 }46 }47}48```4950### VS Code5152`.vscode/mcp.json` in your workspace:5354```json55{56 "servers": {57 "wireshark": {58 "command": "mcp-wireshark"59 }60 }61}62```6364On Windows, if tshark isn't on `PATH`, add it explicitly:65```json66{67 "servers": {68 "wireshark": {69 "command": "mcp-wireshark",70 "env": { "PATH": "C:\\Program Files\\Wireshark;${env:PATH}" }71 }72 }73}74```7576## Tools7778| Tool | Description |79|------|-------------|80| `check_installation` | Verify tshark is installed and show version |81| `list_interfaces` | List available network interfaces |82| `live_capture` | Capture live traffic from an interface |83| `read_pcap` | Read packets from a `.pcap`/`.pcapng` file |84| `display_filter` | Apply a Wireshark display filter to a pcap file |85| `summarize_pcap` | High-level summary: packet count, duration, top protocols, top talkers |86| `stats_by_proto` | Protocol hierarchy statistics |87| `follow_tcp` | Extract payload from a TCP stream |88| `follow_udp` | Extract payload from a UDP stream |89| `export_json` | Export packets to a JSON file |9091### Quick examples9293```94List my network interfaces95Capture 30 seconds of traffic on eth0 filtered to tcp.port == 44396Read the first 100 packets from /tmp/capture.pcap97Summarize /tmp/capture.pcap98Follow TCP stream 0 from /tmp/capture.pcap99Export HTTP packets from /tmp/capture.pcap to /tmp/http.json100```101102### Useful display filters103104```105tcp.port == 80 HTTP106tcp.port == 443 HTTPS107dns All DNS108http.request HTTP requests only109ip.addr == 10.0.0.1 Traffic to/from specific IP110tcp.flags.syn == 1 TCP SYN packets111```112113## Development114115```bash116git clone https://github.com/khuynh22/mcp-wireshark.git117cd mcp-wireshark118python -m venv venv && source venv/bin/activate # Windows: venv\Scripts\activate119pip install -e ".[dev]"120121pytest # run tests122black src tests # format123ruff check src tests # lint124mypy src # type check125```126127See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.128129## License130131MIT — see [LICENSE](LICENSE).132
Full transparency — inspect the skill content before installing.