# Use Python 3.11 slim image
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install system dependencies including PostgreSQL client tools
RUN apt-get update && apt-get install -y \
postgresql-client \
libpq-dev \
gcc \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY src/ /app/src/
# Create non-root user for security
RUN useradd -m -u 1000 mcpuser && \
chown -R mcpuser:mcpuser /app
# Switch to non-root user
USER mcpuser
# Set Python path
ENV PYTHONPATH=/app
# Expose port for HTTP/SSE transport
EXPOSE 3000
# Set entrypoint to run the HTTP MCP server
ENTRYPOINT ["python", "-m", "src.postgresql_mcp_server.server_http"]
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/compilotbv/mcpg'
If you have feedback or need assistance with the MCP directory API, please join our Discord server