This wraps pcapy-ng to give you packet capture operations through MCP. You get tools to list network interfaces with findalldevs, open live captures with open_live, read from pcap files with open_offline, and apply BPF filters with compile and pcap_setfilter. The usual workflow is opening a capture handle, optionally setting a filter for specific traffic, then reading packets with pcap_read. Reach for this when you need to analyze network traffic or debug protocol issues from within Claude, whether you're working with live interfaces or existing pcap files. It exposes the core pcapy-ng API including non-blocking modes, datalink types, and direction constants for packet filtering.
MCP server exposing pcapy-ng packet capture functionality.
mcp-name: io.github.daedalus/mcp-pcapy-ng
pip install mcp-pcapy-ng
The MCP server provides tools for network packet capture using pcapy-ng:
from mcp_pcapy_ng import mcp
mcp.run()
Or via command line:
mcp-pcapy-ng
findalldevs - List all available network interfaceslookupdev - Get the default network deviceopen_live - Open a live network interface for packet captureopen_offline - Open a pcap file for readingcreate - Create a packet capture handlecompile - Create a BPF filter programpcap_read - Read packets from a pcap handlepcap_datalink - Get the data link typepcap_setfilter - Attach a BPF filterpcap_getnonblock - Get non-blocking statuspcap_setnonblock - Set non-blocking modeget_dlt_names - Get DLT constant mappingsget_pcap_directions - Get direction constant mappingsget_constants - Get all constantsgit clone https://github.com/daedalus/mcp-pcapy-ng.git
cd mcp-pcapy-ng
pip install -e ".[test]"
# run tests
pytest
# format
ruff format src/ tests/
# lint
ruff check src/ tests/
# type check
mypy src/