Commit Graph

6 Commits

Author SHA1 Message Date
root bced937a24 mail: PDF-Anhaenge als extrahierten Text zurueckgeben
read_attachment extrahiert PDF-Text serverseitig via pdfplumber und liefert
ihn als TextContent (statt EmbeddedResource-Blob, den claude.ai nicht lesen
kann). Bei Scan-/Bild-PDFs ohne Text: Hinweis + Blob-Fallback.
Loest 'Connector kann PDF nicht lesen' bei Buchungsbestaetigungen etc.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 09:39:01 +02:00
root 56d92c153b mail: robustes Decoding gegen unbekannte Charsets (x-unknown); OAuth-Token 30 Tage
- _safe_decode() faengt LookupError bei unbekannten/kaputten Mail-Charsets
  (z.B. 'x-unknown') ab, Fallback utf-8 -> latin-1. Verhindert Crash der
  Mail-Suche/Read bei einzelnen kaputt-kodierten Mails.
- common.py: OAuth access_token Lifetime 24h -> 30 Tage (weniger Re-Auth in claude.ai)
- .gitignore: *.before-* Backups ausschliessen

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 09:37:15 +02:00
Stefan Lohmaier c06e6d6b4c Joplin via Data API + Mail attachments
Notes server rewritten to use Joplin CLI Data API (joplin-cli sync
clients on host, ports 41184/41185). Clean fast search, proper
resource handling. New tools: list_note_resources, read_resource
(attachments as inline image/document/text).

Mail server: read_mail now lists attachments; new read_attachment
tool returns images inline, PDFs/docs as EmbeddedResource, text directly.

Tests: 54 total. Notes now real (notebooks, list, create+read).
Mail attachment listing + fetch tested.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-12 12:26:26 +02:00
Stefan Lohmaier ef37d1e467 Fix Mail Maildir paths and oCIS auth
Mail: INBOX is a subfolder (INBOX/cur), not the account root.
Removed special-case mapping that pointed INBOX to root dir.

Files: oCIS user may differ from MCP user (e.g. stefan -> admin).
Added _ocis_user() mapping for WebDAV paths and auth.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-12 10:22:27 +02:00
Stefan Lohmaier 1f98695821 Add create_draft tool to Mail server
Creates email drafts via IMAP APPEND to the Drafts folder.
Supports Stefan (1blu, Drafts folder) and Kati (Gmail, Entwürfe).
Draft can be reviewed and sent from Roundcube or phone.

IMAP credentials externalized to config.json.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-12 08:16:53 +02:00
Stefan Lohmaier fb642e47c8 Initial commit: 5 MCP servers for Mail, Calendar, Contacts, Files, Notes
Self-hosted MCP servers with OAuth client_credentials auth.
Each server connects to a different backend:
- Mail: reads Maildir IMAP backups
- Calendar/Tasks: CalDAV against Radicale
- Contacts: CardDAV against Radicale
- Files: WebDAV against oCIS
- Notes: Joplin REST API

Credentials externalized to config.json (not in repo).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-12 06:22:42 +02:00