No description
  • Python 99.1%
  • Dockerfile 0.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Xaver Emmerling 47a73212d0
All checks were successful
Build image / image (push) Successful in 1m34s
ci: log in with REGISTRY_TOKEN only
The job token cannot push packages (reqPackageAccess).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 01:02:16 -07:00
.forgejo/workflows ci: log in with REGISTRY_TOKEN only 2026-09-26 01:02:16 -07:00
mail_mcp Basic mail MCP server behind Authentik SSO 2026-09-26 00:37:04 -07:00
.dockerignore Basic mail MCP server behind Authentik SSO 2026-09-26 00:37:04 -07:00
.gitignore Basic mail MCP server behind Authentik SSO 2026-09-26 00:37:04 -07:00
Dockerfile Basic mail MCP server behind Authentik SSO 2026-09-26 00:37:04 -07:00
pyproject.toml Basic mail MCP server behind Authentik SSO 2026-09-26 00:37:04 -07:00
README.md Basic mail MCP server behind Authentik SSO 2026-09-26 00:37:04 -07:00

mail-mcp

A basic remote MCP server for tilo.so mailboxes (hosted by Purelymail), behind Authentik SSO.

  • Endpoint: https://mail-mcp.podesta.ai/mcp (streamable HTTP, OAuth 2.1 with dynamic client registration)
  • Login: Authentik OIDC. On first login the user enters their mailbox address and password. They are checked against smtp.purelymail.com:465 and stored Fernet-encrypted in SQLite ($DATA_DIR).
  • Tools: whoami, send_email, list_folders, list_emails, read_email, disconnect_mailbox

Sending uses SMTP and files a copy in the Sent folder. Reading uses IMAP (imap.purelymail.com:993), with the same login.

Configuration

Env Default
PUBLIC_URL required e.g. https://mail-mcp.podesta.ai
OIDC_ISSUER required https://auth.tilo.so/application/o/mail-mcp/
OIDC_CLIENT_ID / OIDC_CLIENT_SECRET required Authentik provider credentials
ENCRYPTION_KEY required Fernet key; rotating it invalidates stored logins
DATA_DIR /data SQLite location
ALLOWED_DOMAINS tilo.so comma-separated; empty allows any
SMTP_HOST/SMTP_PORT, IMAP_HOST/IMAP_PORT Purelymail, 465 / 993

Local run

pip install -e .
PUBLIC_URL=http://localhost:8000 OIDC_ISSUER=... OIDC_CLIENT_ID=... OIDC_CLIENT_SECRET=... \
  ENCRYPTION_KEY=$(python -c 'from cryptography.fernet import Fernet;print(Fernet.generate_key().decode())') \
  DATA_DIR=./data mail-mcp

Deployment lives in the infra repo (apps/mail-mcp, clusters/prod/apps/mail-mcp); see the README there. CI (.forgejo/workflows/image.yml) pushes code.podesta.ai/tilo/mail-mcp:<sha> on main.