ClaudePost

ClaudePost

A Model Context Protocol server that provides a seamless email management interface through Claude, allowing users to search, read, and send emails directly through natural language conversations.

Category
Visit Server

README

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:
  • Claude Desktop application

Setup

  1. Install uv:

    # MacOS/Linux
    curl -LsSf https://astral.sh/uv/install.sh | sh
    
    # Remember to restart your terminal after installation
    
  2. 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 .
    
  3. Create a .env file 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=587
    
  4. 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.

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 implementation

Security Notes

  • Use app-specific passwords instead of your main account password
  • For Gmail users:
    1. Enable 2-Step Verification in your Google Account
    2. Generate an App Password for this application
    3. Use the App Password in your .env file

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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured