Metadata-Version: 2.4
Name: mcp-pcapy-ng
Version: 0.1.0
Summary: MCP server exposing pcapy-ng packet capture functionality
Project-URL: Homepage, https://github.com/daedalus/mcp-pcapy-ng
Project-URL: Repository, https://github.com/daedalus/mcp-pcapy-ng
Project-URL: Issues, https://github.com/daedalus/mcp-pcapy-ng/issues
Author-email: Dario Clavijo <clavijodario@gmail.com>
License: MIT
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: fastmcp
Provides-Extra: all
Requires-Dist: hatch; extra == 'all'
Requires-Dist: hypothesis; extra == 'all'
Requires-Dist: mypy; extra == 'all'
Requires-Dist: pip-api; extra == 'all'
Requires-Dist: pytest; extra == 'all'
Requires-Dist: pytest-asyncio; extra == 'all'
Requires-Dist: pytest-cov; extra == 'all'
Requires-Dist: pytest-mock; extra == 'all'
Requires-Dist: ruff; extra == 'all'
Provides-Extra: dev
Requires-Dist: hatch; extra == 'dev'
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: pip-api; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: lint
Requires-Dist: mypy; extra == 'lint'
Requires-Dist: ruff; extra == 'lint'
Provides-Extra: test
Requires-Dist: hypothesis; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-asyncio; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: pytest-mock; extra == 'test'
Description-Content-Type: text/markdown

# mcp-pcapy-ng

MCP server exposing pcapy-ng packet capture functionality.

[![PyPI](https://img.shields.io/pypi/v/mcp-pcapy-ng.svg)](https://pypi.org/project/mcp-pcapy-ng/)
[![Python](https://img.shields.io/pypi/pyversions/mcp-pcapy-ng.svg)](https://pypi.org/project/mcp-pcapy-ng/)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

mcp-name: io.github.daedalus/mcp-pcapy-ng

## Install

```bash
pip install mcp-pcapy-ng
```

## Usage

The MCP server provides tools for network packet capture using pcapy-ng:

```python
from mcp_pcapy_ng import mcp
mcp.run()
```

Or via command line:

```bash
mcp-pcapy-ng
```

## Available Tools

- `findalldevs` - List all available network interfaces
- `lookupdev` - Get the default network device
- `open_live` - Open a live network interface for packet capture
- `open_offline` - Open a pcap file for reading
- `create` - Create a packet capture handle
- `compile` - Create a BPF filter program
- `pcap_read` - Read packets from a pcap handle
- `pcap_datalink` - Get the data link type
- `pcap_setfilter` - Attach a BPF filter
- `pcap_getnonblock` - Get non-blocking status
- `pcap_setnonblock` - Set non-blocking mode
- `get_dlt_names` - Get DLT constant mappings
- `get_pcap_directions` - Get direction constant mappings
- `get_constants` - Get all constants

## Development

```bash
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/
```
