Skip to main content
Glama

PubMed MCP Server

by chrismannina
Dockerfile1.17 kB
# Use Python 3.11 slim image as base FROM python:3.11-slim # Set environment variables ENV PYTHONUNBUFFERED=1 \ PYTHONDONTWRITEBYTECODE=1 \ PIP_NO_CACHE_DIR=1 \ PIP_DISABLE_PIP_VERSION_CHECK=1 # Set work directory WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y \ gcc \ libxml2-dev \ libxslt-dev \ && rm -rf /var/lib/apt/lists/* # Copy requirements and install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy source code COPY src/ ./src/ COPY setup.py . COPY README.md . # Install the package RUN pip install -e . # Create non-root user RUN useradd --create-home --shell /bin/bash app && chown -R app:app /app USER app # Expose port (though MCP uses stdio, this is for potential HTTP interface) EXPOSE 8000 # Set environment variables for MCP ENV LOG_LEVEL=info \ CACHE_TTL=300 \ CACHE_MAX_SIZE=1000 \ RATE_LIMIT=3.0 # Health check HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \ CMD python -c "import src.main; print('Health check passed')" || exit 1 # Default command CMD ["python", "-m", "src.main"]

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/chrismannina/pubmed-mcp'

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