Skip to main content
Glama

Riksarkivet MCP Server

Dockerfile1.74 kB
# Multi-stage Python 3.12+ build for RA-MCP server FROM python:3.12-slim as builder # Install uv for fast dependency management COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/ # Set working directory WORKDIR /app # Copy dependency files first for better layer caching COPY pyproject.toml uv.lock ./ # Create virtual environment and install dependencies RUN uv sync --frozen --no-cache # Copy source code COPY src/ ./src/ COPY README.md LICENSE ./ # Install the package RUN uv pip install -e . # Production stage FROM python:3.12-slim as production # Create non-root user for security RUN groupadd --gid 1000 ra-mcp && \ useradd --uid 1000 --gid ra-mcp --shell /bin/bash --create-home ra-mcp # Install runtime dependencies only RUN apt-get update && \ apt-get install -y --no-install-recommends \ ca-certificates \ && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /app # Copy virtual environment from builder stage COPY --from=builder /app/.venv /app/.venv # Copy installed package and source COPY --from=builder /app/src /app/src COPY --from=builder /app/README.md /app/LICENSE ./ # Create directory for potential data/cache RUN mkdir -p /app/data && chown -R ra-mcp:ra-mcp /app # Switch to non-root user USER ra-mcp # Add virtual environment to PATH ENV PATH="/app/.venv/bin:$PATH" # Health check for MCP server HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ CMD python -c "import src.ra_mcp.server; print('Server module loads successfully')" || exit 1 # Default to running the MCP server with HTTP transport EXPOSE 8000 CMD ["python", "src/ra_mcp/server.py", "--http", "--host", "0.0.0.0", "--port", "8000"]

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/AI-Riksarkivet/ra-mcp'

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