Skip to main content
Glama

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-emailsC

Count emails received for each day in a date range

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

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 what the tool does (count emails per day) but doesn't describe important behavioral aspects: whether it requires authentication, how it handles large date ranges, what format the results are returned in, or any rate limits. For a tool with zero annotation coverage, this leaves significant gaps in understanding its operational characteristics.

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 communicates the core functionality without unnecessary words. It's appropriately sized for a simple counting tool and front-loads the essential information. Every word earns its place.

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 should provide more complete context for this tool. While it states what the tool does, it doesn't explain what the output looks like (e.g., returns a list of day-count pairs), doesn't mention authentication requirements, and doesn't provide error handling guidance. For a tool with no structured behavioral metadata, the description is insufficiently complete.

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 both parameters clearly documented in the input schema. The description mentions 'date range' which aligns with the two date parameters, but adds no additional semantic context beyond what's already in the schema (like date format requirements or inclusive/exclusive range behavior). This meets the baseline expectation when schema coverage is complete.

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 as 'Count emails received for each day in a date range', which specifies the verb (count), resource (emails), and scope (per day in date range). It distinguishes from sibling tools like 'get-email-content' (retrieve content) and 'send-email' (send operation), but doesn't explicitly differentiate from 'search-emails' which might also involve date filtering.

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 'get-email-content'. It doesn't mention prerequisites, exclusions, or specific contexts where this counting operation is preferred over other email-related tools.

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 action 'Get', implying a read operation, but doesn't mention permissions, rate limits, error handling, or what 'full content' includes (e.g., attachments, headers). This leaves significant gaps for a tool with no structured safety hints.

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 with no wasted words. It's front-loaded with the core action and resource, making it highly efficient and easy to parse, which is ideal for conciseness.

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 complexity of retrieving email content, no annotations, and no output schema, the description is insufficient. It doesn't explain return values, error cases, or behavioral traits like authentication needs, making it incomplete for effective tool use in this context.

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 implying retrieval by ID, so it meets the baseline of 3 where the schema does the heavy lifting without extra value from the description.

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 verb 'Get' and the resource 'full content of a specific email', making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'search-emails' or 'count-daily-emails', which might also retrieve email content in different contexts, so it misses 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 'send-email'. It mentions retrieving by 'specific email ID', but doesn't clarify scenarios where this is preferred over searching or other methods, leaving usage ambiguous.

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
start_dateNoStart date in YYYY-MM-DD format (optional)
end_dateNoEnd date in YYYY-MM-DD format (optional)
keywordNoKeyword to search in email subject and body (optional)
folderNoFolder to search in ('inbox' or 'sent', defaults to 'inbox')

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 fails to describe key behaviors like whether it returns full email content or summaries, pagination handling, rate limits, or authentication requirements. This leaves significant gaps for a search 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 that directly states the tool's function without unnecessary words. It is front-loaded with the core purpose and appropriately sized, making it easy to understand 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. It does not explain what the tool returns (e.g., email summaries, IDs, or full content), how results are structured, or any limitations like search scope or performance considerations. For a search tool with multiple parameters, this leaves critical context gaps.

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 documents all parameters thoroughly. The description adds minimal value by implying date-range and keyword filtering but does not provide additional syntax, format details, or usage examples beyond what the schema specifies. 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 a specific verb ('search') and resource ('emails'), and specifies the search criteria ('within a date range and/or with specific keywords'). However, it does not explicitly differentiate from sibling tools like 'count-daily-emails' or 'get-email-content', which prevents a score of 5.

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 email details). It mentions search criteria but lacks explicit when/when-not instructions or prerequisites, such as whether it searches across all folders or requires authentication.

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
toYesList of recipient email addresses (confirmed)
subjectYesConfirmed email subject
contentYesConfirmed email content
ccNoList of CC recipient email addresses (optional, confirmed)

TDQS

A4/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 useful behavioral traits. However, it doesn't mention potential side effects (e.g., email delivery, rate limits, authentication needs), leaving gaps for a mutation tool.

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

Conciseness4/5

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

The description is appropriately sized with three sentences that each serve a purpose: confirmation step, usage guidance, and parameter requirements. It's front-loaded with the most important information (confirmation requirement). Could be slightly more concise by combining sentences.

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?

For a mutation tool with no annotations and no output schema, the description provides good usage guidance but lacks information about behavioral aspects like error conditions, delivery confirmation, or response format. The confirmation requirement is well-documented, but other important context is missing.

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 documents all parameters thoroughly. The description adds minimal value by listing required vs. optional fields, but doesn't provide additional semantic context beyond what's in the schema descriptions (e.g., format of email addresses, content constraints).

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 confirmation step, which adds important context about its purpose.

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: 'Actually send the email after user confirms the details. Before calling this, first show the email details to the user for confirmation.' This clearly distinguishes it from alternatives by emphasizing the confirmation requirement, though it doesn't explicitly name sibling tools as alternatives.

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

TDQS

A3.6/5.0
Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness4/5

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.

Maintenance

ActivityInactive
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
    Enables 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.
    8
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Enables Claude to interact with email accounts via IMAP and SMTP, providing tools for searching, reading, sending, and managing emails across multiple providers.
    40
    604
    90
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables 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
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables Claude to read, search, send, and manage Gmail messages and threads through natural language.
    205
    MIT

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/meyannis/mcpemail'

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