Skip to main content
Glama

TShark MCP Server

An MCP (Model Context Protocol) server that exposes TShark as tools for AI-assisted network packet analysis. Supports PCAP analysis, live capture, TLS decryption, and telecom / SS7 signaling protocols.

Requirements

  • Python 3.10+

  • Wireshark / TShark installed on the system

  • mergecap (bundled with Wireshark, required for merge_pcap_files)

Related MCP server: Wireshark MCP

Installation

# Recommended — installs into an isolated env and puts the
# tshark-mcp / tshark-mcp-http commands on your PATH.
uv tool install tshark-mcp

# With Windows service support (Windows only).
uv tool install "tshark-mcp[windows-service]"

# Or into a project venv:
uv pip install tshark-mcp

From a local source build (in the project root):

uv build
uv tool install --reinstall ".\dist\tshark_mcp-1.0.0-py3-none-any.whl[windows-service]"

Verify the commands are on PATH:

Get-Command tshark-mcp, tshark-mcp-http, tshark-mcp-win-service | Select-Object Name, Source

Uninstall the system installation (after removing the Windows service if any — see below):

uv tool uninstall tshark-mcp

After install you have three console scripts:

Command

Default

What it does

tshark-mcp

stdio

Run via MCP client (Claude Code / VS Code) — client manages the process

tshark-mcp-http

HTTP on 127.0.0.1:8100

Standalone HTTP server (WSL, remote, shared)

tshark-mcp-win-service

Windows service

Register as a Windows service (auto-start at boot)

Running modes

STDIO — managed by your MCP client

The MCP client launches tshark-mcp as a child process. You don't run anything manually. Just configure the client.

Claude Code — .mcp.json (project) or ~/.claude.json (user):

{
  "mcpServers": {
    "tshark-mcp": {
      "type": "stdio",
      "command": "tshark-mcp"
    }
  }
}

Or via CLI:

claude mcp add tshark-mcp -- tshark-mcp

VS Code — .vscode/mcp.json (project) or your user mcp.json:

{
  "servers": {
    "tshark-mcp": {
      "type": "stdio",
      "command": "tshark-mcp"
    }
  }
}

If tshark-mcp is not on PATH (you installed via uv pip install instead of uv tool install), replace command: "tshark-mcp" with command: "uv", args: ["tool", "run", "tshark-mcp"].

HTTP — standalone server

You start the server yourself; clients connect to its URL. Stays running across client restarts and can be shared by multiple clients.

# Default 127.0.0.1:8100, endpoint /mcp
tshark-mcp-http

# Custom host/port
tshark-mcp-http --host 0.0.0.0 --port 9000

# Use a config file (see Configuration below)
tshark-mcp-http --config /path/to/config.toml

The endpoint URL is http://<host>:<port>/mcp.

Claude Code:

{
  "mcpServers": {
    "tshark-mcp": {
      "type": "http",
      "url": "http://127.0.0.1:8100/mcp"
    }
  }
}

Or via CLI:

claude mcp add --transport http tshark-mcp http://127.0.0.1:8100/mcp

VS Code:

{
  "servers": {
    "tshark-mcp": {
      "type": "http",
      "url": "http://127.0.0.1:8100/mcp"
    }
  }
}

WSL: run the HTTP server inside WSL and point Windows-side Claude Code / VS Code at http://127.0.0.1:8100/mcp — WSL2 forwards localhost automatically.

Windows service — auto-start at boot

Register tshark-mcp-http as a Windows service. Survives reboots, runs in the background under LocalSystem. All commands below need an elevated PowerShell (admin).

pywin32 expects options BEFORE the verb (install/start/stop/remove). tshark-mcp-win-service install --startup auto is wrong — it must be --startup auto install.

Install + start:

tshark-mcp-win-service --startup auto install
tshark-mcp-win-service --wait 15 start

Verify it's running:

Get-Service TsharkMcp                                  # Status should be Running
Get-NetTCPConnection -LocalPort 8100 -State Listen     # 127.0.0.1:8100 listening

Manage:

tshark-mcp-win-service stop
tshark-mcp-win-service restart        # reload after editing config.toml

Uninstall the service only:

tshark-mcp-win-service stop
tshark-mcp-win-service remove

Full cleanup (service + uv tool + leftover pywin32 DLLs):

# 1. Remove the service (admin PS)
tshark-mcp-win-service stop
tshark-mcp-win-service remove

