mcp-email-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| IMAP_HOST | Yes | IMAP server hostname, e.g. imap.qq.com | |
| SMTP_HOST | Yes | SMTP server hostname, e.g. smtp.qq.com | |
| EMAIL_FROM | Yes | From address used when sending emails | |
| IMAP_PASSWORD | Yes | IMAP password or app-specific authorization code | |
| IMAP_USERNAME | Yes | IMAP username / email account | |
| SMTP_PASSWORD | No | Optional SMTP password; if empty, IMAP_PASSWORD is reused | |
| SMTP_USERNAME | No | Optional SMTP username; if empty, IMAP_USERNAME is reused | |
| EMAIL_ALLOW_SEND | No | Set to true to allow sending emails | false |
| EMAIL_ALLOW_DELETE | No | Set to true to allow moving or deleting emails | false |
| EMAIL_ATTACHMENT_DIR | No | Directory where attachments can be read and written | ./attachments |
| EMAIL_MAX_BODY_CHARS | No | Maximum number of characters returned for a single email body | 20000 |
| EMAIL_SAVE_SENT_COPY | No | Set to true to append a copy to the Sent folder after sending | false |
| EMAIL_RECIPIENT_ALLOWLIST | No | Comma-separated allowlist of email addresses or domains for recipients |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| check_connectionA | Verify the IMAP and SMTP credentials and report which actions are permitted. Run this first when a tool fails or the account setup is unknown. Credentials are never included in the result. |
| list_foldersA | List the folders in the mailbox, with their IMAP special-use flags. |
| search_emailsA | Find messages, newest first, returning short summaries rather than full bodies. Every filter is combined with AND, and omitting all of them returns the most recent messages in the folder. Reading a message costs a separate read_email call, using the uid from these results. |
| read_emailA | Open one message and return its body, headers, and attachment list. Bodies are returned as plain text; HTML-only messages are converted, and long bodies are truncated with a marker rather than silently cut. |
| wait_for_new_emailsA | Block until mail arrives in the folder, then return the new messages. Use this to wait for something expected, such as a verification code. It returns as soon as anything arrives, or empty-handed when the timeout elapses; nothing already in the folder is reported. |
| download_attachmentA | Save an attachment into the server's attachment directory and return its path. Writes are confined to EMAIL_ATTACHMENT_DIR, and the sender's filename is sanitised before use. |
| mark_emailA | Mark a message read or unread, and flag or unflag it. |
| move_emailA | Move a message to another folder. Requires EMAIL_ALLOW_DELETE=true. |
| delete_emailA | Move a message to Trash. Requires EMAIL_ALLOW_DELETE=true. This is a move, not an expunge, so the user can still recover the message from their Trash folder. |
| send_emailA | Send an email. This is irreversible: confirm the content with the user first. Sending only works when EMAIL_ALLOW_SEND=true, and every recipient must pass the configured allowlist. Pass reply_to_uid to answer an existing message: the reply is threaded correctly and the recipient and subject are filled in from the original. |
| save_draftA | Write a message to the Drafts folder without sending it. This is the safe way to prepare mail: the user opens their own mail client, reviews it, and sends it themselves. It works even when EMAIL_ALLOW_SEND is false, because nothing leaves the account. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| draft_reply | Load a message and ask for a reply to be drafted, with the original quoted. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 11 tools
Each tool maps cleanly to a distinct action in the email workflow: read, search, wait, send, draft, mark, move, delete, download, list folders, and check connection. Even similar operations like move_email and delete_email are clearly separated by delete targeting Trash.
All tools use a consistent snake_case verb_noun pattern: read_email, list_folders, send_email, save_draft, etc. Multi-word verbs like wait_for_new_emails follow the same clear convention without mixing styles.
The 11 tools are well-scoped for an email server covering sending, receiving, searching, drafts, attachments, folders, and account health. Each tool has a clear purpose and none feel redundant.
Core email workflows are well covered: read, search, send, draft, move, delete, mark, and attachment download. Minor gaps exist, such as no explicit attachment support when sending and no folder creation or management, but these are not critical dead ends.