ClaudePost
A seamless email management interface powered by Claude.
ClaudePost
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.
Features & Demo
Email Search and Reading
<p align="center"> <img src="assets/gif1.gif" width="800"/> </p>- š§ Search emails by date range and keywords
- š View daily email statistics
- š Read full email content with threading support
Email Composition and Sending
<p align="center"> <img src="assets/gif2.gif" width="800"/> </p>- āļø Send emails with CC recipients support
- š Secure email handling with TLS
Prerequisites
- Python 3.12 or higher
- A Gmail account (or other email provider)
- If using Gmail:
- Two-factor authentication enabled
- App-specific password generated
- Claude Desktop application
Setup
-
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
.envfile 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.jsonAdd 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/usernameand/path/to/claude-postwith your actual paths.After updating the configuration, restart Claude Desktop for the changes to take effect.
Running the Server
The server runs automatically through Claude Desktop:
- The server will start when Claude launches if configured correctly
- No manual server management needed
- Server stops when Claude is closed
Usage Through Claude
You can interact with your emails using natural language commands. Here are some examples:
Search Emails
- "Show me emails from last week"
- "Find emails with subject containing 'meeting'"
- "Search for emails from [email protected] between 2024-01-01 and 2024-01-07"
- "Search sent emails from last month"
Read Email Content
- "Show me the content of email #12345"
- "What's the full message of the last email from HR?"
Email Statistics
- "How many emails did I receive today?"
- "Show me daily email counts for the past week"
Send Emails
- "I want to send an email to [email protected]"
- "Send a meeting confirmation to [email protected]"
Note: For security reasons, Claude will always show you the email details for confirmation before actually sending.
Project Structure
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
Security Notes
- Use app-specific passwords instead of your main account password
- For Gmail users:
- Enable 2-Step Verification in your Google Account
- Generate an App Password for this application
- Use the App Password in your
.envfile
Logging
The application logs detailed information to email_client.log. Check this file for debugging information and error messages.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Related Servers
Activitysmith
This MCP server exposes ActivitySmith notifications and live activity tools.
mcp-gmail
MCP server for full Gmail operations via Unipile API. 9 tools: send, reply, list, read, delete, search, labels, attachments, drafts. Dry-run by default, 55 unit tests. MIT licensed.
Telnet MCP Server
A secure telnet client for LLM applications, designed for defensive security analysis of network devices.
nworks
NAVER WORKS CLI + MCP server. 26 tools for messages, calendar, drive, mail, tasks, and boards.
MCP Feedback Collector
A server for collecting user feedback and AI work reports.
Hacker News
Fetch and interact with Hacker News content, including top stories, comments, and search functionality.
VoiceVox
A server for text-to-speech (TTS) using the VoiceVox engine.
MCP ChatGPT Proxy
A production-ready MCP server for ChatGPT and o3-pro, featuring caching, cost tracking, and rate limiting.
Gmail MCP server
A super simple and tiny MCP server for gmail in python
CData Google Contacts
A read-only MCP server for Google Contacts, powered by the CData JDBC Driver.