ClaudePost
Provides email management capabilities including searching emails by date range and keywords, reading full email content with threading support, sending emails with CC recipients, and viewing daily email statistics.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ClaudePost show me emails from yesterday"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
š§ Search emails by date range and keywords
š View daily email statistics
š Read full email content with threading support
Email Composition and Sending
āļø Send emails with CC recipients support
š Secure email handling with TLS
Related MCP server: IMAP MCP Server
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 installationClone 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_ADDRESS=your.email@gmail.com EMAIL_PASSWORD=your-app-specific-password IMAP_SERVER=imap.gmail.com SMTP_SERVER=smtp.gmail.com SMTP_PORT=587Configure 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 recruiting@linkedin.com 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 john@example.com"
"Send a meeting confirmation to team@company.com"
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 implementationSecurity 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.
Available Tools
4 toolscount-daily-emailsB
Count emails received for each day in a date range
Inputs: start_date (required), end_date (required).
get-email-contentB
Get the full content of a specific email by its ID
Inputs: email_id (required).
search-emailsC
Search emails within a date range and/or with specific keywords
Inputs: start_date, end_date, keyword, folder.
send-emailA
CONFIRMATION STEP: Actually send the email after user confirms the details. Before calling this, first show the email details to the user for confirmation. Required fields: recipients (to), subject, and content. Optional: CC recipients.
Inputs: to (required), subject (required), content (required), cc.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: count-daily-emails is for analytics, get-email-content retrieves specific emails, search-emails finds emails based on criteria, and send-email handles email sending with a confirmation step. There is no overlap in functionality, making it easy for an agent to select the right tool.
All tool names follow a consistent verb-noun pattern with hyphens (e.g., count-daily-emails, get-email-content, search-emails, send-email). This predictable naming scheme enhances readability and reduces confusion for agents.
With 4 tools, the server is well-scoped for email management, covering key operations like counting, retrieving, searching, and sending emails. Each tool earns its place without feeling too sparse or bloated for the domain.
The tool set provides strong coverage for core email workflows, including read operations (count, get, search) and send functionality. A minor gap exists in update or delete operations for emails, but agents can still handle most common tasks effectively.
Related MCP Connectors
Connect any IMAP/SMTP mailbox to Claude & ChatGPT: search, read, sort, draft. Sends only with OK.
Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
Connect Rackspace Email and other IMAP mailboxes to Claude or ChatGPT: search, read, draft, send.
Your mailboxes in ChatGPT and Claude: Gmail, iCloud, Fastmail, any IMAP. Passwords stay yours.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI-powered inbox management with natural language commands through Claude Desktop. Supports sending, reading, searching, organizing emails, and managing labels using Gmail API with automatic authentication.8MIT
- AlicenseAqualityAmaintenanceEnables Claude to interact with email accounts via IMAP and SMTP, providing tools for searching, reading, sending, and managing emails across multiple providers.40819 npm140MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to read, search, send, label, and trash emails in any Gmail account via Google's Gmail API, using OAuth2 authentication with automatic token refresh.67 npmMIT
- FlicenseAqualityCmaintenanceEnables Claude to read, search, send, and manage Gmail messages and threads through natural language.13-