cpanel-mail-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_HOST | No | Host to bind for HTTP server (e.g. 127.0.0.1). | |
| MCP_PORT | No | Port to bind for HTTP server (e.g. 8080). | |
| CPANEL_HOST | No | Your IMAP/SMTP server (used in Docker credentials mode; CPANEL_IMAP_HOST/CPANEL_SMTP_HOST to split). | |
| CPANEL_PASS | No | Your password (legacy single-account). | |
| CPANEL_USER | No | Your email address (legacy single-account). | |
| MCP_API_KEY | No | Extra shared secret, sent as X-API-Key. | |
| CF_ACCESS_AUD | No | Cloudflare Access audience tag / SaaS app Client ID. | |
| MCP_AUTH_MODE | No | Set to credentials for Docker/n8n credentials mode. | |
| MCP_TRANSPORT | No | Transport mode, e.g. streamable-http (default stdio). | |
| EMAIL_ENV_FILE | No | Absolute path to a .env file to load (default .env in current directory). | |
| MCP_AUTH_TOKEN | No | Bearer token for single-tenant HTTP mode. | |
| CPANEL_IMAP_HOST | No | IMAP host (legacy single-account). | |
| CPANEL_IMAP_PORT | No | IMAP port (default 993). | |
| CPANEL_SMTP_HOST | No | SMTP host (legacy single-account). | |
| CPANEL_SMTP_PORT | No | SMTP port (default 465). | |
| EMAIL_USERS_FILE | No | Path to users file for multi-user mode. | |
| MCP_RESOURCE_URL | No | Public URL of this server. | |
| CPANEL_SENT_FOLDER | No | Sent folder (default Sent). | |
| MCP_ATTACHMENT_DIR | No | Directory allowed for file path attachments in HTTP mode. | |
| CPANEL_TRASH_FOLDER | No | Trash folder (auto-detect by default). | |
| EMAIL_ACCOUNTS_FILE | No | Path to a JSON file with the same shape as EMAIL_ACCOUNTS_JSON. | |
| EMAIL_ACCOUNTS_JSON | No | JSON array of account objects for multi-account configuration. | |
| MCP_OAUTH_CLIENT_ID | No | SaaS app Client ID. | |
| CPANEL_DRAFTS_FOLDER | No | Drafts folder (default Drafts). | |
| MCP_DEFAULT_TIMEZONE | No | Default IANA timezone for naive invite times (default UTC). | |
| CF_ACCESS_OIDC_ISSUER | No | Cloudflare Access OIDC issuer URL. | |
| MCP_MAX_ATTACHMENT_MB | No | Maximum total attachment size in MB (default 25). | |
| MCP_OAUTH_CLIENT_SECRET | No | SaaS app Client Secret. | |
| MCP_ALLOWED_EMAIL_DOMAINS | No | Comma list of address domains allowed to log in. | |
| MCP_OAUTH_UPSTREAM_ISSUER | No | Same as CF_ACCESS_OIDC_ISSUER (enables DCR proxy). | |
| MCP_RATE_LIMIT_READ_PER_MIN | No | Read bucket rate limit per minute (default 300). | |
| MCP_RATE_LIMIT_SEND_PER_MIN | No | Send bucket rate limit per minute (default 30). | |
| EMAIL_SEND_CONFIRMATION_CODE | No | Shared secret required for send/send_invite calls. | |
| MCP_CREDENTIAL_CACHE_SECONDS | No | How long a verified login is cached (default 600). |
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 |
|---|---|
| list_accountsA | List email accounts this caller can act on (no secrets returned). In multi-user OAuth mode, only the caller's own account is returned; in single-tenant mode, all configured accounts appear. |
| list_foldersA | List every IMAP folder (mailbox) the account can see, UTF-7 decoded. |
| list_recentA | List the most recent messages in a folder (metadata only, newest first). Use |
| search_emailsA | IMAP SEARCH over one field. Wraps Note: IMAP SEARCH is substring, case-insensitive on most servers, and doesn't support boolean operators. For richer queries, chain calls. |
| read_emailA | Fetch full headers + body of a message. Attachments listed by name+mime. Set |
| download_attachmentsA | Return message attachments as base64. Filter by filenames to save bytes. |
| get_threadB | Group messages sharing Message-ID / References / In-Reply-To headers. |
| send_emailA | Send an email. Supports HTML, attachments, and Save-to-Sent. On retries after a client timeout, pass the same |
| reply_emailA | Reply to a message. Preserves Message-ID linking + Subject
|
| forward_emailA | Forward a message. Subject gets |
| save_draftB | Save an unsent draft in the account's Drafts folder. |
| send_inviteB | Send a calendar invite (RFC 5545 ICS, METHOD:REQUEST). |
| mark_readC | Add the \Seen flag. |
| mark_unreadC | Remove the \Seen flag. |
| star_emailB | Add the \Flagged (starred) flag. |
| unstar_emailC | Remove the \Flagged flag. |
| move_emailB | Move a message between folders (RFC 6851 MOVE with COPY+EXPUNGE fallback). |
| copy_emailB | Copy a message to another folder without removing the original. |
| delete_emailA | Delete a message. Soft-delete by default (moves to Trash). |
| create_folderA | Create a new IMAP folder and subscribe to it. |
| delete_folderA | Delete an empty IMAP folder. Fails if not empty (per RFC). |
| rename_folderC | Rename an IMAP folder. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 22 tools
Each tool targets a distinct action or resource. For example, star_email and unstar_email are opposites, and folder operations (create, delete, rename) are clearly separated. No overlapping purposes.
Most tools follow a verb_noun pattern (e.g., send_email, create_folder). However, list_recent deviates slightly (verb_adjective), but it's still intuitive and the overall pattern is consistent.
22 tools cover essential email operations without being excessive. Each tool has a clear purpose, and the number is well-scoped for a mail server.
The tool set covers email lifecycle: send, receive, search, organize folders, mark flags, and manage drafts. Missing features like spam handling are non-essential; core operations are complete.