Email Reader MCP
Enables reading and searching Gmail messages via IMAP, with filters for limit, date range, unread status, sender, subject, and optional full-content retrieval.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Email Reader MCP
A Model Context Protocol (MCP) server that enables Claude Desktop or any Client to read and search your Gmail messages via IMAP. Perfect for AI-powered email workflows, automation, and intelligent email management.
š Quick Start
1. Prerequisites
Node.js (v18 or higher)
Gmail account with IMAP enabled
App Password (if using 2-factor authentication)
2. Gmail Setup
Enable IMAP in Gmail:
Go to Gmail Settings ā See all settings ā Forwarding and POP/IMAP
Enable "IMAP access"
Save changes
Create App Password (if using 2FA):
Visit Google App Passwords
Select "Mail" for the app and "Other (Custom name)" for the device
Name it "Claude Desktop MCP"
Copy the generated password
3. MCP Server Configuration
Add this to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"email-reader": {
"command": "npx",
"args": ["-y", "@automatearmy/email-reader-mcp"]
}
}
}4. Environment Setup
Create a .env file in your home directory or project folder:
# Copy the example file
cp .env.example .env
# Edit with your credentials
USER_EMAIL="your-email@gmail.com"
USER_PASS="your-app-specific-password"5. Restart Claude Desktop
Restart Claude Desktop to load the new MCP server. You can now ask Claude to read your emails!
Related MCP server: gmail-mcp-imap
š§ Available Tools
get-messages
Fetch and filter email messages from your Gmail inbox with powerful search capabilities.
Parameters
Parameter | Type | Default | Description |
| number | 10 | Maximum number of messages to fetch |
| boolean | false | Include full email body (default: 500-char preview) |
| string | - | Filter messages from this date (ISO format: "2024-01-01") |
| string | - | Filter messages until this date (ISO format) |
| boolean | false | Only fetch unread messages |
| string | - | Filter by sender email address |
| string | - | Filter by subject (partial match) |
Response Format
{
"messages": [
{
"uid": 12345,
"subject": "Email Subject",
"from": "sender@example.com",
"to": "recipient@example.com",
"date": "2024-01-15T10:30:00.000Z",
"body": "Email content...",
"flags": ["\\Seen"]
}
],
"count": 1,
"filters": {
"limit": 10,
"includeFullContent": false,
"unreadOnly": false
}
}š” Usage Examples
Basic Email Reading
"Show me my latest 5 emails"Unread Messages Only
"Get all unread messages from today"Advanced Filtering
"Find emails from notifications@github.com about 'pull request' in the last week"Full Content Search
"Show me the complete content of the 3 most recent emails from my boss"Date Range Queries
"Get all emails from December 2024 with 'invoice' in the subject"š Security Best Practices
Never commit
.envfiles to version controlUse App Passwords instead of your main Gmail password
Limit access to only necessary email folders
Regularly rotate your app passwords
Monitor access in your Google account security settings
ā” Performance Tips
Use date ranges to reduce processing time
Set reasonable limits (default: 10 messages)
Use preview mode (
includeFullContent: false) for initial searchesApply specific filters (sender, subject) to narrow results
š ļø Troubleshooting
Common Issues
"Authentication failed"
Verify IMAP is enabled in Gmail settings
Check that you're using an App Password (not regular password)
Ensure email and password are correctly set.
"No messages found"
Check your search criteria aren't too restrictive
Verify the date format is correct (ISO string)
Try without filters first to test connectivity
"Connection timeout"
Check your internet connection
Verify Gmail IMAP servers are accessible
Try restarting Claude Desktop
šļø Development
Building from Source
# Clone the repository
git clone https://github.com/automatearmy/email-reader-mcp.git
cd email-reader-mcp
# Install dependencies
npm install
# Build the project
npm run buildProject Structure
src/
āāā index.ts # MCP server entry point
āāā imap/
ā āāā index.ts # IMAP client configuration
āāā tools/
āāā get-messages/
āāā schema.ts # Zod validation schema
āāā index.ts # Tool handler implementationš License
ISC License - see LICENSE file for details.
š¤ Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
š Support
For issues and questions:
Create an issue on GitHub
Check the troubleshooting section above
Review the MCP documentation
Built by Automate Army - Empowering AI workflows with robust integrations.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect any IMAP/SMTP mailbox to Claude & ChatGPT: search, read, sort, draft. Sends only with OK.
Your mailboxes in ChatGPT and Claude: Gmail, iCloud, Fastmail, any IMAP. Passwords stay yours.
Connect Gmail, iCloud Mail, Outlook, Yahoo Mail, Fastmail and other IMAP inboxes to ChatGPT, Claude and compatible AI assistants. Find emails by meaning across languages with semantic search. Ask AI to find customer conversations, summarize deadlines and draft follow-ups. Give a sales rep access to a shared outreach inbox or bring email into a compatible CRM. Share an iCloud custom-domain inbox with teammates without their own Apple ID or iCloud+ plan. Search results may be incomplete or stale; separate permissions control mail actions.
Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
Related MCP Servers
- FlicenseAqualityCmaintenanceEnables Claude to read, search, send, and manage Gmail messages and threads through natural language.13-
- AlicenseBqualityDmaintenanceEnables email management through IMAP/SMTP, including reading, sending, replying, starring, deleting, labeling emails, handling attachments, and filtering by Gmail smart categories. Works with MCP-compatible clients like Claude Desktop and Claude Code using App Password authentication.1950 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude Code and Claude Desktop to search, read, and manage multiple named Gmail inboxes from a self-hosted MCP server, keeping each account's results separate and authenticated through user-owned OAuth tokens.MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to access an IMAP mailbox to read, search, organize, and manage messages, create drafts, and optionally send email via SMTP across providers.MIT