About mcp-pcapy-ng
mcp-pcapy-ng exposes pcapy-ng packet-capture functions through an MCP server for users who need to capture or read network traffic. Its tools cover live interfaces, offline pcap files, and BPF filtering.
Key features
- 01List and select network interfaces
- 02Capture live or offline traffic
- 03Compile and apply BPF filters
- 04Read packets and link types
- 05Inspect capture constants and directions
Use cases
- 01Inspect available network interfaces
- 02Read packets from a pcap file
- 03Filter network traffic with BPF
MCP support
As an MCP server, it provides MCP clients with pcapy-ng capture tools for interface discovery, live or offline reading, and filter management.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEmcp-pcapy-ng
MCP server exposing pcapy-ng packet capture functionality.
mcp-name: io.github.daedalus/mcp-pcapy-ng
Install
pip install mcp-pcapy-ng
Usage
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
Available Tools
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 constants
Development
git 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/
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.