The MCP Email Server is a tool that enables email communication through IMAP and SMTP protocols via the Model Context Protocol (MCP) interface. It allows AI assistants and tools to access and manage email through standard protocols, making it useful for automation and integration with AI services.
The recommended installation method is using the uv
package manager:
uvx mcp-email-server@latest ui
For your MCP client configuration, add the following JSON:
{
"mcpServers": {
"zerolib-email": {
"command": "uvx",
"args": ["mcp-email-server@latest", "stdio"]
}
}
}
You can also install the package using pip:
pip install mcp-email-server
After installation, configure your email server using:
mcp-email-server ui
To automatically install the Email Server for Claude Desktop via Smithery:
npx -y @smithery/cli install @ai-zerolab/mcp-email-server --client claude
The simplest way to configure the server is through the UI:
mcp-email-server ui
This will create a configuration file at ~/.config/zerolib/mcp_email_server/config.toml
.
You can also configure the email server using environment variables, which is especially useful for CI/CD environments:
{
"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": "[email protected]",
"MCP_EMAIL_SERVER_USER_NAME": "[email protected]",
"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"
}
}
}
}
Variable | Description | Default | Required |
---|---|---|---|
MCP_EMAIL_SERVER_ACCOUNT_NAME |
Account identifier | "default" |
No |
MCP_EMAIL_SERVER_FULL_NAME |
Display name | Email prefix | No |
MCP_EMAIL_SERVER_EMAIL_ADDRESS |
Email address | - | Yes |
MCP_EMAIL_SERVER_USER_NAME |
Login username | Same as email | No |
MCP_EMAIL_SERVER_PASSWORD |
Email password | - | Yes |
MCP_EMAIL_SERVER_IMAP_HOST |
IMAP server host | - | Yes |
MCP_EMAIL_SERVER_IMAP_PORT |
IMAP server port | 993 |
No |
MCP_EMAIL_SERVER_IMAP_SSL |
Enable IMAP SSL | true |
No |
MCP_EMAIL_SERVER_SMTP_HOST |
SMTP server host | - | Yes |
MCP_EMAIL_SERVER_SMTP_PORT |
SMTP server port | 465 |
No |
MCP_EMAIL_SERVER_SMTP_SSL |
Enable SMTP SSL | true |
No |
MCP_EMAIL_SERVER_SMTP_START_SSL |
Enable STARTTLS | false |
No |
For separate IMAP/SMTP credentials, you can also use:
MCP_EMAIL_SERVER_IMAP_USER_NAME
/ MCP_EMAIL_SERVER_IMAP_PASSWORD
MCP_EMAIL_SERVER_SMTP_USER_NAME
/ MCP_EMAIL_SERVER_SMTP_PASSWORD
After installation and configuration, you can use the email server with Claude Desktop (Claude.ai).
If you need to integrate with other MCP clients, find the path to the server:
which mcp-email-server
Then configure it in your client:
{
"mcpServers": {
"zerolib-email": {
"command": "{{ ENTRYPOINT }}",
"args": ["stdio"]
}
}
}
If Docker is available, you can use the Docker image:
{
"mcpServers": {
"zerolib-email": {
"command": "docker",
"args": ["run", "-it", "ghcr.io/ai-zerolab/mcp-email-server:latest"]
}
}
}
The default config path when using Docker is ~/.config/zerolib/mcp_email_server/config.toml
.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "zerolib-email" '{"command":"uvx","args":["mcp-email-server@latest","stdio"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"zerolib-email": {
"command": "uvx",
"args": [
"mcp-email-server@latest",
"stdio"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"zerolib-email": {
"command": "uvx",
"args": [
"mcp-email-server@latest",
"stdio"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect