TShark MCP
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.
README
TShark MCP
MCP service for analyzing network traffic with tshark.
Installation
pip install -e .
Requirements
- Python 3.10+
- tshark (part of Wireshark)
Configuration
TShark Path
By default, the service will search for tshark in the following order:
TSHARK_PATHenvironment variable- macOS default:
/Applications/Wireshark.app/Contents/MacOS/tshark - System PATH
You can set the tshark path via environment variable:
export TSHARK_PATH=/path/to/tshark
MCP Client Configuration
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"
}
}
}
}
Usage
Start the MCP server:
tshark-mcp
Or run directly:
python -m tshark_mcp.server
Tools
analyze_pcap_file
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 expression
Returns: All TCP streams with protocol identification and payload data.
list_tcp_streams
List all TCP streams in a pcap file with basic information.
Parameters:
file_path(required): Path to the pcap/pcapng file
Returns: Stream list with addresses, ports, packet counts, and protocol.
extract_stream_data
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_pcap_data
Analyze base64-encoded pcap data.
Parameters:
data(required): Base64-encoded pcap/pcapng datafilter(optional): BPF filter expression
Returns: All TCP streams with protocol identification and payload data.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.