# Use the official Python image with uv pre-installed
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS uv
# Set working directory
WORKDIR /app
# Copy necessary files for installation
COPY pyproject.toml uv.lock README.md /app/
# Install the project's dependencies using uv
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-install-project --no-dev --no-editable
# Copy the project source code
COPY src/ /app/src/
# Install the project itself
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-dev --no-editable
# Final stage
FROM python:3.12-slim-bookworm
WORKDIR /app
# COPY --from=uv /root/.local /root/.local
COPY --from=uv --chown=app:app /app/.venv /app/.venv
# Set PATH and PYTHONPATH
ENV PATH="/app/.venv/bin:$PATH" \
KAGI_API_KEY=YOUR_API_KEY_HERE
# Command to run the server
ENTRYPOINT ["/app/.venv/bin/kagi-mcp"]
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/apridachin/kagi-search-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server