Weekly recap pages published by an AI agent over MCP
390
a tiny web page per week, written by an AI agent over MCP.
The agent gets one tool, publish_report(week, markdown), which stores the Markdown recap
of an ISO week (2026-W49). The web side lists every week and renders it as a dark,
terminal-style page. The agent's only power is "replace the text of a week": it needs no
key for anything else, and the server needs no key for the agent's systems.
It is a single Python file on top of the MCP Python SDK and markdown-it-py, running as a
non-root user, with the reports as plain .md files in /data.
$ TOKEN=$(openssl rand -hex 32)
$ docker run -d --name weekly-recap -p 8080:8080 -v recap:/data \
-e MCP_ALLOWED_HOSTS=recap.example.com \
-e RECAP_PUBLIC_URL=https://recap.example.com/ \
-e MCP_TOKEN_SHA256="agent=$(printf %s "$TOKEN" | sha256sum | cut -c1-64)" \
visibilityspots/weekly-recap:latest
Point the MCP client at https://recap.example.com/mcp with
Authorization: Bearer $TOKEN, and open https://recap.example.com/ in a browser.
javascript: links are dropped, links get rel="noopener noreferrer",
and every page carries Content-Security-Policy: default-src 'none'; style-src 'unsafe-inline', so no script or remote load runs.not[ ]logged[ ]in,
unauthori[sz]ed, ...) in any output line as a lost login. publish_report refuses text
that contains one and never echoes the text back. A refused token gets 403 forbidden,
never 401./mcp needs the bearer token. The server keeps only SHA-256 hashes of the tokens.| variable | default | meaning |
|---|---|---|
MCP_TOKEN_SHA256 | required | comma-separated <client>=<sha256 hex of token> |
MCP_ALLOWED_HOSTS | empty | public host names for /mcp; other hosts get 421 (DNS rebinding protection); * turns it off |
RECAP_PUBLIC_URL | http://localhost:8080/ | base URL in the tool's answer |
RECAP_TITLE | weekly recap | site title |
RECAP_DATA_DIR | /data | where the .md files live |
RECAP_MAX_BYTES | 204800 | maximum size of one report |
RECAP_KEEP_REVISIONS | 5 | earlier versions kept per week as <week>.<epoch>.md |
PORT | 8080 | listen port |
Endpoints: / (weeks), /w/<week>, /mcp, /healthz (503 when /data is not
writable), /metrics (weekly_recap_reports,
weekly_recap_last_publish_timestamp_seconds).
$ docker build -t visibilityspots/weekly-recap:latest .
$ docker buildx build --platform linux/amd64,linux/arm64 -t visibilityspots/weekly-recap:latest .
$ dgoss run -e MCP_TOKEN_SHA256=goss=4c5dc9b7708905f77f5e5d16316b5dfb425e68cb326dcd55a860e90a7707031e \
-e MCP_ALLOWED_HOSTS=recap.example.com visibilityspots/weekly-recap:latest
$ act -j main
Distributed under the MIT license
docker pull visibilityspots/weekly-recap:latest