- 11 MCP tools: search, read, send, archive, move, mark emails + folder management - IMAP IDLE watcher with polling fallback, forwards new emails to Poke webhook - Bearer token auth (MCP_API_KEY) for securing the server - Multi-account support via config.yml - Docker + GitHub Actions CI/CD (lint, build, push to GHCR)
26 lines
600 B
Docker
26 lines
600 B
Docker
FROM python:3.13-slim AS base
|
|
|
|
# Prevent bytecode + enable unbuffered output
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1
|
|
|
|
WORKDIR /app
|
|
|
|
# Install deps in a separate layer for caching
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy source
|
|
COPY src/ src/
|
|
|
|
# Non-root user
|
|
RUN adduser --disabled-password --no-create-home appuser
|
|
USER appuser
|
|
|
|
EXPOSE 8000
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
|
CMD python -c "import httpx; httpx.get('http://localhost:8000/mcp', timeout=5)" || exit 1
|
|
|
|
CMD ["python", "src/server.py"]
|