# =============================================================================
# Jina Web Search MCP Server - Docker Configuration
# =============================================================================
# This Dockerfile creates a containerized MCP (Model Context Protocol) server
# that provides web search and URL content fetching capabilities using Jina AI.
#
# Build: docker build -t jina-mcp-server .
# Run: docker-compose up -d
# =============================================================================
# Use Python 3.11 slim image for optimal size and security
# Slim variant excludes unnecessary packages while maintaining compatibility
FROM python:3.11-slim
# Set working directory inside the container
# All subsequent commands will run from this directory
WORKDIR /app
# Copy requirements first to leverage Docker's layer caching
# This allows rebuilds to skip dependency installation if requirements haven't changed
COPY requirements.txt .
# Install Python dependencies
# --no-cache-dir reduces image size by not storing pip cache
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code after dependencies to optimize rebuild times
# Changes to server.py won't trigger dependency reinstallation
COPY server.py .
# Expose the port that the MCP server runs on
# This documents which port the application uses (required for docker-compose)
EXPOSE 5003
# Set environment variables for optimal Python execution in containers
ENV PYTHONUNBUFFERED=1
# PYTHONUNBUFFERED=1 ensures Python output is sent directly to terminal
# This is crucial for proper logging in Docker containers
# Note: JINA_API_KEY is intentionally not set here
# It will be provided by docker-compose.yml with fallback handling:
# ${JINA_API_KEY:-your_jina_api_key_here}
# Run the server
# Using exec form (list) for better signal handling and process management
CMD ["python", "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/hypersniper05/JinaWebSearchMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server