28 lines
1.4 KiB
Docker
28 lines
1.4 KiB
Docker
# Paperless-ngx MCP server image
|
|
#
|
|
# Wraps the freeformz/paperless-ngx-mcp Go binary (stdio transport) with
|
|
# mcp-proxy 0.9.0, which exposes it as a streamable-HTTP MCP endpoint on
|
|
# :3000. This exact version combination was verified end-to-end before
|
|
# being pinned here: initialize + tools/list over POST /mcp/ returned all
|
|
# 116 tools. Newer mcp-proxy releases (0.11/0.12) resolve incompatible
|
|
# `mcp` SDK versions and fail at import time — bump only via the Gitea
|
|
# Actions workflow, which resolves the upstream release version itself.
|
|
ARG PAPERLESS_VERSION=0.3.2
|
|
|
|
FROM python:3.13-slim
|
|
ARG PAPERLESS_VERSION
|
|
|
|
RUN pip install --no-cache-dir mcp-proxy==0.9.0
|
|
|
|
ADD https://github.com/freeformz/paperless-ngx-mcp/releases/download/v${PAPERLESS_VERSION}/paperless-ngx-mcp_${PAPERLESS_VERSION}_linux_amd64.tar.gz /tmp/
|
|
RUN tar -xzf /tmp/paperless-ngx-mcp_${PAPERLESS_VERSION}_linux_amd64.tar.gz -C /usr/local/bin paperless-ngx-mcp \
|
|
&& rm -f /tmp/paperless-ngx-mcp_*.tar.gz \
|
|
&& chmod +x /usr/local/bin/paperless-ngx-mcp
|
|
|
|
# --pass-environment forwards PAPERLESS_URL / PAPERLESS_TOKEN (deploy-time
|
|
# env from the Infisical-synced secret) into the stdio child process.
|
|
# NOTE: this mcp-proxy version serves the MCP endpoint at /mcp/ (trailing
|
|
# slash) and a /status health endpoint.
|
|
EXPOSE 3000
|
|
CMD ["mcp-proxy", "--host", "0.0.0.0", "--port", "3000", "--pass-environment", "--", "/usr/local/bin/paperless-ngx-mcp", "mcp"]
|