Skip to main content

A production-grade Model Context Protocol (MCP) server for Wireshark

Project description

Wireshark MCP

Simple MCP Server to allow vibe packet analysis in Wireshark.

English | 中文

Prerequisites

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wireshark_mcp-0.2.1.tar.gz (58.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wireshark_mcp-0.2.1-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

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

Hashes for wireshark_mcp-0.2.1.tar.gz
Algorithm Hash digest
SHA256 54d7200cf088e8243e7ad1c2a5c254909d0a45992efaa01316ccb2789d55ad5d
MD5 07e1bb411a452d47c8bea7e45efe6883
BLAKE2b-256 2bf719b546cae163c4ff02552de27126e5186138290fa6a1b39aaa68c583925e

See more details on using hashes here.

Provenance

The following attestation bundles were made for wireshark_mcp-0.2.1.tar.gz:

Publisher: publish.yml on bx33661/Wireshark-MCP

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for wireshark_mcp-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 18d7462176bed9a518f845d4a7b37a6e26254874a830534836a2a16d40a56363
MD5 3f69846e267dd787d0e4cc6cd3e23ef8
BLAKE2b-256 ad49606e97bd03b97676a178bdad711440defb696be0528252e68ef249afd752

See more details on using hashes here.

Provenance

The following attestation bundles were made for wireshark_mcp-0.2.1-py3-none-any.whl:

Publisher: publish.yml on bx33661/Wireshark-MCP

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page