A Model Context Protocol (MCP) server for Wireshark / tshark packet analysis
Project description
Wireshark MCP
Give your AI assistant a packet analyzer.
Drop a .pcap file, ask questions in plain English — get answers backed by real tshark data.
English • 中文 • Changelog • Contributing
What is this?
An MCP server that wraps tshark (and optional Wireshark suite tools) into a structured analysis interface. Works with Claude Desktop, Claude Code, Cursor, VS Code, and 18+ other MCP clients.
You: "Find all DNS queries going to suspicious domains in this capture."
Claude: [calls wireshark_extract_dns_queries → wireshark_detect_dns_tunnel]
"Found repeated high-entropy DNS queries consistent with tunneling: ..."
Install
Prerequisites: Python 3.10+ and Wireshark with tshark on PATH.
pip install wireshark-mcp
wireshark-mcp install # auto-configures all detected MCP clients
Restart your AI client — done.
Run wireshark-mcp doctor if anything looks off. See docs/manual-configuration.md for manual setup or platform-specific notes.
Quick Start
Point your AI client at a .pcap file and try:
Analyze capture.pcap using the Wireshark MCP tools.
Start with wireshark_open_file, then run wireshark_quick_analysis.
Write findings to report.md.
Tools
51 tools, each backed by real tshark output — organized into categories:
| Category | Highlights | Count |
|---|---|---|
| Entry & Workflow | wireshark_open_file, wireshark_quick_analysis |
2 |
| Packet Analysis | Packet list, details, bytes, context, stream follow, search, file info | 8 |
| Data Extraction | HTTP requests, DNS queries, arbitrary fields, object export | 4 |
| Statistics | Protocol hierarchy, endpoints, conversations, I/O graph, expert info, service response time, flow graph | 7 |
| Security & Anomaly | Credential scan, port scan, DNS tunnel, DoS, beaconing, exfiltration, protocol anomalies, YARA | 8 |
| Protocol Analysis | wireshark_analyze_protocol (20 protocols), TCP health, ARP spoofing |
3 |
| Decrypt & Dissection | TLS/WPA decrypt, decryption check, decode-as, protocol preferences | 5 |
| Forensics & Enrichment | TLS fingerprints, file signature scan, GeoIP | 3 |
| File Ops, Capture & Suite | Live capture, interfaces, merge, filter-save, editcap trim/split/dedup/time-shift, frame extract, text2pcap, capabilities | 11 |
One tool covers 20 protocols rather than 20 tools covering one each: wireshark_analyze_protocol takes a protocol argument (tls_handshakes, mqtt, modbus, s7comm, zigbee, wifi, rtp, kerberos, …) and applies the right fields and display filter for it. The field names are the point — s7comm.param.item.dbnum is not something a caller should have to guess, and a wrong guess returns an empty result that reads like a clean capture.
The server starts with only tshark required. Optional tools (capinfos, mergecap, editcap, dumpcap, text2pcap) are auto-detected and enable extra features when present.
Context cost
The tool list travels in the prompt prefix of every request your client sends, so its size is a fixed per-request cost. The default surface is ~21 KB — about 9 KB of parameter schema, 5 KB of descriptions, and 3 KB of read/write annotations — and it is byte-identical across restarts so clients can cache the prefix rather than re-reading it each session.
If your client never captures live traffic or writes pcaps, --profile advertises less:
| Profile | Tools | Payload | Drops |
|---|---|---|---|
full (default) |
51 | ~21 KB | nothing |
analysis |
41 | ~17 KB | live capture, interface listing, all file-writing tools |
core |
33 | ~14 KB | the above, plus decryption, dissection overrides, and low-level views |
wireshark-mcp serve --profile core
Every profile still contains every tool the bundled prompts, resources, skill files, and protocol recommendations can point the model at, so reducing the surface never leaves it chasing a tool that is not there.
Tool results are bounded too, since a result stays in the conversation for the rest of the session. Output over 8000 characters is truncated head-and-tail with a marker, and the tool's offset / limit / display_filter parameters are the way to page through the rest. Raise or lower the ceiling with:
export WIRESHARK_MCP_MAX_RESULT_CHARS=16000
Every tool also declares whether it reads or writes, so clients can auto-approve the 40 read-only analysis tools and still prompt for the 11 that create files (live capture, merge, filter-save, editcap, text2pcap, frame extract, object export).
Documentation
| Topic | Link |
|---|---|
| Platform setup (macOS/Linux/Windows) | docs/platform-validation.md |
| Manual client configuration | docs/manual-configuration.md |
| Prompt templates | docs/prompt-engineering.md |
| Release checklist | docs/release-checklist.md |
| Contributing | CONTRIBUTING.md |
| Changelog | GitHub Releases |
| Security policy | SECURITY.md |
Development
pip install -e ".[dev]"
pytest tests/ -v
ruff check src/ tests/
See CONTRIBUTING.md for the full guide.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wireshark_mcp-2.0.0.tar.gz.
File metadata
- Download URL: wireshark_mcp-2.0.0.tar.gz
- Upload date:
- Size: 1.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4b15f262111e67b42dc8cf763f16149035051ad50467d7c62c07030975a91b8
|
|
| MD5 |
72de235614dc0f8d598899b197eab0b5
|
|
| BLAKE2b-256 |
c1952f0eeebbf600da8b2c56e786ee88ddc86e3abccff20271eabd2c551a19c6
|
Provenance
The following attestation bundles were made for wireshark_mcp-2.0.0.tar.gz:
Publisher:
publish.yml on bx33661/Wireshark-MCP
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wireshark_mcp-2.0.0.tar.gz -
Subject digest:
a4b15f262111e67b42dc8cf763f16149035051ad50467d7c62c07030975a91b8 - Sigstore transparency entry: 2268206898
- Sigstore integration time:
-
Permalink:
bx33661/Wireshark-MCP@2a8c009fb38723a9212e47d6156cc8a6b2f624c0 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/bx33661
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2a8c009fb38723a9212e47d6156cc8a6b2f624c0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file wireshark_mcp-2.0.0-py3-none-any.whl.
File metadata
- Download URL: wireshark_mcp-2.0.0-py3-none-any.whl
- Upload date:
- Size: 104.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d85c9270e776e42b48e71ac9e3704b4baad5c105822636ec031db4e6db23a66
|
|
| MD5 |
682bf7b6134b5d24eba1d55ca246a5a2
|
|
| BLAKE2b-256 |
2902d3e30654c100e899bbc0ecf59673cb2b6f3b68b9dc3cbe80bbced86ef8ff
|
Provenance
The following attestation bundles were made for wireshark_mcp-2.0.0-py3-none-any.whl:
Publisher:
publish.yml on bx33661/Wireshark-MCP
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wireshark_mcp-2.0.0-py3-none-any.whl -
Subject digest:
1d85c9270e776e42b48e71ac9e3704b4baad5c105822636ec031db4e6db23a66 - Sigstore transparency entry: 2268207291
- Sigstore integration time:
-
Permalink:
bx33661/Wireshark-MCP@2a8c009fb38723a9212e47d6156cc8a6b2f624c0 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/bx33661
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2a8c009fb38723a9212e47d6156cc8a6b2f624c0 -
Trigger Event:
release
-
Statement type: