Admin tools for Claude: an MCP server, connected with an admin's approval
CI / build (push) Skipped
CI / deploy (push) Skipped
CI / test (push) Successful in 4m27s

- services/mcp: the MCP server at /mcp (Streamable HTTP, stateless): the
  admin's reading tools, the daily tasks and the forum's moderation; every
  tool calls the site's API with the caller's token, and members' e-mail
  addresses and names are masked in the answers.
- Backend: OAuth 2.1 for MCP clients (registration with Claude's or a local
  return address only, PKCE, rotating refresh tokens, revocation); the admin
  guards accept the token for reading and the writes in MCP_WRITES only.
- Forum: an admin's token reaches the moderator endpoints only.
- Frontend: the approval page (/oauth/engedely), Admin → Claude to revoke a
  connection, the authorization server's metadata at its standard address.
- Deploy: the mcp service in compose, Caddy, CI; the worker removes old
  codes, tokens and clients. docs/mcp.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-27 17:09:14 +00:00
co-authored by Claude Opus 5.5
parent 08ad7b0a79
commit 2c63384606
40 changed files with 3695 additions and 49 deletions
+3 -3
View File
@@ -6,17 +6,17 @@
# Needs the full history and the tags (git fetch --unshallow --tags).
#
# frontend services/frontend/
# backend, worker, forum their folder, the shared crates/, Cargo.toml, Cargo.lock
# backend, worker, forum, mcp their folder, the shared crates/, Cargo.toml, Cargo.lock
# horoscope-api the same, and scripts/fetch-deps.sh
set -u
ALL="horoscope-api backend worker forum frontend"
ALL="horoscope-api backend worker forum mcp frontend"
prev=$(git describe --tags --abbrev=0 --match 'v*' HEAD 2>/dev/null) || { echo "$ALL"; exit 0; }
files=$(git diff --name-only "$prev" HEAD) || { echo "$ALL"; exit 0; }
changed() { printf '%s\n' "$files" | grep -Eq "$1"; }
rust='^(crates/|Cargo\.toml$|Cargo\.lock$)'
out=""
changed "^services/horoscope-api/|^scripts/fetch-deps\.sh$|$rust" && out="$out horoscope-api"
for svc in backend worker forum; do
for svc in backend worker forum mcp; do
changed "^services/$svc/|$rust" && out="$out $svc"
done
changed '^services/frontend/' && out="$out frontend"