# Use an official Python runtime as a parent image
FROM python:3.12-slim

# Install notmuch CLI (required by the MCP server)
RUN apt-get update && apt-get install -y \
    notmuch \
    && rm -rf /var/lib/apt/lists/*

# Install the MCP server from PyPI
# Using --pre in case the latest version is a pre-release
RUN pip install --no-cache-dir mcp-server-notmuch --pre

# Run the MCP server over stdio
ENTRYPOINT ["mcp-server-notmuch"]