# 2. Uninstall the uv tool venv (admin not required)
uv tool uninstall tshark-mcp

# 3. Optional — pywin32 leaves two DLLs in the uv-managed Python dir.
#    Only remove these if no other pywin32-using uv tool is installed.
$pyDir = "$env:APPDATA\uv\python\cpython-3.13-windows-x86_64-none"
Remove-Item -Force -ErrorAction SilentlyContinue `
    "$pyDir\pywintypes313.dll", "$pyDir\pythoncom313.dll"

Because Windows services don't receive command-line arguments, configure the service via:

  • Config file at %PROGRAMDATA%\tshark-mcp\config.toml (recommended) — restart the service after editing

  • System-wide environment variables (TSHARK_MCP_HOST, TSHARK_MCP_PORT, TSHARK_PATH, …)

Once running, point your MCP client at http://127.0.0.1:8100/mcp exactly as in the HTTP section above.

Configuration

Configuration is layered — later sources override earlier ones:

built-in defaults  <  config file (TOML)  <  environment variables  <  CLI arguments

Config file (TOML)

Search order (first match wins):

  1. --config <path> CLI argument

  2. TSHARK_MCP_CONFIG environment variable

  3. Windows: %APPDATA%\tshark-mcp\config.toml, then %PROGRAMDATA%\tshark-mcp\config.toml

  4. Linux/macOS: $XDG_CONFIG_HOME/tshark-mcp/config.toml (or ~/.config/tshark-mcp/config.toml), then /etc/tshark-mcp/config.toml

Full schema (also see config.example.toml):

[server]
# stdio | http | streamable-http | sse
# "http" is an alias for "streamable-http" (the current MCP HTTP transport).
# "sse" is the deprecated MCP HTTP+SSE transport; kept for legacy clients.
transport = "http"
host = "127.0.0.1"
port = 8100

# Optional endpoint paths (default to FastMCP defaults)
# mount_path = "/"
# streamable_http_path = "/mcp"
# sse_path = "/sse"
# message_path = "/messages"

[tshark]
# Override tshark binary location (otherwise auto-detected).
# path = "C:\\Program Files\\Wireshark\\tshark.exe"

Environment variables

Variable

Maps to

TSHARK_MCP_CONFIG

Path to TOML config file

TSHARK_MCP_TRANSPORT

[server] transport

TSHARK_MCP_HOST

[server] host

TSHARK_MCP_PORT

[server] port

TSHARK_MCP_MOUNT_PATH

[server] mount_path

TSHARK_MCP_STREAMABLE_HTTP_PATH

[server] streamable_http_path

TSHARK_MCP_SSE_PATH

[server] sse_path

TSHARK_MCP_MESSAGE_PATH

[server] message_path

TSHARK_PATH

[tshark] path

CLI arguments

tshark-mcp and tshark-mcp-http accept the same flags:

--config PATH                  TOML config file (overrides search paths)
--transport {stdio,http,streamable-http,sse}
--host HOST
--port PORT
--mount-path PATH
--streamable-http-path PATH    default '/mcp'
--sse-path PATH
--message-path PATH
--tshark-path PATH             tshark binary (overrides TSHARK_PATH env)

The two scripts differ only in their starting defaults — tshark-mcp starts from stdio defaults, tshark-mcp-http starts from transport=http, host=127.0.0.1, port=8100. Either way, file → env → CLI all layer on top.

TShark binary auto-detection

If [tshark] path, TSHARK_PATH, and --tshark-path are all unset, the server probes:

  • Windows: C:\Program Files\Wireshark\tshark.exe, C:\Program Files (x86)\Wireshark\tshark.exe

  • macOS: /Applications/Wireshark.app/Contents/MacOS/tshark, /opt/homebrew/bin/tshark, /usr/local/bin/tshark

  • Linux: /usr/bin/tshark, /usr/sbin/tshark, /usr/local/bin/tshark

Then falls back to PATH lookup.


Tools (25 total)

Basic Analysis

Tool

Key Parameters

Description

analyze_pcap_file

display_filter, keylog_file, max_packets

Packet summaries with optional display filter and TLS decryption

get_packet_statistics

—

Protocol hierarchy statistics (io,phs) — shows all protocol layers present

extract_packet_details

packet_number

Full verbose detail for a specific packet (1-based index)

extract_fields

fields, display_filter, keylog_file

Extract any tshark field as tab-separated values

export_to_json

display_filter, keylog_file, max_packets

Export packets as JSON for structured analysis

run_tshark_command

command_args

Run any raw tshark command

Traffic Aggregation & Statistics

Tool

Key Parameters

Description

get_conversations

protocol

Conversation statistics — protocol: eth / ip / tcp / udp / sctp

get_flow_matrix

display_filter, top_n

Host-pair communication matrix (ip.src × ip.dst), ranked by bytes

get_traffic_timeseries

interval_seconds, display_filter

Packets and bytes per time bucket — identifies bursts and periodic patterns

aggregate_flows

group_by, display_filter, top_n

Group packets by any field combination (e.g. ip.src,tcp.dstport)

Protocol-Specific Analysis

Tool

Key Parameters

Description

analyze_dns

display_filter, top_n

DNS query patterns, NXDOMAIN detection, response time statistics

get_tcp_performance

display_filter

RTT, retransmissions, window size — diagnose network quality issues

follow_stream

protocol, stream_index, keylog_file

Reconstruct a TCP / UDP / SCTP stream as ASCII text

Telecom / SS7 Signaling

These tools handle the telecom core network signaling stack: SCTP → M3UA → SCCP → TCAP → MAP

Tool

Key Parameters

Description

reconstruct_tcap_dialogue

display_filter, max_dialogues

Group TCAP messages (Begin/Continue/End/Abort) by transaction ID (OTID/DTID)

analyze_map_operations

display_filter, top_n

MAP operation frequency table + per-IMSI activity summary

TLS Decryption

Requires a TLS key log file generated by the target application.

Tool

Description

follow_tls_stream

Reconstruct a decrypted TLS stream as plaintext from a PCAP + key log file

capture_and_decrypt

Capture live traffic and immediately show decrypted TLS content

tshark_reading_manual

Read this first — full TLS decryption workflow including debugger-based key extraction

Live Capture

Tool

Key Parameters

Description

list_interfaces

—

List available network interfaces for live capture

capture_live

interface, packet_count, duration, display_filter

Capture live packets (max 500 packets / 60 s)

capture_process

pid, interface, output_pcap, duration, keylog_file

Capture traffic for a specific process by PID

File Operations

Tool

Key Parameters

Description

filter_and_save

display_filter

Filter packets from a PCAP and save to a new PCAP file

export_objects

protocol, output_dir

Extract files transferred over HTTP / SMB / TFTP / IMF / DICOM

merge_pcap_files

input_files, output_file, display_filter

Merge multiple PCAPs in timestamp order (uses mergecap)

Process Management

Tool

Description

list_processes

List running processes with PIDs (filter by name)


Examples

General PCAP Analysis

# Protocol hierarchy — confirm what layers are in the capture
get_packet_statistics("/captures/traffic.pcap")

# First 100 packets, HTTP only
analyze_pcap_file("/captures/traffic.pcap", display_filter="http")

# Extract source IPs, methods, and URIs from HTTP requests
extract_fields(
    file_path="/captures/traffic.pcap",
    fields="ip.src,http.request.method,http.request.uri",
    display_filter="http.request"
)

# Full detail for packet 42
extract_packet_details("/captures/traffic.pcap", packet_number=42)

Traffic Aggregation

# Which hosts talk to each other most? (top 20 by bytes)
get_flow_matrix("/captures/traffic.pcap")

# Traffic volume over time — 5-second buckets
get_traffic_timeseries("/captures/traffic.pcap", interval_seconds=5.0)

# TCP traffic only, 1-second buckets
get_traffic_timeseries("/captures/traffic.pcap", interval_seconds=1.0, display_filter="tcp")

# Per-service breakdown: which src IP hits which dst port most?
aggregate_flows(
    file_path="/captures/traffic.pcap",
    group_by="ip.src,ip.dst,tcp.dstport",
    display_filter="tcp"
)

# SCTP conversation statistics
get_conversations("/captures/ss7.pcap", protocol="sctp")

DNS Analysis

# Top queried domains, NXDOMAIN failures, response times
analyze_dns("/captures/traffic.pcap")

# DNS from a specific client only
analyze_dns("/captures/traffic.pcap", display_filter="ip.src == 192.168.1.10")

TCP Performance Diagnosis

# RTT, retransmission rate, window size — is the network healthy?
get_tcp_performance("/captures/traffic.pcap")

# Performance for a specific server
get_tcp_performance("/captures/traffic.pcap", display_filter="ip.addr == 10.0.0.1")

Stream Reconstruction

# Follow the first TCP stream
follow_stream("/captures/traffic.pcap", protocol="tcp", stream_index=0)

# Follow an SCTP stream
follow_stream("/captures/ss7.pcap", protocol="sctp", stream_index=0)

# Follow a TELNET session (TELNET runs over TCP port 23)
follow_stream("/captures/traffic.pcap", protocol="tcp", stream_index=0)

Telecom / SS7 Signaling Analysis

The typical protocol stack is: SCTP → M3UA → SCCP → TCAP → MAP

# Step 1 — confirm SS7 layers are present
get_packet_statistics("/captures/ss7.pcap")
# Expected output includes: sctp, m3ua, mtp3, sccp, tcap, gsm_map

# Step 2 — reconstruct TCAP dialogues (Begin→Continue→End chains)
reconstruct_tcap_dialogue("/captures/ss7.pcap")

# Step 3 — MAP operation frequency + IMSI tracking
analyze_map_operations("/captures/ss7.pcap")

# Step 4 — raw MAP field extraction
extract_fields(
    file_path="/captures/ss7.pcap",
    fields="gsm_map.opr.code,gsm_map.imsi,gsm_map.msisdn.digits",
    display_filter="gsm_map"
)

# SCCP routing analysis — who calls whom?
aggregate_flows(
    file_path="/captures/ss7.pcap",
    group_by="sccp.calling_party,sccp.called_party",
    display_filter="sccp"
)

# Filter to a specific TCAP dialogue by OTID
extract_fields(
    file_path="/captures/ss7.pcap",
    fields="frame.time_relative,tcap.MessageType,tcap.otid,tcap.dtid,gsm_map.opr.code",
    display_filter="tcap.otid == aabbccdd"
)

File Extraction (Forensics)

# Extract files transferred over HTTP in a capture
export_objects(
    file_path="/captures/traffic.pcap",
    protocol="http",
    output_dir="/tmp/extracted/"
)

# Extract SMB file transfers
export_objects(
    file_path="/captures/traffic.pcap",
    protocol="smb",
    output_dir="/tmp/smb_files/"
)

Multi-PCAP Correlation

# Merge two captures from different taps, analyze combined
merge_pcap_files(
    input_files="/captures/tap1.pcap,/captures/tap2.pcap",
    output_file="/captures/merged.pcap"
)

# With a display filter on the merged result
merge_pcap_files(
    input_files="/captures/tap1.pcap,/captures/tap2.pcap",
    output_file="/captures/merged.pcap",
    display_filter="tcp"
)

TLS Decryption

# Decrypt and reconstruct HTTPS stream
follow_tls_stream(
    file_path="/captures/traffic.pcap",
    keylog_file="C:/captures/keys.log",
    stream_index=0
)

# Extract HTTP fields from decrypted traffic
extract_fields(
    file_path="/captures/traffic.pcap",
    fields="ip.src,http.request.method,http.request.uri",
    display_filter="http.request",
    keylog_file="C:/captures/keys.log"
)

# Live capture + real-time TLS decryption
capture_and_decrypt(
    interface=r"\Device\NPF_{...}",
    keylog_file="C:/captures/keys.log",
    output_pcap="C:/captures/session.pcap",
    duration=30
)

Process-Specific Capture

# Find process PID
list_processes("chrome")
# → chrome.exe  PID 4812

# Capture traffic for that process
capture_process(
    pid=4812,
    interface=r"\Device\NPF_{...}",   # from list_interfaces()
    output_pcap="C:/captures/chrome.pcap",
    duration=30
)

# Capture + decrypt TLS in one step
capture_process(
    pid=4812,
    interface=r"\Device\NPF_{...}",
    output_pcap="C:/captures/chrome.pcap",
    duration=30,
    keylog_file="C:/captures/keys.log"   # set SSLKEYLOGFILE before launching Chrome
)

Protocol Support Reference

Protocol

Filter

Relevant Fields

Best Tool

TCP

tcp

tcp.srcport, tcp.dstport, tcp.stream

follow_stream, get_tcp_performance

UDP

udp

udp.srcport, udp.dstport

follow_stream, get_conversations

SCTP

sctp

sctp.srcport, sctp.dstport, sctp.chunk_type

get_conversations, follow_stream

HTTP

http

http.request.uri, http.response.code

extract_fields, export_objects

TLS/HTTPS

tls

tls.record.content_type

follow_tls_stream, capture_and_decrypt

DNS

dns

dns.qry.name, dns.flags.rcode, dns.time

analyze_dns

TELNET

telnet

(follow TCP stream)

follow_stream (protocol=tcp)

M3UA

m3ua

m3ua.protocol_data_opc, m3ua.protocol_data_dpc

extract_fields, aggregate_flows

SCCP

sccp

sccp.calling_party, sccp.called_party, sccp.ssn

aggregate_flows, extract_fields

TCAP

tcap

tcap.otid, tcap.dtid, tcap.MessageType

reconstruct_tcap_dialogue

MAP

gsm_map

gsm_map.opr.code, gsm_map.imsi, gsm_map.msisdn.digits

analyze_map_operations


TLS Decryption Setup

TShark can decrypt TLS traffic when given the session keys written by the application. Set the SSLKEYLOGFILE environment variable before launching the target application:

# Windows
set SSLKEYLOGFILE=C:\captures\keys.log
start chrome

# Linux / macOS
export SSLKEYLOGFILE=/tmp/keys.log
google-chrome &

Supported runtimes: Chrome, Edge, Firefox, curl, Python (requests / httpx / aiohttp), Go crypto/tls (with SSLKEYLOGFILE patch), Node.js (--tls-keylog).

For applications that do not support SSLKEYLOGFILE (compiled binaries, custom TLS stacks), keys must be extracted from process memory using a debugger. Call tshark_reading_manual for the complete step-by-step workflow including x64dbg-based key extraction.


Process-Specific Capture — How It Works

  1. list_processes — find the PID of the target process.

  2. capture_process — snapshots the process's open connections at capture start, builds a BPF filter from its local ports, then runs a timed capture saving to a PCAP file.

Because the filter is derived at capture start, connections opened later still get captured if they share a port already in the filter. For long-running captures or applications with many short-lived connections, re-run capture_process as needed, or use capture_live without a filter and post-filter with filter_and_save.

Platform

Tool used internally

Notes

Windows

netstat -ano (built-in)

No extra installation needed

macOS

lsof (built-in)

No extra installation needed

Linux

ss (iproute2)

Usually pre-installed; apt install iproute2 if missing


Development

git clone <repository-url>
cd tshark-mcp
uv sync

# Run during development
uv run server.py                                     # stdio
uv run server.py --transport http --port 8100        # HTTP
uv run tshark-mcp-http                               # HTTP (entry-point alias)

# Tests (no TShark installation required — subprocess is mocked)
uv run python -m pytest test_server.py -v

# Build a local wheel and install it as a uv tool (Windows service ready)
uv build
uv tool install --reinstall ".\dist\tshark_mcp-1.0.0-py3-none-any.whl[windows-service]"

# Clean build artifacts
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue dist, build, *.egg-info

Project Policies

Release

Automated via .github/workflows/release.yml. Pushing a v* tag builds the wheel and publishes to PyPI using the PYPI_API_TOKEN repo secret:

git tag v1.2.3
git push origin v1.2.3
  • Pre-release check: uv run python scripts/release_check.py

  • Full release process + one-time PYPI_API_TOKEN setup: see RELEASE.md

Available Tools

25 tools
aggregate_flowsA

Aggregate packet flows grouped by arbitrary tshark field combinations.

Extracts the specified fields plus frame.len from each packet, then groups and sums by those fields. Default grouping is (src IP, dst IP, protocol number).

Args: file_path: Path to the PCAP file group_by: Comma-separated tshark field names to group by (default: "ip.src,ip.dst,ip.proto"). Examples: "ip.src,tcp.dstport" for per-service flows, "ip.src,ip.dst,ip.proto,tcp.dstport" for 5-tuple display_filter: Optional display filter (e.g. "tcp.dstport == 5432") top_n: Number of top flows to return, ranked by bytes (default: 20)

Returns: Table of flow groups with packet count and byte total, ranked by volume

Inputs: file_path (required), top_n, group_by, display_filter. Returns: result

analyze_dnsA

Deep analysis of DNS traffic: query patterns, response times, error rates.

Extracts per-query details including query name, response code, and response time, then summarises top queried domains and NXDOMAIN failures.

Args: file_path: Path to the PCAP file display_filter: Optional extra display filter (applied in addition to dns) top_n: Number of top domains to show in summary (default: 30)

Returns: DNS summary with top queried domains, NXDOMAIN list, and response stats

Inputs: file_path (required), top_n, display_filter. Returns: result

analyze_map_operationsA

Analyse GSM MAP (Mobile Application Part) operations from SS7 traffic.

Extracts MAP operation codes, IMSI, and MSISDN values to show which operations are most frequent and which subscribers are involved. Useful for telecom network auditing and SS7 security analysis.

Typical protocol stack: SCTP -> M3UA -> SCCP -> TCAP -> MAP

Args: file_path: Path to the PCAP file display_filter: Optional extra filter to narrow MAP traffic top_n: Top N operations and subscribers to show (default: 20)

Returns: MAP operation frequency table and per-IMSI activity summary

Inputs: file_path (required), top_n, display_filter. Returns: result

analyze_pcap_fileA

Analyze a PCAP file using TShark.

Args: file_path: Path to the PCAP file display_filter: Optional display filter to apply keylog_file: Optional path to a TLS key log file (SSLKEYLOGFILE) for decrypting TLS/SSL traffic max_packets: Maximum number of packets to output (default 100)

Returns: Packet analysis output

Inputs: file_path (required), keylog_file, max_packets, display_filter. Returns: result

capture_and_decryptA

Capture live TLS traffic and immediately show decrypted plaintext.

This tool saves the capture to a PCAP file and then decrypts it using the provided TLS key log file. The application generating traffic must write its session keys to keylog_file during capture (set SSLKEYLOGFILE env var before launching Chrome, Firefox, curl, Python, etc.).

Workflow:

  1. Set SSLKEYLOGFILE=C:/path/keys.log before launching the target app

  2. Call this tool pointing at the same keys.log

  3. Browse or make HTTPS requests in the target app

  4. The tool returns decrypted HTTP/application data

Args: interface: Network interface to capture on (from list_interfaces) keylog_file: Path to the TLS key log file written by the target app output_pcap: Path where the captured PCAP will be saved for later analysis packet_count: Number of packets to capture (default: 200, max: 500) duration: Capture duration in seconds (default: 30, max: 60) display_filter: Optional display filter (e.g. "tls" or "tcp.port == 443")

Returns: Summary of captured packets and decrypted TLS stream content

Inputs: interface (required), keylog_file (required), output_pcap (required), duration, +2 more. Returns: result

capture_liveA

Capture live packets from a network interface.

Args: interface: Network interface name (use list_interfaces to find names) packet_count: Number of packets to capture (default: 50, max: 500) display_filter: Optional display filter to apply duration: Maximum capture duration in seconds (default: 10, max: 60)

Returns: Captured packet summary

Inputs: interface (required), duration, packet_count, display_filter. Returns: result

capture_processA

Capture network traffic from a specific process by its PID.

Snapshots the process's active connections at the moment capture starts, builds a BPF filter from those local ports, and captures only the matching traffic. New connections opened after capture starts share the same ports and are included automatically.

Use list_processes() to find the PID, and list_interfaces() to find the interface name.

Args: pid: Process ID to capture traffic for. interface: Network interface to capture on (from list_interfaces). output_pcap: Path where the captured PCAP will be saved. duration: Capture duration in seconds (default: 30, max: 60). packet_count: Maximum packets to capture (default: 200, max: 500). keylog_file: Optional TLS key log file path (SSLKEYLOGFILE format). When provided, decrypted TLS stream content is included in the output. The file must exist before calling this.

Returns: Capture summary showing detected connections, packet list, and (when keylog_file is supplied) decrypted TLS stream content.

Inputs: pid (required), interface (required), output_pcap (required), duration, +2 more. Returns: result

export_objectsA

Extract transferred files from a PCAP using tshark's --export-objects.

Reconstructs files exchanged over application protocols and writes them to output_dir. Useful for forensic recovery of HTTP downloads, SMB file transfers, FTP uploads/downloads, and TFTP transfers.

Args: file_path: Path to the PCAP file protocol: Protocol layer to extract from — one of: http, smb, tftp, imf, dicom output_dir: Directory where extracted files will be written (must exist)

Returns: List of extracted files with sizes, or error message

Inputs: protocol (required), file_path (required), output_dir (required). Returns: result

export_to_jsonA

Export packets from a PCAP file as JSON for structured analysis.

Args: file_path: Path to the PCAP file display_filter: Optional display filter to apply max_packets: Maximum number of packets to export (default 50) keylog_file: Optional path to a TLS key log file for decrypting TLS traffic

Returns: JSON-formatted packet data (decrypted if keylog_file is provided)

Inputs: file_path (required), keylog_file, max_packets, display_filter. Returns: result

extract_fieldsA

Extract specific fields from packets in a PCAP file.

Args: file_path: Path to the PCAP file fields: Comma-separated field names (e.g. "ip.src,ip.dst,tcp.port"). Use "http.request.uri" or "tls.app_data" for decrypted content. display_filter: Optional display filter to apply keylog_file: Optional path to a TLS key log file for decrypting TLS traffic

Returns: Tab-separated field values, one packet per line

Inputs: fields (required), file_path (required), keylog_file, display_filter. Returns: result

extract_packet_detailsB

Extract detailed information about a specific packet.

Args: file_path: Path to the PCAP file packet_number: The packet number to analyze (1-based)

Returns: Detailed packet information

Inputs: file_path (required), packet_number (required). Returns: result

filter_and_saveA

Filter packets from a PCAP file and save the result to a new PCAP file.

Args: input_file: Path to the source PCAP file output_file: Path where the filtered PCAP will be saved display_filter: Display filter to select packets (e.g. "tcp.port == 80")

Returns: Status message with packet count written

Inputs: input_file (required), output_file (required), display_filter (required). Returns: result

follow_streamA

Follow and reconstruct a TCP or UDP stream.

Args: file_path: Path to the PCAP file protocol: Stream protocol - "tcp", "udp", or "sctp" stream_index: Stream index to follow (default: 0, the first stream) keylog_file: Optional path to a TLS key log file. When provided, use follow_tls_stream instead for decrypted TLS content.

Returns: Reconstructed stream content as ASCII text

Inputs: protocol (required), file_path (required), keylog_file, stream_index. Returns: result

follow_tls_streamA

Follow and reconstruct a decrypted TLS stream as plaintext.

Requires a TLS key log file (SSLKEYLOGFILE). To generate one:

  • Chrome/Edge: launch with --ssl-key-log-file=C:/path/keys.log

  • Firefox: set environment variable SSLKEYLOGFILE=C:/path/keys.log

  • Python requests/httpx: set SSLKEYLOGFILE env var before running

Args: file_path: Path to the PCAP file containing TLS traffic keylog_file: Path to the TLS key log file (SSLKEYLOGFILE format) stream_index: TLS stream index to follow (default: 0, the first stream)

Returns: Decrypted TLS stream content as ASCII plaintext

Inputs: file_path (required), keylog_file (required), stream_index. Returns: result

get_conversationsA

Get conversation statistics from a PCAP file.

Args: file_path: Path to the PCAP file protocol: Protocol to analyze - one of: eth, ip, tcp, udp, sctp (default: tcp)

Returns: Conversation statistics table

Inputs: file_path (required), protocol. Returns: result

get_flow_matrixA

Build a host-pair communication matrix showing traffic volume.

Extracts ip.src, ip.dst, and frame.len fields from packets, then aggregates by (src, dst) pair sorted by total bytes descending.

Args: file_path: Path to the PCAP file display_filter: Optional display filter (e.g. "not arp") top_n: Number of top host pairs to return (default: 20)

Returns: Ranked table of host pairs with packet count and byte totals

Inputs: file_path (required), top_n, display_filter. Returns: result

get_packet_statisticsB

Get statistics about packets in a PCAP file.

Args: file_path: Path to the PCAP file

Returns: Packet statistics

Inputs: file_path (required). Returns: result

get_tcp_performanceA

Analyse TCP performance: RTT, retransmissions, window size, and lost segments.

Extracts tcp.analysis.ack_rtt, tcp.window_size, tcp.analysis.retransmission, and tcp.analysis.lost_segment fields to compute aggregate statistics useful for diagnosing network quality.

Args: file_path: Path to the PCAP file display_filter: Optional display filter (e.g. "ip.addr == 10.0.0.1")

Returns: Performance summary with RTT stats, retransmission count, and window info

Inputs: file_path (required), display_filter. Returns: result

get_traffic_timeseriesA

Compute traffic volume over time — packets and bytes per interval.

Uses tshark's io,stat to bucket traffic into fixed-width time windows. Useful for identifying bursts, sustained flows, and periodic patterns.

Args: file_path: Path to the PCAP file interval_seconds: Bucket width in seconds (default: 1.0) display_filter: Optional display filter to restrict which packets are counted (e.g. "tcp", "ip.addr == 10.0.0.1")

Returns: Table of intervals with frame count and byte count per bucket

Inputs: file_path (required), display_filter, interval_seconds. Returns: result

list_interfacesA

List available network interfaces for capture.

Returns: List of network interfaces

Inputs: no named parameters. Returns: result

list_processesA

List running processes with their PIDs.

Use this to find the PID to pass to capture_process.

Args: name_filter: Optional substring to filter process names (case-insensitive). E.g. "chrome" or "python".

Returns: Table of PID and process name for matching processes.

Inputs: name_filter. Returns: result

merge_pcap_filesA

Merge multiple PCAP files in timestamp order and analyse the combined result.

Uses mergecap (bundled with Wireshark) to combine captures from multiple network taps or capture sessions, then runs a packet summary on the merged file. Useful for correlating events across different capture points.

Args: input_files: Comma-separated paths to input PCAP files (minimum 2) output_file: Path where the merged PCAP will be written display_filter: Optional display filter for the post-merge summary

Returns: Merge status and packet summary of the combined capture

Inputs: input_files (required), output_file (required), display_filter. Returns: result

reconstruct_tcap_dialogueA

Reconstruct SS7 TCAP signaling dialogues from a PCAP file.

Groups TCAP messages (Begin/Continue/End/Abort) by their transaction IDs (OTID/DTID) to show the full lifecycle of each signaling dialogue. MAP operation codes (when present) are included for each component.

Typical protocol stack: SCTP -> M3UA -> SCCP -> TCAP -> MAP

Args: file_path: Path to the PCAP file display_filter: Optional extra filter (e.g. "sccp.called_party == '...'") max_dialogues: Maximum number of dialogues to reconstruct (default: 20)

Returns: Per-dialogue message sequence with timestamps, message types, and MAP ops

Inputs: file_path (required), max_dialogues, display_filter. Returns: result

run_tshark_commandC

Run a TShark command with the given arguments.

Args: command_args: The command line arguments to pass to tshark

Returns: The output of the tshark command

Inputs: command_args (required). Returns: result

tshark_reading_manualA

Get detailed workflow instructions on how to set up TLS/SSL decryption, including extracting keys from memory via x64dbg. Call this tool BEFORE attempting to decrypt TLS traffic.

Inputs: no named parameters. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 25 tools

    Disambiguation2/5

    Several tools overlap significantly: analyze_pcap_file, extract_fields, export_to_json, and run_tshark_command all provide generic packet extraction; get_flow_matrix, aggregate_flows, and get_conversations all produce communication summaries. This creates selection ambiguity for agents.

    Naming Consistency5/5

    All tools follow a consistent verb_noun snake_case convention (get_, list_, analyze_, extract_, etc.), with only tshark_reading_manual deviating as a documentation helper.

    Tool Count3/5

    At 25 tools, the set sits at the high end of the borderline range. While many tools serve specialized purposes, several are redundant (e.g., multiple generic extraction tools), making the surface feel heavier than necessary.

    Completeness5/5

    The domain of PCAP analysis is thoroughly covered: capture, filtering, field extraction, JSON export, stream following, TLS decryption, DNS/TCP/SS7 analysis, object export, and merging. The presence of run_tshark_command also provides a fallback for any uncovered operation, eliminating dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that enables AI-assisted network packet analysis using Wireshark's TShark tool. It provides tools for pcap file overview, session extraction, protocol filtering, and statistical analysis through a standardized interface.
      1
      MIT
    • A
      license
      C
      quality
      B
      maintenance
      An MCP server that enables LLMs to analyze pcap files by providing tools for packet dissection, stream following, and data extraction via tshark. It supports protocol hierarchy analysis, credential scanning, and threat intelligence checks on captured network traffic.
      54
      582 PyPI
      402
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      An MCP server for analyzing network traffic and pcap files using tshark. It enables users to list TCP streams, extract application-layer payloads, and perform packet analysis with BPF filters.
      2
      -