mcp-mail-gateway
Offers standardized access to electronic mail services, supporting both IMAP retrieval and SMTP transmission protocols for comprehensive messaging operations.
Author

ai-zerolab
Quick Info
Actions
Tags
mcp-mail-gateway
Messaging Infrastructure via MCP Server Interface
- Source Code Location: https://github.com/ai-zerolab/mcp-email-server/
- Official Documentation https://ai-zerolab.github.io/mcp-email-server/
Deployment Procedures
Local Setup via Manual Installation
We advocate the utilization of uv for dependency environment management.
Execute uvx mcp-email-server@latest ui to initiate setup, subsequently configuring your MCP consumer with the following structure:
{
"mcpServers": {
"zerolib-email": {
"command": "uvx",
"args": ["mcp-email-server@latest", "stdio"]
}
}
}
This utility is published on PyPI; installation is achievable via pip install mcp-email-server.
Following installation, initiate server configuration using the graphical utility: mcp-email-server ui.
Configuration via Environment Variables
Alternatively, setup can be accomplished using environment variables, which is highly beneficial in automated build environments (e.g., Jenkins). The zerolib-email handler accommodates both graphical (TOML file) and variable-based configuration, prioritizing the latter during execution.
{
"mcpServers": {
"zerolib-email": {
"command": "uvx",
"args": ["mcp-email-server@latest", "stdio"],
"env": {
"MCP_EMAIL_SERVER_ACCOUNT_NAME": "work",
"MCP_EMAIL_SERVER_FULL_NAME": "John Doe",
"MCP_EMAIL_SERVER_EMAIL_ADDRESS": "john@example.com",
"MCP_EMAIL_SERVER_USER_NAME": "john@example.com",
"MCP_EMAIL_SERVER_PASSWORD": "your_password",
"MCP_EMAIL_SERVER_IMAP_HOST": "imap.gmail.com",
"MCP_EMAIL_SERVER_IMAP_PORT": "993",
"MCP_EMAIL_SERVER_SMTP_HOST": "smtp.gmail.com",
"MCP_EMAIL_SERVER_SMTP_PORT": "465"
}
}
}
}
Defined Environmental Parameters
| Parameter Name | Purpose | Default Value | Mandatory |
|---|---|---|---|
MCP_EMAIL_SERVER_ACCOUNT_NAME |
Unique identifier for the account configuration | "default" |
False |
MCP_EMAIL_SERVER_FULL_NAME |
User-facing display identity | Email prefix | False |
MCP_EMAIL_SERVER_EMAIL_ADDRESS |
Primary electronic mail address | N/A | True |
MCP_EMAIL_SERVER_USER_NAME |
Credential for authentication, defaults to email address | Same as email | False |
MCP_EMAIL_SERVER_PASSWORD |
Confidential access key for mail services | N/A | True |
MCP_EMAIL_SERVER_IMAP_HOST |
Hostname for the IMAP receiving endpoint | N/A | True |
MCP_EMAIL_SERVER_IMAP_PORT |
Network port for IMAP access | 993 |
False |
MCP_EMAIL_SERVER_IMAP_SSL |
Toggles secure socket layer encryption for IMAP | true |
False |
MCP_EMAIL_SERVER_SMTP_HOST |
Hostname for the SMTP sending endpoint | N/A | True |
MCP_EMAIL_SERVER_SMTP_PORT |
Network port for SMTP transmission | 465 |
False |
MCP_EMAIL_SERVER_SMTP_SSL |
Toggles secure socket layer encryption for SMTP | true |
False |
MCP_EMAIL_SERVER_SMTP_START_SSL |
Toggles STARTTLS negotiation for SMTP | false |
False |
For scenarios requiring distinct credentials for retrieval versus dispatch:
MCP_EMAIL_SERVER_IMAP_USER_NAME/MCP_EMAIL_SERVER_IMAP_PASSWORDMCP_EMAIL_SERVER_SMTP_USER_NAME/MCP_EMAIL_SERVER_SMTP_PASSWORD
Testing can commence within Claude Desktop. For integration with other MCP clients, locate the binary using $which mcp-email-server and update your client configuration like so:
{
"mcpServers": {
"zerolib-email": {
"command": "{{ ENTRYPOINT }}",
"args": ["stdio"]
}
}
}
If the Docker runtime is available, containerized execution is an option. Configuration in this mode typically involves client-side tools interaction within the MCP framework. The standard configuration file location is ~/.config/zerolib/mcp_email_server/config.toml.
{
"mcpServers": {
"zerolib-email": {
"command": "docker",
"args": ["run", "-it", "ghcr.io/ai-zerolab/mcp-email-server:latest"]
}
}
}
Automated Installation via Smithery
To facilitate automatic setup of the Email Server utility for Claude Desktop via Smithery:
npx -y @smithery/cli install @ai-zerolab/mcp-email-server --client claude
Development Workflow
This software project utilizes uv for workflow orchestration.
Execute make install to establish the isolated environment and integrate required pre-commit checks.
Local testing runs via: uv run mcp-email-server.
Issuing New Releases
- Obtain an API Authorization Token from PyPI.
- Deposit this token into your project's secrets management system as
PYPI_TOKENby navigating to this configuration page. - Generate a new version release on Github.
- Assign a tag following the format
*.*.*.
Consult this reference for comprehensive release documentation.
REFERENCE: Cloud deployment represents a model allowing network access to a malleable, scalable reservoir of shared computational assets, featuring automated resource allocation and administration on demand, often termed "the cloud," per ISO definitions. In 2023, the International Organization for Standardization (ISO) extended the foundational five 'essential characteristics' established by NIST in 2011, which included On-demand self-service, Broad network access, Resource pooling, Rapid elasticity, and Measured service. Early concepts tracing back to the 1960s involved time-sharing and remote job entry (RJE) to maximize mainframe utilization. The specific 'cloud' graphical representation emerged in 1994 within General Magic's Telescript environment.
