Zilong Xue/claude-post
Built by Metorial, the integration platform for agentic AI.
Zilong Xue/claude-post
Server Summary
Search emails by date range and keywords
View daily email statistics
Read full email content with threading support
Send emails with CC recipients support
Secure email handling with TLS
A Model Context Protocol (MCP) server that provides a seamless email management interface through Claude. This integration allows you to handle emails directly through natural language conversations with Claude, supporting features like searching, reading, and sending emails securely.
Install uv:
# MacOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Remember to restart your terminal after installation
Clone and set up the project:
# Clone the repository
git clone https://github.com/ZilongXue/claude-post.git
cd claude-post
# Create and activate virtual environment
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
uv pip install -e .
Create a .env
file in the project root:
[email protected]
EMAIL_PASSWORD=your-app-specific-password
IMAP_SERVER=imap.gmail.com
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
Configure Claude Desktop:
First, make sure you have Claude for Desktop installed. You can install the latest version here. If you already have Claude for Desktop, make sure it's updated to the latest version.
Open your Claude Desktop configuration file:
# MacOS
~/Library/Application Support/Claude/claude_desktop_config.json
# Create the file if it doesn't exist
mkdir -p ~/Library/Application\ Support/Claude
touch ~/Library/Application\ Support/Claude/claude_desktop_config.json
Add the following configuration:
{
"mcpServers": {
"email": {
"command": "/Users/username/.local/bin/uv",
"args": [
"--directory",
"/path/to/claude-post/src/email_client",
"run",
"email-client"
]
}
}
}
Replace /Users/username
and /path/to/claude-post
with your actual paths.
After updating the configuration, restart Claude Desktop for the changes to take effect.
The server runs automatically through Claude Desktop:
You can interact with your emails using natural language commands. Here are some examples:
Note: For security reasons, Claude will always show you the email details for confirmation before actually sending.
claude-post/
āāā pyproject.toml
āāā README.md
āāā LICENSE
āāā .env # Not included in repo
āāā .python-version # Python version specification
āāā src/
āāā email_client/
āāā __init__.py
āāā __main__.py
āāā server.py # Main implementation
.env
fileThe application logs detailed information to email_client.log
. Check this file for debugging information and error messages.
This project is licensed under the MIT License - see the LICENSE file for details.