mcpo Docker & Self-Hosted Deployment

GitHub

A simple, secure MCP-to-OpenAPI proxy server

4,405 stars Python Python 1 file ยท ~2,168 tokens #mcp#mcp-server#mcp-to-openapi#open-webui#openapi
1. Pull Image (DOCKERHUB) docker pull open-webui/mcpo:latest
2. Docker Run (1-Click Launch) docker run -d --name mcpo -p 8000:8000 --restart always open-webui/mcpo:latest
3. Podman Run podman run -d --name mcpo -p 8000:8000 --restart always open-webui/mcpo:latest
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/open-webui/mcpo:latest
5. ORAS Pull (OCI Artifact) oras pull open-webui/mcpo:latest
Dockerfile
FROM python:3.12-slim-bookworm

# Install uv (from official binary), nodejs, npm, and git
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

RUN apt-get update && apt-get install -y --no-install-recommends \
    git \
    curl \
    ca-certificates \
    && rm -rf /var/lib/apt/lists/*

# Install Node.js and npm via NodeSource 
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
    && apt-get install -y nodejs \
    && rm -rf /var/lib/apt/lists/*

# Confirm npm and node versions (optional debugging info)
RUN node -v && npm -v

# Copy your mcpo source code (assuming in src/mcpo)
COPY . /app
WORKDIR /app

# Create virtual environment explicitly in known location
ENV VIRTUAL_ENV=/app/.venv
RUN uv venv "$VIRTUAL_ENV"
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

# Install mcpo (assuming pyproject.toml is properly configured)
RUN uv pip install . && rm -rf ~/.cache

# Verify mcpo installed correctly
RUN which mcpo

# Expose port (optional but common default)
EXPOSE 8000

# Entrypoint set for easy container invocation
ENTRYPOINT ["mcpo"]

# Default help CMD (can override at runtime)
CMD ["--help"]