semvec/pypi-packages huggingface dataset:
strawgate_es_mcp 0.6.0
Strawgate's Elasticsearch MCP project
Requires Python: >=3.12

# strawgate_es_mcp

Strawgate's Unofficial MCP Server for Elasticsearch.

Use at your own risk. This is not an official Elasticsearch product. This MCP Server will probably break your Elasticsearch cluster. Do not use it.

This project provides a Model Context Protocol (MCP) server implemented in Python using `fastmcp`. Its primary purpose is to expose a wide range of Elasticsearch client functionalities as callable MCP tools, allowing for interaction with an Elasticsearch cluster via the MCP.

## Features

- **Elasticsearch Tooling**: Exposes numerous Elasticsearch client APIs as MCP tools, including:
    - CAT APIs (allocation, aliases, count, indices, nodes, shards, etc.)
    - Cluster APIs (health, state, stats)
    - Nodes APIs (info, stats)
    - Indices APIs (create/get data stream, stats, resolve index)
    - ILM and SLM APIs (get/explain lifecycle, get status, get stats)
    - Shutdown APIs (get node)
    - Search API
- **CLI**: A CLI for the MCP Server.
- **Extensible**: Easily add new Elasticsearch client methods as MCP tools or integrate with other MCP tools.
- **Sample Script**: Includes `sample_multisearch.py` to demonstrate using the Elasticsearch Python client for multi-searches.
- **Testing**: Includes unit tests for the exposed tools and sample scripts using `pytest`.

## Setup in Windsurf

On the right in the cascade window press the hammer icon and add a server with the following configuration:

```json
{
    "mcpServers": {
        "es-mcp": {
            "command": "uvx",
            "args": [
                "--from",
                "git+https://github.com/strawgate/py-mcp-collection.git#subdirectory=es-mcp",
                "es-mcp"
            ],
            "env": {
                "ES_HOST": "https://my-cloud-cluster:443",
                "ES_API_KEY": "MYCOOLAPIKEY"
            }
        }
    }
}
```

## VS Code McpServer Usage

1. Open the command palette (Ctrl+Shift+P or Cmd+Shift+P).
2. Type "Settings" and select "Preferences: Open User Settings (JSON)".
3. Add the following MCP Server configuration

```json
{
    "mcp": {
        "servers": {
            "Es Mcp": {
                "command": "uvx",
                "args": [
                    "--from",
                    "git+https://github.com/strawgate/py-mcp-collection.git#subdirectory=es_mcp",
                    "es-mcp"
                ]
            }
        }
    }
}
```

## Roo Code / Cline McpServer Usage
Simply add the following to your McpServer configuration. Edit the AlwaysAllow list to include the tools you want to use without confirmation.

```
    "es-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/strawgate/py-mcp-collection.git#subdirectory=es_mcp",
        "es-mcp"
      ]
    }
```


## License

See [LICENSE](LICENSE).
pcap-anonymize 0.3.0
Anonymize PCAP files
Requires Python: >=3.8
Keywords: network, traffic, pcap, anonymize

# pcap-anonymize

This Python package reads PCAP files,
and produces anonymized versions of the given files.
More precisely, the following fields are anonymized:
- Ethernet
  - Source MAC address
  - Destination MAC address
- ARP
  - Source hardware address
  - Destination hardware address
- DHCP
  - Client hardware address
  - Client Identifier option
- HTTP
  - All fields are removed, except the method and URI path.
  - Request parameters are removed
- CoAP
  - All fields are removed, except the type, code, and URI path.
- TP-Link Smart Home protocol (TCP port 9999)
  - The TCP payload is removed.


## Installation

### Dependencies
- [`scapy`](https://pypi.org/project/scapy)

### Retrieve from PyPI

```bash
pip install pcap-anonymize
```

## Usage

### CLI

```bash
pcap-anonymize [-i input] [-o output] [-d dir]
```

The program can be used either with a single input PCAP file,
or a directory containing multiple PCAP files.

Options for the former case are the following:
- `input`: path to a single input PCAP file
- `output`: path to a single output file.
  - If not specified, a new file is created in the same directory as the input file, with the name `<input>.anon.pcap`.

In the latter case, only the directory containing the PCAP files is provided.
For each PCAP file, its corresponding, anonymized output file will be created in the same directory,
with the suffix `anon.pcap`.


If no option is provided, the program stops directly.


### Library

#### Single input/output file
```python
from pcap_anonymize import anonymize_pcap

anonymize_pcap(
    input: os.PathLike,
    output: os.PathLike = None
)
```

#### Directory
```python
from pcap_anonymize import anonymize_pcaps_in_dir

anonymize_pcaps_in_dir(
    dir: os.PathLike
)
```