# Use an official Python runtime as a parent image
# python:3.11-slim is a good choice for a lightweight base
FROM python:3.11-slim
# Set the working directory in the container to /app
WORKDIR /app
# Copy the requirements file into the container at /app
COPY requirements.txt .
# Install any needed packages specified in requirements.txt
# --no-cache-dir ensures that pip does not store the downloaded packages,
# which helps to keep the image size down.
RUN pip install --no-cache-dir -r requirements.txt
# Copy the server code into the container at /app
COPY server.py .
# Expose port 8000 for HTTP/SSE communication
EXPOSE 8000
# Define the command to run the MCP server with SSE transport
# This will be executed when the container starts
CMD ["python", "server.py", "--transport", "sse", "--host", "0.0.0.0", "--port", "8000"]