Skip to main content
Glama
uth-mail-mcp

uth-mail-mcp

by fotispetrou

uth-mail-mcp

MCP server για το email του Πανεπιστημίου Θεσσαλίας (αυτό που βλέπεις στο webmail.uth.gr). Συνδέεται με τον λογαριασμό σου και δίνει σε ένα πρόγραμμα AI (Claude Desktop, Claude Code, Cursor κ.ά.) πρόσβαση στα:

  • φάκελοι, με πόσα μηνύματα και πόσα αδιάβαστα έχει ο καθένας

  • αναζήτηση μηνυμάτων με αποστολέα, θέμα, κείμενο, ημερομηνίες ή μόνο τα αδιάβαστα

  • ανάγνωση μηνυμάτων, και των HTML

  • κατέβασμα συνημμένων

  • σήμανση ως αναγνωσμένο ή με σημαία, μετακίνηση σε φάκελο ή στον κάδο

  • πρόχειρα, και απαντήσεις με το αρχικό μήνυμα από κάτω

  • αποστολή προχείρου

Τίποτα δεν φεύγει χωρίς να το δεις: η αποστολή είναι δύο βήματα, πρώτα πρόχειρο (το βλέπεις και στο webmail) και μετά αποστολή αυτού του προχείρου. Οριστική διαγραφή δεν υπάρχει, τα μηνύματα πάνε μόνο στον κάδο (αν δεν έχεις φάκελο κάδου, τον φτιάχνει).

Μιλάει απευθείας με τους servers αλληλογραφίας (IMAP και SMTP), όχι με τη σελίδα του webmail.

Εγκατάσταση

Χρειάζεται Python 3.10 ή νεότερο και το uv.

git clone https://github.com/fotispetrou/uth-mail-mcp
cd uth-mail-mcp
uv sync

Related MCP server: renater-partage-mcp

Στοιχεία σύνδεσης

Αποθήκευσε μία φορά το όνομα χρήστη και τον κωδικό σου στον κωδικοφύλακα του συστήματος (στα Windows είναι το Credential Manager). Είναι τα ίδια με του eClass. Το όνομα χρήστη είναι χωρίς το @uth.gr: στο webmail μπαίνεις και με αυτό, αλλά οι servers αλληλογραφίας το θέλουν σκέτο (αν το γράψεις, το κόβει).

uv run uth-mail-mcp login

Σε ρωτάει και ένα όνομα για το «Από» των μηνυμάτων σου, αν θέλεις. Εναλλακτικά βάλε τα στις μεταβλητές περιβάλλοντος UTHMAIL_USERNAME, UTHMAIL_PASSWORD και UTHMAIL_NAME. Ο κωδικός δεν φεύγει από τον υπολογιστή σου, πηγαίνει μόνο στους servers του πανεπιστημίου.

Δοκίμασε ότι όλα δουλεύουν (δεν στέλνει τίποτα):

uv run uth-mail-mcp check

Άλλο τμήμα

Κάθε τμήμα έχει δικό του server για τα γραμματοκιβώτια, mail.<τμήμα>.uth.gr, και εκεί είναι και οι διευθύνσεις φοιτητών @uth.gr. Το κεντρικό mail.uth.gr δέχεται τον κωδικό αλλά δεν έχει το γραμματοκιβώτιο. Η προεπιλογή είναι του Τμήματος Ψηφιακών Συστημάτων (mail.ds.uth.gr). Για άλλο τμήμα βάλε τον δικό σου στη μεταβλητή UTHMAIL_IMAP_HOST, π.χ. mail.ece.uth.gr. Η αποστολή γίνεται για όλους από το smtp.uth.gr.

Αν η διεύθυνσή σου δεν είναι όνομαχρήστη@uth.gr, βάλε τη σωστή στη UTHMAIL_ADDRESS. Τα συνημμένα αποθηκεύονται στο ~/Downloads/uth-mail, ή όπου ορίσεις με τη UTHMAIL_DOWNLOAD_DIR.

Σύνδεση με Claude Desktop ή Cursor

Στο αρχείο ρυθμίσεων (claude_desktop_config.json ή mcp.json) πρόσθεσε:

{
  "mcpServers": {
    "uth-mail": {
      "command": "uv",
      "args": ["--directory", "C:/path/to/uth-mail-mcp", "run", "uth-mail-mcp"]
    }
  }
}

Βάλε τη διαδρομή όπου έκανες το clone. Αν δεν χρησιμοποίησες τον κωδικοφύλακα, πρόσθεσε και "env": {"UTHMAIL_USERNAME": "...", "UTHMAIL_PASSWORD": "..."}.

Για Claude Code:

claude mcp add uth-mail -- uv --directory C:/path/to/uth-mail-mcp run uth-mail-mcp

Μετά ρωτάς απλά: «έχω αδιάβαστα από καθηγητές;», «βρες το email με το πρόγραμμα της εξεταστικής και κατέβασε το συνημμένο», «γράψε μια απάντηση ότι θα έρθω στο εργαστήριο την Πέμπτη».

