FROM python:3.12-slim

# System dependencies
RUN apt-get update && apt-get install -y \
    git \
    curl \
    nodejs \
    npm \
    && rm -rf /var/lib/apt/lists/*
RUN npm install -g @modelcontextprotocol/inspector@2.8.0
WORKDIR /app

COPY requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt

COPY . .

ENV KNOWLEDGE_ROOT=/knowledge

CMD ["python", "server.py"]