Skip to main content
Glama
atesahmet0

metu-webmail-mcp

by atesahmet0

METU Webmail MCP Server ๐Ÿ“จ

A Model Context Protocol (MCP) server for Middle East Technical University (METU / ODTรœ) Webmail (https://webmail.metu.edu.tr).

Connect your AI assistants (Claude Desktop, Cursor, Antigravity, OpenCode, etc.) to your METU email account to list, search, read, send, reply to, flag, and organize emails securely using METU's official IMAP and SMTP servers.


โœจ Features

  • ๐Ÿ“ฅ Inbox & Folder Management: List all mailboxes (INBOX, Sent, Drafts, Trash, custom folders) and check unread message counts.

  • ๐Ÿ” Advanced Email Search: Filter messages by keyword query, sender, recipient, subject, date ranges (SINCE, BEFORE), and read/flagged status.

  • ๐Ÿ“– Clean Content Reading: Robust RFC2047 decoding for Turkish characters (UTF-8, ISO-8859-9, windows-1254), automatic HTML to clean Markdown conversion, and message threading metadata.

  • ๐Ÿ“Ž Attachment Support: Inspect attachment metadata and download/extract file attachments.

  • โœ‰๏ธ Send, Reply & Forward: Send new emails via SMTP (with automatic save to Sent), reply with automatic threading headers (In-Reply-To, References, Re: prefix), and forward messages.

  • ๐Ÿท๏ธ Flag & Organize: Mark emails as read/unread or starred/flagged, and move or delete messages.

  • ๐Ÿš€ Dual Transport: Supports standard MCP stdio mode and sse HTTP streaming mode.


Related MCP server: mcp-imap

๐Ÿ› ๏ธ Installation & Setup

Prerequisites

  • Python 3.11+

  • uv (recommended) or pip

1. Clone & Install Dependencies

cd /Users/ates/Documents/projects/metu-webmail-mcp
uv sync

2. Configure Credentials

Create a .env file in the project root:

METU_USERNAME=e123456@metu.edu.tr
METU_PASSWORD=your_metu_password

# Optional configurations (defaults shown)
METU_IMAP_SERVER=imap.metu.edu.tr
METU_IMAP_PORT=993
METU_SMTP_SERVER=smtp.metu.edu.tr
METU_SMTP_PORT=587

Note: Both METU_USERNAME / METU_PASSWORD and SAIS_USERNAME / SAIS_PASSWORD are automatically supported.


๐Ÿค– MCP Client Configuration

Claude Desktop / Antigravity / Cursor

Add the following to your MCP client configuration (claude_desktop_config.json or equivalent):

{
  "mcpServers": {
    "metu-webmail": {
      "command": "uv",
      "args": [
        "--directory",
        "/Users/ates/Documents/projects/metu-webmail-mcp",
        "run",
        "metu-webmail-mcp"
      ],
      "env": {
        "METU_USERNAME": "e123456@metu.edu.tr",
        "METU_PASSWORD": "your_password"
      }
    }
  }
}

๐Ÿงฐ Available Tools

Tool

Description

get_mailbox_status

Returns overall account summary, email address, all folder metrics, and total unread count.

list_folders

Lists all mailbox folders with total and unread email counts.

list_emails

Lists recent emails from a folder (e.g. INBOX, Sent) with pagination (limit, offset) and preview snippets.

search_emails

Searches emails by text query, sender, recipient, subject, date ranges, unread only, or flagged only.

read_email

Reads full email content, decoded headers, markdown/html body, attachments list, and optionally marks as read.

get_attachment

Downloads/extracts attachment base64 content by filename or index.

send_email

Sends an email via METU SMTP with optional HTML body, CC, BCC, and file attachments.

reply_email

Replies to an existing email with automatic message threading and quoting.

forward_email

Forwards an existing email with optional comments to new recipients.

mark_email

Updates flags (read/unread, flagged/starred).

move_email

Moves an email from one folder to another.

delete_email

Moves an email to Trash or permanently deletes it.


๐Ÿงช Testing

Run unit and integration tests:

uv run pytest -v

๐Ÿ“„ License

MIT License.

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

0Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    F
    maintenance
    Enables AI assistants to read, search, compose, and send emails by connecting to any IMAP/SMTP provider. It supports comprehensive mailbox management, including draft handling and message deletion, directly through natural language.
    10
    407
    10
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to interact with email accounts via IMAP and SMTP, supporting mailbox listing, email search, retrieval, sending, and management.
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Enables AI assistants to send, read, and manage emails via SMTP and IMAP, with support for attachments, threads, and mailbox organization.
    16
    42
    1
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI models to send, receive, search, and manage emails via SMTP/IMAP, including support for attachments, contacts, and advanced search.

View all related MCP servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/atesahmet0/metu-webmail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server