# Container image for hosting the MedData MCP server over streamable-HTTP
# (used by Smithery's container runtime; see smithery.yaml).
FROM python:3.12-slim

WORKDIR /app

# Install the package plus the HTTP extra (uvicorn). Copy only what the build
# needs first so the dependency layer caches well.
COPY pyproject.toml README.md LICENSE ./
COPY meddata_mcp ./meddata_mcp
RUN pip install --no-cache-dir ".[http]"

# Smithery sets PORT (8081); default to 8080 for local runs.
ENV PORT=8080
EXPOSE 8080

CMD ["meddata-mcp", "--http"]
