HUB
Sign inSign up
weekly-recap logo

visibilityspots/weekly-recap

By visibilityspots

•Updated 2 days ago

Weekly recap pages published by an AI agent over MCP

Buildkit cacheImage
0

390

visibilityspots/weekly-recap repository overview

⁠Weekly recap

trivy docker-hub-description build status gitHub release docker image size docker pulls license

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.

⁠run

$ 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.

⁠Safety
  • Untrusted text. A model writes the recap, often from logs and task text. Markdown is rendered without raw HTML and without images (a remote image would be a beacon from the reader's 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.
  • Sign-in phrases. Some agent runners treat a sign-in prompt (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.
  • No auth on the pages. Put the service behind an IP allowlist or an auth proxy.
  • Only /mcp needs the bearer token. The server keeps only SHA-256 hashes of the tokens.

⁠Configuration

variabledefaultmeaning
MCP_TOKEN_SHA256requiredcomma-separated <client>=<sha256 hex of token>
MCP_ALLOWED_HOSTSemptypublic host names for /mcp; other hosts get 421 (DNS rebinding protection); * turns it off
RECAP_PUBLIC_URLhttp://localhost:8080/base URL in the tool's answer
RECAP_TITLEweekly recapsite title
RECAP_DATA_DIR/datawhere the .md files live
RECAP_MAX_BYTES204800maximum size of one report
RECAP_KEEP_REVISIONS5earlier versions kept per week as <week>.<epoch>.md
PORT8080listen port

Endpoints: / (weeks), /w/<week>, /mcp, /healthz (503 when /data is not writable), /metrics (weekly_recap_reports, weekly_recap_last_publish_timestamp_seconds).

⁠build

$ docker build -t visibilityspots/weekly-recap:latest .
⁠buildx
$ docker buildx build --platform linux/amd64,linux/arm64 -t visibilityspots/weekly-recap:latest .
⁠dgoss
$ dgoss run -e MCP_TOKEN_SHA256=goss=4c5dc9b7708905f77f5e5d16316b5dfb425e68cb326dcd55a860e90a7707031e \
    -e MCP_ALLOWED_HOSTS=recap.example.com visibilityspots/weekly-recap:latest
⁠act
$ act -j main

⁠License

Distributed under the MIT license

Tag summary
Recent tags
Content type
Image
Digest
sha256:5dbca05f8…
Size
38.4 MB
Last updated
2 days ago
docker pull visibilityspots/weekly-recap:latest