Skip to main content
Glama

MCP Memory Server

by hannesnortje
Dockerfile•1.82 kB
# Multi-stage Docker build for MCP Memory Server FROM python:3.12-slim as builder # Set environment variables ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ POETRY_NO_INTERACTION=1 \ POETRY_VENV_IN_PROJECT=1 \ POETRY_CACHE_DIR=/tmp/poetry_cache # Install system dependencies RUN apt-get update && apt-get install -y \ build-essential \ curl \ && rm -rf /var/lib/apt/lists/* # Install Poetry RUN pip install poetry # Set working directory WORKDIR /app # Copy dependency files COPY pyproject.toml poetry.lock ./ # Configure Poetry and install dependencies RUN poetry install --only=main && rm -rf $POETRY_CACHE_DIR # Production stage FROM python:3.12-slim as production # Set environment variables ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ PATH="/app/.venv/bin:$PATH" # Install runtime dependencies RUN apt-get update && apt-get install -y \ curl \ && rm -rf /var/lib/apt/lists/* # Create non-root user RUN useradd --create-home --shell /bin/bash mcp && \ mkdir -p /app /app/data /app/logs && \ chown -R mcp:mcp /app # Set working directory WORKDIR /app # Copy virtual environment from builder stage COPY --from=builder --chown=mcp:mcp /app/.venv /app/.venv # Copy application files COPY --chown=mcp:mcp src/ ./src/ COPY --chown=mcp:mcp memory_server.py ./ COPY --chown=mcp:mcp config.example.yaml ./config.yaml # Create directories for runtime RUN mkdir -p /app/data/qdrant /app/logs /app/policy && \ chown -R mcp:mcp /app # Switch to non-root user USER mcp # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ CMD python -c "import src.server_config; print('OK')" || exit 1 # Expose port (if needed for future HTTP endpoints) EXPOSE 8080 # Set default command CMD ["python", "memory_server.py"]

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/hannesnortje/MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server