packet-analysis
Packet Analysis Skill
MCP Server
- Script:
$PACKET_BUDDY_MCP_SCRIPT - Invocation:
python3 $MCP_CALL "python3 -u $PACKET_BUDDY_MCP_SCRIPT" <tool_name> '<json_args>'
Available Tools
Discovery
- list_pcaps — List all pcap files available for analysis
- pcap_summary — High-level stats: packet count, duration, capture size
Traffic Analysis
- pcap_protocol_hierarchy — Protocol breakdown (what % is TCP, UDP, DNS, etc.)
- pcap_conversations — Who talked to whom (IP, TCP, UDP, or Ethernet layer)
- pcap_endpoints — Top talkers by traffic volume
Filtering & Inspection
- pcap_filter — Apply Wireshark display filters (e.g.
tcp.port==80,icmp,bgp) - pcap_packet_detail — Full decode of a specific packet by number
- pcap_to_json — Export packets as JSON for detailed analysis
- pcap_expert_info — Warnings, errors, retransmissions, anomalies
Protocol-Specific
- pcap_dns_queries — Extract all DNS queries and responses
- pcap_http_requests — Extract HTTP methods, URIs, and hosts
File Management
- save_pcap_from_base64 — Save a base64-encoded pcap (e.g. from Slack file upload)
Workflow: Slack pcap Upload
When a user uploads a .pcap or .pcapng file in Slack:
- The file arrives as a Slack file attachment
- Download the file content and save it using save_pcap_from_base64
- Run pcap_summary to give an overview
- Ask the user what they want to investigate
- Use appropriate tools to drill down
Workflow: Troubleshooting
When investigating a network issue with a pcap:
- Start with pcap_summary for the big picture
- Check pcap_protocol_hierarchy — any unexpected protocols?
- Look at pcap_conversations — who's talking to whom?
- Use pcap_expert_info for retransmissions, resets, errors
- Apply pcap_filter to focus on specific traffic
- Use pcap_packet_detail for deep inspection of suspect packets
Common Display Filters
| Filter | Purpose |
|---|---|
tcp.analysis.retransmission |
TCP retransmissions |
tcp.flags.reset==1 |
TCP RST packets |
dns |
All DNS traffic |
icmp |
Ping and ICMP errors |
bgp |
BGP routing protocol |
ospf |
OSPF routing protocol |
tcp.port==22 |
SSH traffic |
http |
HTTP requests/responses |
tls.handshake |
TLS handshakes |
arp |
ARP requests/replies |
stp |
Spanning Tree Protocol |
ip.addr==10.0.0.1 |
Traffic to/from specific host |
Environment Variables
PACKET_BUDDY_MCP_SCRIPT— Path to packet-buddy-mcp/server.pyPCAP_UPLOAD_DIR— Directory for pcap files (default: /tmp/netclaw-pcaps)
Important Rules
- Large pcaps can be slow — use filters to narrow down
- When showing results, summarize key findings rather than dumping raw output
- Always check pcap_expert_info first — tshark already flags the problems
- For Slack uploads, confirm the file was saved before attempting analysis
More from automateyournetwork/netclaw
pyats-topology
Network topology discovery via CDP/LLDP neighbors, ARP tables, routing peers, and interface mapping to build complete network maps. Use when mapping the network, building a diagram, discovering what is connected to what, or documenting device neighbors and links.
20aws-architecture-diagram
AWS architecture diagrams — generate visual network topology diagrams from live AWS infrastructure. Use when drawing AWS network diagrams, visualizing VPCs, mapping Transit Gateway topology, or generating architecture documentation.
19grafana-observability
Grafana observability platform — dashboards, Prometheus PromQL, Loki LogQL, alerting, incidents, OnCall schedules, annotations, datasource queries, panel rendering (75+ tools). Use when querying Grafana dashboards, running PromQL for interface metrics, searching Loki logs for syslog events, investigating firing alerts, or checking who is on call.
18pyats-health-check
Comprehensive network device health monitoring - CPU, memory, interfaces, hardware, NTP, logging, environment, and uptime analysis. Use when running a device health check, monitoring CPU or memory usage, checking interface errors, or validating NTP sync.
17aws-security-audit
AWS security auditing — IAM users/roles/policies, CloudTrail API events, security posture analysis. Use when auditing IAM permissions, investigating security incidents, checking MFA compliance, or tracing API activity in CloudTrail.
16aws-cloud-monitoring
AWS CloudWatch monitoring — metrics, alarms, log queries, VPC flow log analysis, network performance. Use when checking AWS alarms, analyzing VPC flow logs, investigating network latency, or monitoring VPN and NAT Gateway metrics.
15