Εργαλεία

εργαλείο

τι κάνει

list_folders

οι φάκελοι, με μηνύματα και αδιάβαστα

search_messages

αναζήτηση, τα νεότερα πρώτα

get_message

ένα μήνυμα ολόκληρο, με τη λίστα συνημμένων

download_attachment

αποθήκευση συνημμένου

mark_messages

αναγνωσμένο/αδιάβαστο, σημαία

move_messages

μετακίνηση σε άλλο φάκελο ή στον κάδο

create_draft

νέο μήνυμα ή απάντηση, ως πρόχειρο

send_draft

αποστολή ενός προχείρου

whoami

έλεγχος ότι η σύνδεση δουλεύει, και ο χώρος του γραμματοκιβωτίου

Άδεια

MIT

Available Tools

9 tools
create_draftA

Write a message and save it in Drafts. Nothing is sent.

To reply, give reply_to_uid (and reply_folder if the original is not in the inbox): recipient, 'Re:' subject, threading headers and the quoted original are filled in, and reply_all adds the other recipients as Cc. attachments are paths of local files. Returns the draft's uid for send_draft; the user can also open and edit the draft in webmail.

Inputs: body (required), cc, to, bcc, +5 more.

download_attachmentA

Save one attachment of a message; index is its number in get_message. Saves under ~/Downloads/uth-mail/ unless a destination directory is given, and returns the local file path.

Inputs: uid (required), index (required), folder, destination.

get_messageB
Read-only

A whole message: headers, the text (HTML mail converted to plain text) and its attachments. Reading it does not mark it as read.

Inputs: uid (required), folder.

list_foldersA
Read-only

All mail folders with their message and unread counts. role marks the inbox, sent, drafts, trash, junk and archive folders.

Inputs: no named parameters. Returns: result

mark_messagesB
Idempotent

Mark messages as read or unread (read) and/or flagged or not (flagged).

Inputs: uids (required), read, folder, flagged.

move_messagesA
Idempotent

Move messages to another folder. Moving to trash is how to delete them; they can be moved back from there.

Inputs: uids (required), to_folder (required), folder.

search_messagesA
Read-only

Find messages, newest first; with no filters, the latest ones.

query searches whole messages (headers and text) on the server. sender, to and subject match those headers, and to also covers Cc; Greek text there is matched without regard to case or accents, over the newest 3000 candidates. since and before are arrival dates (YYYY-MM-DD), before exclusive. Each result has uid, date, from, to, subject, read/flag state and whether it has attachments; use get_message for the text.

Inputs: to, limit, query, since, +6 more. Returns: result

send_draftA
Destructive

Send a draft from the Drafts folder and file a copy in Sent. This really sends email: call it only after showing the user that draft (recipients, subject and text) and getting a clear yes for it.

Inputs: uid (required).

whoamiA
Read-only

Check that the login works and see which account, servers and mailbox quota are in use.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool maps to a distinct resource/action: listing folders, searching, fetching a message, downloading an attachment, toggling flags, moving, drafting, sending, and identity check. The only near-pair, create_draft vs send_draft, is explicitly separated by 'nothing is sent' versus the strong 'this really sends email' warning. Reply behavior is folded into create_draft rather than a competing tool, avoiding overlap.

    Naming Consistency4/5

    Eight of nine tools follow a clean verb_noun snake_case pattern (list_folders, search_messages, get_message, download_attachment, mark_messages, move_messages, create_draft, send_draft). whoami is the single deviation, though it is a well-understood convention rather than an inconsistency in style.

    Tool Count5/5

    Nine tools is well within the ideal 3-15 range and every tool earns its place: no redundant variants, no thin wrappers. The surface is scoped tightly to one mailbox workflow without padding.

    Completeness4/5

    Core lifecycle is covered: discover folders, search, read, fetch attachments, flag, move/delete via trash, compose drafts (including reply/reply-all), and send. Minor gaps remain, such as forwarding a message, permanently emptying trash, and folder management, but agents can work around these within the stated purpose.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      B
      quality
      D
      maintenance
      Enables AI assistants to securely access METU Webmail via IMAP/SMTP to list, search, read, send, reply, flag, and organize emails.
      12
      -
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to read, search, download attachments from, send, move, flag, and delete messages and folders in academic mailboxes over IMAP and SMTP, with support for multiple configured accounts. Every write action is gated by a two-step user-confirmation token, and a read-only mode can expose just the reading tools.
      1
      -
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to securely manage multiple email accounts via IMAP and SMTP, including searching, reading, sending, replying, forwarding, organizing folders, marking, and bulk deleting messages.
      931 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Gives AI assistants OAuth-based access to mailboxes on any JMAP server, requiring only an email address and a sign-in on the mail server's own page. Enables searching, reading, threading, organizing, drafting, sending, and managing vacation replies and Sieve filters across one or more accounts.
      1
      Apache 2.0