Metadata-Version: 2.4
Name: rabbitmq-mcp
Version: 0.1.3
Summary: RabbitMQ MCP server
License-File: LICENSE
Requires-Python: >=3.12
Requires-Dist: aio-pika<11,>=9.4
Requires-Dist: fastmcp<3,>=2.0
Requires-Dist: httpx<0.28,>=0.27
Requires-Dist: jsonschema>=4.20
Requires-Dist: pika>=1.3
Requires-Dist: pydantic>=2.6
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: datamodel-code-generator>=0.25; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Provides-Extra: vector
Requires-Dist: numpy<2.0,>=1.26; extra == 'vector'
Requires-Dist: sentence-transformers<3,>=2.6; extra == 'vector'
Description-Content-Type: text/markdown

# rabbitmq-mcp

RabbitMQ MCP server for management and AMQP operations, with OpenAPI-driven `call_id` execution and semantic search.

## Features

- MCP tools: `search_ids` / `get_id` / `call_id`
- OpenAPI-driven full HTTP management API calls
- Semantic search (optional embeddings, keyword fallback when dependencies are missing)
- Request/response validation (Pydantic first, jsonschema fallback)
- Destructive operation safety guard (disabled by default)
- AMQP: `publish/consume/ack/nack/reject`

## Requirements

- Python 3.12+
- RabbitMQ Management Plugin (Management API)

## Install & Run

### Using uvx

```bash
uvx rabbitmq-mcp \
  --host localhost \
  --port 15672 \
  --user admin \
  --password admin123 \
  --allow-destructive false
```

### From source

```bash
uv run --project . rabbitmq-mcp \
  --host localhost \
  --port 15672 \
  --user admin \
  --password admin123 \
  --allow-destructive false
```

## CLI Parameters

Required:

- `--host`
- `--port`
- `--user`
- `--password`
- `--allow-destructive` (`true|false`)

Optional (with defaults):

- `--amqp-port` (default `5672`)
- `--vhost` (default `/`)
- `--scheme` (default `http`)
- `--verify-ssl` (default inferred from `scheme`)
- `--timeout` (default `10.0`)
- `--max-connections` (default `20`)
- `--max-keepalive` (default `10`)
- `--retries` (default `1`)
- `--retry-backoff` (default `0.2`)
- `--vhost-cache-ttl` (default `60`)

## MCP Tools

- `search_ids`: Search operationId by keyword/semantics (pagination supported).
- `get_id`: Return input/output schema for the given operationId.
- `call_id`: Execute the operationId (HTTP/AMQP auto routing).

## MCP Config Example

Example JSON config for MCP clients that accept command/args (e.g., Claude Desktop):

```json
{
  "mcpServers": {
    "rabbitmq": {
      "command": "uvx",
      "args": [
        "rabbitmq-mcp",
        "--host",
        "localhost",
        "--port",
        "15672",
        "--user",
        "admin",
        "--password",
        "CHANGE_ME",
        "--allow-destructive",
        "false"
      ]
    }
  }
}
```

## Generation & Validation Scripts

```bash
# Validate OpenAPI
uv run --project . validate-openapi

# Generate Pydantic schemas
uv run --project . generate-schemas

# Generate registry
uv run --project . python scripts/generate_registry.py

# Generate embeddings (requires vector extra)
uv run --project . --extra vector python scripts/generate_embeddings.py
```