loading…
Search for a command to run...
loading…
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 p
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.
MCP service for analyzing network traffic with tshark.
pip install -e .
By default, the service will search for tshark in the following order:
TSHARK_PATH environment variable/Applications/Wireshark.app/Contents/MacOS/tsharkYou can set the tshark path via environment variable:
export TSHARK_PATH=/path/to/tshark
Add to your MCP client configuration (e.g., Claude Desktop):
{
"mcpServers": {
"tshark": {
"command": "/path/to/python",
"args": ["-m", "tshark_mcp.server"],
"env": {
"TSHARK_PATH": "/Applications/Wireshark.app/Contents/MacOS/tshark"
}
}
}
}
Start the MCP server:
tshark-mcp
Or run directly:
python -m tshark_mcp.server
Analyze a pcap/pcapng file and extract all TCP streams with their application layer data.
Parameters:
file_path (required): Path to the pcap/pcapng filefilter (optional): BPF filter expressionReturns: All TCP streams with protocol identification and payload data.
List all TCP streams in a pcap file with basic information.
Parameters:
file_path (required): Path to the pcap/pcapng fileReturns: Stream list with addresses, ports, packet counts, and protocol.
Extract payload data from a specific TCP stream.
Parameters:
file_path (required): Path to the pcap/pcapng filestream_index (required): TCP stream index (0-based)direction (optional): "client", "server", or "both" (default: "both")Returns: Payload data for the specified direction(s).
Analyze base64-encoded pcap data.
Parameters:
data (required): Base64-encoded pcap/pcapng datafilter (optional): BPF filter expressionReturns: All TCP streams with protocol identification and payload data.
List all TCP packets in a pcap file with detailed information.
Parameters:
file_path (required): Path to the pcap/pcapng filestream_index (optional): TCP stream index to filter packetsfilter (optional): BPF filter expressionReturns: Packet list with frame number, time, addresses, ports, protocol, and length.
List all UDP streams in a pcap file with basic information.
Parameters:
file_path (required): Path to the pcap/pcapng filefilter (optional): BPF filter expressionReturns: Stream list with addresses, ports, packet counts, and protocol.
List all UDP packets in a pcap file with detailed information.
Parameters:
file_path (required): Path to the pcap/pcapng filefilter (optional): BPF filter expressionReturns: Packet list with frame number, time, addresses, ports, protocol, and length.
List all ICMP packets in a pcap file with detailed information. Useful for analyzing ICMP tunnels and ping traffic.
Parameters:
file_path (required): Path to the pcap/pcapng filefilter (optional): BPF filter expressionReturns: Packet list with frame number, time, addresses, ICMP type/code, length, and payload (hex and ASCII).
ICMP Types:
List all DNS queries in a pcap file with domain names and response IPs. Requests and responses are automatically correlated by transaction ID.
Parameters:
file_path (required): Path to the pcap/pcapng filefilter (optional): BPF filter expressionReturns: Query list with domain name, query type, transaction ID, request/response frames, and response IPs.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"tshark-mcp": {
"command": "npx",
"args": []
}
}
}PRs, issues, code search, CI status
Database, auth and storage
Reference / test server with prompts, resources, and tools.
Secure file operations with configurable access controls.