A production-grade Model Context Protocol (MCP) server for Wireshark
Project description
Wireshark MCP
Simple MCP Server to allow vibe packet analysis in Wireshark.
Prerequisites
- Python (3.10 or higher)
- Wireshark (ensure
tsharkis in your PATH) - Supported MCP Client (pick one you like)
- Claude Code
- Claude
- Cursor
- VS Code with generic MCP client extension
- Other MCP Clients
Installation
Install the latest version of the Wireshark MCP package:
pip install wireshark-mcp
Or install directly from source:
pip install git+https://github.com/bx33661/Wireshark-MCP.git
Configuration
Add the server to your MCP client configuration (e.g., claude_desktop_config.json):
{
"mcpServers": {
"wireshark": {
"command": "uv",
"args": [
"tool",
"run",
"wireshark-mcp"
]
}
}
}
Note: You can also run it directly with python -m wireshark_mcp if installed in your environment.
Prompt Engineering
LLMs are good at general analysis but can struggle with the specifics of packet dissection. Below is a minimal example prompt strategy:
Your task is to analyze a pcap file using Wireshark MCP tools.
- Start by getting a packet list summary to understand the traffic flow (`wireshark_get_packet_list`).
- If you see interesting packets, get full details for that specific frame (`wireshark_get_packet_details`).
- For TCP/HTTP flows, use `wireshark_follow_stream` to see the full conversation.
- Use `wireshark_extract_http_requests` or `wireshark_extract_dns_queries` for quick high-level overviews.
- NEVER try to guess packet contents; always verify with the tools.
- Create a report.md with your findings.
Core Functions
Packet Analysis
wireshark_get_packet_list(pcap_file, limit, offset, display_filter): Get a summary list of packets (like Wireshark's top pane).wireshark_get_packet_details(pcap_file, frame_number): Get full details for a SINGLE packet (like Wireshark's bottom pane).wireshark_follow_stream(pcap_file, stream_index, protocol, ...): Reassemble and view complete stream content with pagination and search.
Data Extraction
wireshark_extract_fields(pcap_file, fields, ...): Extract specific fields as tabular data.wireshark_extract_http_requests(pcap_file): Convenience tool for HTTP method, URI, host.wireshark_extract_dns_queries(pcap_file): Convenience tool for DNS queries.wireshark_list_ips(pcap_file): List all unique IP addresses in capture.
Stats & Capture
wireshark_stats_protocol_hierarchy(pcap_file): Protocol distribution.wireshark_stats_conversations(pcap_file, type): Traffic between endpoints.wireshark_filter_save(input_file, output_file, display_filter): Save a subset of packets to a new file.
Security
wireshark_check_threats(pcap_file): Check IPs against threat intelligence feeds.wireshark_extract_credentials(pcap_file): Scan for plaintext credentials.
Development
To test the MCP server itself:
npx -y @modelcontextprotocol/inspector uv run wireshark-mcp
This will open a web interface where you can interact with the tools directly.
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-0.2.1.tar.gz.
File metadata
- Download URL: wireshark_mcp-0.2.1.tar.gz
- Upload date:
- Size: 58.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54d7200cf088e8243e7ad1c2a5c254909d0a45992efaa01316ccb2789d55ad5d
|
|
| MD5 |
07e1bb411a452d47c8bea7e45efe6883
|
|
| BLAKE2b-256 |
2bf719b546cae163c4ff02552de27126e5186138290fa6a1b39aaa68c583925e
|
Provenance
The following attestation bundles were made for wireshark_mcp-0.2.1.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-0.2.1.tar.gz -
Subject digest:
54d7200cf088e8243e7ad1c2a5c254909d0a45992efaa01316ccb2789d55ad5d - Sigstore transparency entry: 926870737
- Sigstore integration time:
-
Permalink:
bx33661/Wireshark-MCP@f314fdd655fd6c7aa84e482c516fbae28ee408ad -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/bx33661
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f314fdd655fd6c7aa84e482c516fbae28ee408ad -
Trigger Event:
release
-
Statement type:
File details
Details for the file wireshark_mcp-0.2.1-py3-none-any.whl.
File metadata
- Download URL: wireshark_mcp-0.2.1-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18d7462176bed9a518f845d4a7b37a6e26254874a830534836a2a16d40a56363
|
|
| MD5 |
3f69846e267dd787d0e4cc6cd3e23ef8
|
|
| BLAKE2b-256 |
ad49606e97bd03b97676a178bdad711440defb696be0528252e68ef249afd752
|
Provenance
The following attestation bundles were made for wireshark_mcp-0.2.1-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-0.2.1-py3-none-any.whl -
Subject digest:
18d7462176bed9a518f845d4a7b37a6e26254874a830534836a2a16d40a56363 - Sigstore transparency entry: 926870740
- Sigstore integration time:
-
Permalink:
bx33661/Wireshark-MCP@f314fdd655fd6c7aa84e482c516fbae28ee408ad -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/bx33661
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f314fdd655fd6c7aa84e482c516fbae28ee408ad -
Trigger Event:
release
-
Statement type: