Skip to main content
Glama
ZilongXue

ClaudePost

by ZilongXue

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:

  • 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

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.

Available Tools

4 tools
count-daily-emailsB

Count emails received for each day in a date range

ParametersJSON Schema
NameRequiredDescriptionDefault
end_dateYesEnd date in YYYY-MM-DD format
start_dateYesStart date in YYYY-MM-DD format

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool counts emails per day in a date range, implying a read-only operation, but lacks details on permissions, rate limits, output format (e.g., structured data vs. raw count), or error handling. This leaves significant gaps for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It is front-loaded with the core purpose and appropriately sized for the tool's simplicity, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (2 parameters, no output schema, no annotations), the description is adequate but incomplete. It covers the basic purpose but lacks usage guidelines, behavioral details, and output information, which are needed for full contextual understanding despite the simple schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting both parameters (start_date and end_date) with format details. The description adds minimal value beyond the schema by implying date-range filtering but does not provide additional context like timezone handling or inclusive/exclusive bounds. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Count') and resource ('emails'), specifying the temporal scope ('for each day in a date range'). It distinguishes itself from siblings like 'get-email-content' (which retrieves content) and 'send-email' (which sends emails), but does not explicitly differentiate from 'search-emails' (which might also involve counting).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, exclusions, or compare it to sibling tools like 'search-emails', which might offer similar functionality with different scopes or outputs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get-email-contentC

Get the full content of a specific email by its ID

ParametersJSON Schema
NameRequiredDescriptionDefault
email_idYesThe ID of the email to retrieve

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves email content but doesn't mention any behavioral traits such as permission requirements, rate limits, error handling, or what 'full content' includes (e.g., attachments, headers). This leaves significant gaps for an agent to understand how to use it effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that directly states the tool's function without any unnecessary words. It's appropriately sized and front-loaded, making it efficient for an agent to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'full content' entails (e.g., text body, HTML, metadata) or provide any context about the return format, which is crucial for a retrieval tool. This leaves the agent with insufficient information to handle the tool's output effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the parameter 'email_id' fully documented in the schema. The description adds no additional meaning beyond what the schema provides (e.g., format examples or constraints), so it meets the baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('full content of a specific email'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'search-emails' which might also retrieve email content, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'search-emails' or 'count-daily-emails'. It mentions retrieving by ID but doesn't specify scenarios where this is preferred over other retrieval methods.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search-emailsC

Search emails within a date range and/or with specific keywords

ParametersJSON Schema
NameRequiredDescriptionDefault
end_dateNoEnd date in YYYY-MM-DD format (optional)
folderNoFolder to search in ('inbox' or 'sent', defaults to 'inbox')
keywordNoKeyword to search in email subject and body (optional)
start_dateNoStart date in YYYY-MM-DD format (optional)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions search functionality but lacks critical details: it doesn't specify whether this is a read-only operation, what permissions are required, how results are returned (e.g., pagination, format), or any rate limits. For a search tool with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('search emails') and succinctly lists the search criteria. There's no wasted verbiage or redundancy, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for a search tool. It doesn't explain what the tool returns (e.g., email summaries, IDs, full content), how results are structured, or any behavioral constraints. This leaves the agent with insufficient context to use the tool effectively beyond basic parameter input.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with all parameters well-documented in the input schema (e.g., date formats, folder options, keyword usage). The description adds minimal value beyond the schema by implying date-range and keyword filtering but doesn't provide additional syntax or format details. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('search emails') and resources ('emails'), and specifies search criteria ('within a date range and/or with specific keywords'). However, it doesn't explicitly differentiate from sibling tools like 'count-daily-emails' or 'get-email-content', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'count-daily-emails' (for counting) or 'get-email-content' (for retrieving specific content). There's no mention of prerequisites, exclusions, or comparative use cases, leaving the agent to infer usage from the purpose alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
ccNoList of CC recipient email addresses (optional, confirmed)
contentYesConfirmed email content
subjectYesConfirmed email subject
toYesList of recipient email addresses (confirmed)

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the confirmation requirement and required/optional fields, which are behavioral traits. However, it doesn't mention other important aspects like authentication needs, rate limits, error handling, or what happens after sending (e.g., success confirmation, delivery status). For a mutation tool with zero annotation coverage, this leaves significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded with the most critical information (confirmation step and required fields). Every sentence earns its place by providing essential workflow guidance and parameter information without redundancy or unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool with no annotations and no output schema, the description should do more. It covers the confirmation workflow and parameter basics adequately, but lacks information about what happens after sending (response format, success indicators, error conditions). For a tool that performs an irreversible action like sending emails, this represents a meaningful gap in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents all 4 parameters. The description adds minimal value by listing required fields (to, subject, content) and optional CC recipients, but doesn't provide additional semantic context beyond what's in the schema descriptions (e.g., format expectations, constraints). Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('send the email') and resource ('email'), distinguishing it from sibling tools like count-daily-emails, get-email-content, and search-emails which are read-only operations. It explicitly mentions the tool's role in the email workflow.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool: 'after user confirms the details' and 'Before calling this, first show the email details to the user for confirmation.' It clearly establishes a prerequisite workflow step, distinguishing it from alternatives that might send emails without confirmation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv1.0.0
    • First observedcount-daily-emails
    • First observedget-email-content
    • First observedsearch-emails
    • First observedsend-email

TDQS

A3.5/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: count-daily-emails aggregates email statistics, get-email-content retrieves a specific email's full content, search-emails finds emails based on criteria, and send-email handles email composition and sending. The descriptions clearly differentiate their functions, making misselection unlikely.

Naming Consistency4/5

The tool names follow a consistent verb-noun pattern with hyphens (e.g., count-daily-emails, get-email-content), which is readable and predictable. The minor deviation is that send-email uses a simpler noun form (email instead of email-content or similar), but this does not break the overall consistency significantly.

Tool Count5/5

With 4 tools, this server is well-scoped for email management, covering key operations: counting, retrieving, searching, and sending emails. Each tool earns its place by addressing a distinct aspect of the domain without being overly sparse or bloated.

Completeness4/5

The tool set provides good coverage for core email workflows, including read (count, get, search) and write (send) operations. A minor gap is the lack of update or delete tools for managing existing emails, but agents can work around this, and the surface is largely complete for the stated purpose.

Maintenance

ActivityNo data
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables AI assistants like Claude to interact with Gmail through natural language, providing comprehensive email management capabilities including sending, reading, organizing, searching, and managing drafts and labels.
    21
    GPL 3.0
  • A
    license
    Not graded
    quality
    F
    maintenance
    A Model Context Protocol server that enables AI assistants to access and manage email through IMAP, supporting browsing, searching, reading, and organizing emails while learning user preferences over time.
    59
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables Claude AI to interact with Gmail, supporting email sending, reading, searching, labeling, draft management, and batch operations through natural language commands.
    2
    MIT
  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    A Model Context Protocol server that enables Claude to interact with Gmail through a secure OAuth2 connection, providing email management capabilities like listing, sending, deleting, and organizing emails.
    -

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ZilongXue/claude-post'

If you have feedback or need assistance with the MCP directory API, please join our Discord server