Wireshark MCP Server
Provides network packet analysis capabilities via Wireshark/tshark, including live packet capture, PCAP analysis, protocol statistics, stream reconstruction, file extraction, credential extraction, and HTTP object export.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Wireshark MCP Server analyze the pcap file for DNS queries"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Wireshark MCP Server
A Model Context Protocol (MCP) server that provides network packet analysis capabilities via Wireshark/tshark on a remote machine (e.g., Kali Linux).
This server enables AI assistants to perform sophisticated network traffic analysis, packet capture, protocol inspection, and security-focused operations through a standardized MCP interface.
Features
Live Packet Capture - Capture network traffic on remote interfaces with BPF filters
PCAP Analysis - Read and analyze existing pcap files
Protocol Statistics - Generate protocol hierarchy, conversations, endpoints, and I/O statistics
Stream Reconstruction - Follow TCP, UDP, HTTP, and TLS streams
File Extraction - Extract files from HTTP, SMB, DICOM, IMF, and TFTP traffic
Deep Packet Inspection - Decode packets with full protocol details
Credential Extraction - Search for credentials in HTTP Basic Auth, FTP, Telnet, and form submissions
HTTP Object Export - List and export HTTP objects from captures
Related MCP server: Wireshark MCP
Prerequisites
Node.js 18+
SSH access to a remote machine with tshark installed (e.g., Kali Linux)
SSH key-based authentication configured (password-less)
sudoaccess on the remote machine for packet capture
Installation
git clone https://github.com/schwarztim/sec-wireshark-mcp.git
cd sec-wireshark-mcp
npm install
npm run buildConfiguration
Set the following environment variables:
Variable | Description | Default |
| SSH hostname or IP of the remote machine |
|
| SSH username (optional if using SSH config) | (empty) |
| Directory on remote host for pcap files |
|
Example Configuration
export WIRESHARK_SSH_HOST="192.168.1.100"
export WIRESHARK_SSH_USER="kali"Or use an SSH config entry:
# ~/.ssh/config
Host kali
HostName 192.168.1.100
User kali
IdentityFile ~/.ssh/id_rsaUsage with Claude Desktop
Add to your Claude Desktop configuration (~/.claude/user-mcps.json or Claude Desktop settings):
{
"mcpServers": {
"wireshark": {
"command": "node",
"args": ["/path/to/sec-wireshark-mcp/dist/index.js"],
"env": {
"WIRESHARK_SSH_HOST": "kali",
"WIRESHARK_SSH_USER": "kali"
}
}
}
}Available Tools
tshark_list_interfaces
List available network interfaces on the remote machine for packet capture.
tshark_capture
Start packet capture on a specified interface.
Parameters:
interface(required): Network interface (e.g.,eth0,wlan0)count: Number of packets to capture (default: 10, max: 1000)filter: BPF capture filter (e.g.,port 80,host 192.168.1.1)timeout: Capture timeout in seconds (default: 10, max: 60)outputFile: Save capture to pcap file on remote host
tshark_read_pcap
Read and analyze a pcap file.
Parameters:
file(required): Path to the pcap file on remote hostfilter: Wireshark display filtercount: Maximum packets to return (default: 100, max: 1000)fields: Specific fields to extract (e.g.,['ip.src', 'ip.dst', 'tcp.port'])
tshark_filter
Apply a display filter to a pcap file.
Parameters:
file(required): Path to the pcap filefilter(required): Display filter (e.g.,http.request,dns,tcp.flags.syn == 1)outputFormat:json,text, orfields(default:json)fields: Fields to extract when usingfieldsformat
tshark_stats
Generate protocol statistics from a pcap file.
Parameters:
file(required): Path to the pcap filetype(required):hierarchy,conversations,endpoints,io,http, ordnsprotocol: Protocol for conversations/endpoints (e.g.,tcp,udp,ip)
tshark_follow_stream
Reconstruct a TCP, UDP, HTTP, or TLS stream.
Parameters:
file(required): Path to the pcap fileprotocol(required):tcp,udp,http, ortlsstreamIndex: Stream index number (default: 0)format:ascii,hex, orraw(default:ascii)
tshark_extract_files
Extract files from protocol traffic.
Parameters:
file(required): Path to the pcap fileprotocol:http,dicom,imf,smb, ortftp(default:http)outputDir: Directory for extracted files (default:/tmp/mcp-extracted)
tshark_decode
Deep packet inspection with full protocol details.
Parameters:
file(required): Path to the pcap filepacketNumber: Specific packet number to decodefilter: Display filter to select packetsprotocols: Specific protocols to show (e.g.,['http', 'tcp', 'ip'])verbose: Show all protocol details (default: false)
tshark_extract_credentials
Search for potential credentials in network traffic.
Parameters:
file(required): Path to the pcap file
Searches for HTTP Basic Auth, FTP credentials, HTTP POST form data, and Telnet data.
tshark_export_objects
List and export HTTP objects from a capture.
Parameters:
file(required): Path to the pcap filelistOnly: Only list objects without extracting (default: true)outputDir: Directory for extracted objects
Security Considerations
This server executes commands on a remote machine via SSH
Input sanitization is implemented to prevent command injection
Use SSH key authentication with appropriate permissions
Consider network segmentation for the capture machine
The remote machine requires
sudoaccess for live captureCredential extraction features should be used only for authorized security testing
Development
# Run in development mode
npm run dev
# Build for production
npm run build
# Start production server
npm startLicense
MIT License - see LICENSE for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Related Projects
Model Context Protocol - The protocol specification
Wireshark - Network protocol analyzer
tshark - Terminal-based Wireshark
Available Tools
10 toolstshark_captureB
Start packet capture on the remote Kali machine. Returns captured packets in JSON format. Requires sudo on the remote host.
Inputs: interface (required), count, filter, timeout, +1 more.
tshark_decodeC
Decode specific packets with detailed protocol information. Useful for deep packet inspection.
Inputs: file (required), filter, verbose, protocols, +1 more.
tshark_export_objectsB
List and export HTTP objects (files) from a pcap capture
Inputs: file (required), listOnly, outputDir.
tshark_extract_credentialsB
Search for potential credentials in network traffic (HTTP Basic Auth, FTP, Telnet, etc.)
Inputs: file (required).
tshark_extract_filesC
Extract files from HTTP, DICOM, IMF, SMB, or TFTP traffic in a pcap file.
Inputs: file (required), protocol, outputDir.
tshark_filterC
Apply a display filter to a pcap file and return matching packets. Useful for extracting specific traffic.
Inputs: file (required), filter (required), fields, outputFormat.
tshark_follow_streamA
Follow and reconstruct a TCP, UDP, or HTTP stream from a pcap file. Shows the full conversation.
Inputs: file (required), protocol (required), format, streamIndex.
tshark_list_interfacesA
List available network interfaces on the remote Kali machine for packet capture
Inputs: no named parameters.
tshark_read_pcapB
Read and analyze a pcap file from the remote Kali machine. Returns packets in JSON format.
Inputs: file (required), count, fields, filter.
tshark_statsC
Get protocol statistics from a pcap file. Shows protocol hierarchy, conversations, and endpoints.
Inputs: file (required), type (required), protocol.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool has a clearly distinct purpose, covering different aspects of packet analysis: capture, read, filter, decode, export objects, extract credentials, follow streams, list interfaces, and statistics. No overlap in functionality.
All tools follow a consistent 'tshark_' prefix with lowercase and underscores. Verbs are well-chosen and predictable (e.g., capture, decode, filter, follow_stream), making the surface easy to navigate.
With 10 tools, the server is well-scoped for the domain of network packet analysis. It provides a focused set without being overwhelming or too sparse.
The tool set covers key workflows: capture, read, filter, decode, extract objects/credentials, and statistics. Minor gaps exist (e.g., no tool to stop capture or merge pcaps), but the core functionality is well-represented.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides LLMs with real-time network traffic analysis capabilities, enabling tasks like threat hunting, network diagnostics, and anomaly detection through Wireshark's tshark.7605MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that integrates Wireshark's network analysis capabilities with AI systems like Claude, allowing direct analysis of network packet data without manual copying.32MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that provides network packet capture and analysis capabilities through Wireshark/tshark integration, enabling AI assistants to perform network security analysis and troubleshooting.436MIT
- AlicenseNot gradedqualityDmaintenanceAn 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.1MIT