SharkMCP
Provides tools for loading and analyzing PCAP/PCAPNG files using Wireshark's sharkd, enabling AI agents to inspect network packets, conversations, protocol statistics, and more.
Click on "Install 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., "@SharkMCPload capture.pcapng and show summary"
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.
SharkMCP
An MCP server that exposes sharkd — Wireshark's programmatic interface — as a set of tools for LLMs. Load PCAP/PCAPNG files and analyse them with natural language.
Requirements
Python 3.10+
Wireshark (provides
sharkd)
Installation
git clone https://github.com/weirdmachine64/sharkmcp.git
cd sharkmcp
pip install -e .Or run directly from the repo without installing:
uvx --from git+https://github.com/weirdmachine64/sharkmcp sharkmcpConfiguration
Add to your .mcp.json:
{
"mcpServers": {
"sharkmcp": {
"command": "uvx",
"args": ["--from", "git+https://github.com/weirdmachine64/sharkmcp", "sharkmcp"],
"env": {
"SHARKMCP_TIMEOUT": "300"
}
}
}
}Env var | Default | Description |
|
| Path to sharkd binary |
|
| Per-request timeout in seconds |
Tools
Each loaded PCAP gets a dedicated sharkd subprocess. Results from expensive scans (conversations, expert info, export objects) are cached in memory so paginated follow-up calls are served without re-scanning.
Session
Tool | Description |
| Load a PCAP/PCAPNG file |
| List all loaded PCAPs |
| Terminate session and free memory |
Overview
Tool | Description |
| Frame count, duration, file size, protocols seen |
| All available tap types, follow protocols, field types |
Packet Inspection
Tool | Description |
| Paginated frame list with display filter |
| Full protocol tree for one frame |
| Extract arbitrary fields per packet as a table |
Utilities
Tool | Description |
| Validate a display filter and/or field name |
| Autocomplete field or preference names by prefix |
| Read dissector preferences |
| Set a dissector preference for this session |
| Annotate a frame (session-scoped) |
Traffic Structure
Tool | Description |
| Nested protocol tree with frame/byte counts |
| Per-interval frame and byte counts |
| Multi-line traffic graph; supports |
| Reassemble a stream ( |
Conversations & Topology
Tool | Description |
| Conversation table — bytes/frames per peer pair |
| Endpoint table — tx/rx per host |
Supported layer types for both: tcp, udp, ip, ipv6, eth, sctp, dccp, mptcp, wifi, bluetooth, zigbee, fc, fddi, usb, and more.
Protocol Statistics
Tool | Description |
| Per-frame anomaly detection — errors, warnings, notes, chats |
| Aggregate stats for |
| Request/response latency for |
| Round-trip delay for |
| Flow diagram data for |
Media & VoIP
Tool | Description |
| SIP/H.323 call list with state and participants |
| RTP stream inventory; pass |
| UDP multicast stream statistics |
Export & Objects
Tool | Description |
| List extractable objects ( |
| Download an object, TLS session keys ( |
Escape Hatch
Tool | Description |
| Run any sharkd tap directly — up to 16 specs in one PCAP scan. Use |
Example
> load_pcap("/captures/traffic.pcap", alias="traffic")
> protocol_hierarchy("traffic")
> expert_info("traffic", limit=20)
> conversations("traffic", type="tcp", sort_by="bytes")
> extract_fields("traffic", ["dns.qry.name", "dns.a"], filter="dns")
> follow_stream("traffic", "http", "tcp.stream eq 0")
> export_objects("traffic", type="http")
> download_object("traffic", "eo:http_0")Architecture
LLM
│ MCP (stdio)
▼
SharkMCP server
│ JSON-RPC 2.0 (stdin/stdout)
├─ sharkd [pcap-1]
├─ sharkd [pcap-2]
└─ sharkd [pcap-N]One sharkd subprocess per loaded PCAP. Sessions are isolated — concurrent queries on different aliases never block each other.
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/weirdmachine64/SharkMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server