Metadata-Version: 2.4
Name: docker-kestrel
Version: 0.1.0
Summary: MCP server providing diagnostic intelligence for Docker environments
Project-URL: Homepage, https://github.com/markalovell-git/docker-kestrel
Project-URL: Repository, https://github.com/markalovell-git/docker-kestrel
Project-URL: Issues, https://github.com/markalovell-git/docker-kestrel/issues
Author-email: Mark Lovell <markalovell@protonmail.com>
License: MIT License
        
        Copyright (c) 2026 Mark Lovell
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: devtools,diagnostics,docker,mcp
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.11
Requires-Dist: docker>=7.1.0
Requires-Dist: mcp>=1.27.0
Requires-Dist: pydantic>=2.12.5
Requires-Dist: pyyaml>=6.0.3
Description-Content-Type: text/markdown

# docker-kestrel

An MCP server that provides diagnostic intelligence for Docker environments. No Prometheus, no Datadog — just the daemon and smart analysis.

Connect docker-kestrel to Claude Desktop, Claude Code, Cursor, or any MCP-compatible client and ask plain-English questions about your containers.

## Why "kestrel"?

A kestrel is a small falcon known for hovering perfectly still in the wind while its eyes lock onto a target below. It watches — it doesn't swoop. docker-kestrel works the same way: it hovers over your containers and tells you exactly what's wrong, without touching anything.

## What it does

Existing Docker MCP servers wrap CLI commands (`start`, `stop`, `list`). docker-kestrel *reasons* about what's going on:

- **`diagnose_container`** — full diagnostic report: OOM detection, crash loop detection, health check analysis, resource snapshot, log summary
- **`resource_overview`** — ranked resource usage across all containers with anomaly flags
- **`network_map`** — Docker network topology, container IPs, port bindings
- **`compose_drift`** — compare a `docker-compose.yml` against running containers to find drift
- **`log_analysis`** — structured log analysis: error counts, pattern grouping, first/last occurrence

## Quick start

```bash
# Install with uv
uv tool install docker-kestrel

# Or run directly without installing
uvx docker-kestrel
```

**Claude Desktop** — `~/.config/claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "docker-kestrel": {
      "command": "uvx",
      "args": ["docker-kestrel"]
    }
  }
}
```

**Claude Code:**

```bash
claude mcp add docker-kestrel uvx docker-kestrel
```

**Cursor** — `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (per-project):

```json
{
  "mcpServers": {
    "docker-kestrel": {
      "command": "uvx",
      "args": ["docker-kestrel"]
    }
  }
}
```

## Example queries

Once connected, you can ask your AI client:

- *"Why is my api container unhealthy?"*
- *"Which container is using the most memory?"*
- *"Why can't container A reach container B?"*
- *"Has anything drifted from my docker-compose.yml?"*
- *"Summarize the errors in the worker container's logs"*

## Development

```bash
git clone https://github.com/markalovell-git/docker-kestrel
cd docker-kestrel
uv sync --dev
uv pip install -e .

# Run unit tests (no Docker daemon required)
uv run pytest tests/test_analysis.py -v

# Run integration tests (requires Docker)
uv run pytest tests/test_integration.py -v
```

## Requirements

- Python 3.11+
- Docker daemon running and accessible (via `/var/run/docker.sock`)

## License

MIT
