From 0df7d7b87b0a25ae4e9a0fb552af6cdabe3224b6 Mon Sep 17 00:00:00 2001 From: William's Hermes Agent <7+hermes@noreply@gitea.williammiceli.systems> Date: Thu, 10 Sep 2026 02:38:00 +0000 Subject: [PATCH] Add Dockerfile --- Dockerfile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9a4d2e3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +# 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"]