email-server
A MCP Server + CLI Tool that perform email operations
Installation
npx @0xshariq/email-mcp-serverAsk AI about email-server
Powered by Claude Β· Grounded in docs
I know everything about email-server. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Email MCP Server
Cross-platform email operations for MCP clients and CLI π
A dual-purpose tool that works as:
- π MCP Server: Email capabilities for Claude Desktop and MCP clients
- β‘ CLI Suite: 40+ commands for terminal email management
Universal compatibility: Works on Windows, macOS, Linux, and WSL with Gmail, Outlook, Yahoo, and any IMAP/SMTP providers.
β¨ Features Overview
π§ Basic Operations: Send, read, get, delete emails | Mark read/unread
π Advanced Features: Search, forward, reply, bulk operations | Draft & schedule
π₯ Contact Management: Add, update, search, organize contacts by groups
π Cross-Platform: Works identically on all platforms and terminals
π Zero-Configuration Installation
π― One Command - Complete Setup:
npm install -g @0xshariq/email-mcp-server
# OR
pnpm install -g @0xshariq/email-mcp-server
β¨ What Happens Automatically:
- β Detects your platform (Windows/macOS/Linux/WSL)
- β Creates 40+ command shortcuts globally
- β Configures system PATH automatically
- β Tests installation and provides setup guide
- β Ready to use immediately - no manual steps!
π¬ Getting Started:
# Set up your email (one-time only):
email-setup
# Start sending emails:
email-send "user@example.com" "Hello" "Your message"
# Explore all commands:
email-cli --help
π Complete Installation Guide
βοΈ Configuration
π§ The MCP server and CLI share the same environment configuration!
Local Development (Both Server & CLI)
# Copy and edit .env file
cp .env.example .env
nano .env # Add your credentials
Global Installation (CLI)
Configure environment variables in your shell profile:
Linux: Add to ~/.bashrc
export EMAIL_USER="your-email@gmail.com"
export EMAIL_PASS="xxxx-xxxx-xxxx-xxxx"
export SMTP_HOST="smtp.gmail.com"
export SMTP_PORT="587"
export IMAP_HOST="imap.gmail.com"
export IMAP_PORT="993"
macOS: Add to ~/.zshrc (or ~/.bash_profile)
export EMAIL_USER="your-email@gmail.com"
export EMAIL_PASS="xxxx-xxxx-xxxx-xxxx"
# ... (same as Linux)
Windows: Set System Environment Variables
- Press
Win + Xβ System β Advanced system settings - Environment Variables β Add each variable
Quick Example (Gmail)
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=xxxx-xxxx-xxxx-xxxx # App Password (not regular password)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
IMAP_HOST=imap.gmail.com
IMAP_PORT=993
π Complete Configuration Guide - Detailed setup for all platforms and providers
Setup Requirements:
- Enable 2FA on your email provider
- Generate App Password
- Configure environment variables (locally or globally)
π Supports: Gmail, Outlook, Yahoo, and any IMAP/SMTP provider
π» Usage
As MCP Server
npm start # Starts MCP server for Claude Desktop
As CLI Tool (Cross-Platform)
# Works identically on Windows, macOS, Linux, WSL
email-send "user@example.com" "Subject" "Message"
email-read 10
contact-add "John Doe" "john@example.com" "work"
email-search --from "boss@company.com" --unread
All 40+ commands work the same across all platforms!
π Documentation
Complete documentation for all features and platforms:
π Core Documentation
| Document | Description |
|---|---|
| Configuration Guide | Comprehensive environment setup for CLI and MCP server (local and global) |
| Installation Guide | Cross-platform installation instructions (Windows, macOS, Linux, WSL) |
| CLI Reference | Complete reference for all 40+ CLI commands with examples |
| CLI Usage | Top-level CLI usage and setup commands |
| Commands Reference | Detailed command documentation with options and examples |
π§ Technical Documentation
| Document | Description |
|---|---|
| Architecture | System architecture, data models, and design decisions |
| Troubleshooting | Common issues and solutions for all platforms |
| Windows Guide | Windows-specific installation and configuration |
| Publishing Guide | Package publishing and versioning strategy |
| Restructure Summary | v2.0 TypeScript migration details |
π Quick Start Guides
First Time Setup:
- Installation: INSTALL.md
- Configuration: CONFIGURATION.md
- First Commands: CLI_REFERENCE.md
Having Issues?
- Start with troubleshooting.md
- Check CONFIGURATION.md for setup issues
- See WINDOWS.md for Windows-specific problems
Development & Contributing:
- architecture.md - Understand the codebase
- PUBLISHING.md - Release process
- RESTRUCTURE_SUMMARY.md - Recent changes
π― By Use Case
As CLI User:
- CLI_REFERENCE.md - All commands
- CONFIGURATION.md - Setup for global CLI
- troubleshooting.md - Fix issues
As MCP Server User:
- CONFIGURATION.md - Environment setup
- architecture.md - MCP server details
- troubleshooting.md - Server configuration
As Developer:
- architecture.md - System design
- RESTRUCTURE_SUMMARY.md - Code organization
- PUBLISHING.md - Release workflow
MCP Server Integration
When running as an MCP server, all email operations are available as structured tools for Claude Desktop and other MCP clients.
Available Tools:
- Email operations: send, read, search, forward, reply, delete
- Contact management: add, update, search, organize
- Bulk operations: batch sending, scheduling, drafts
Usage in Claude Desktop:
{
"to": "user@example.com",
"subject": "Hello",
"body": "Message from Claude!"
}
π Configuration: See CONFIGURATION.md
π Security & Best Practices
- Use App Passwords (not regular passwords)
- Keep
.envsecure (never commit to git) - Respect rate limits for bulk operations
- Use HTTPS/TLS for all connections
π οΈ Development & Contributing
Quick Development Setup:
git clone https://github.com/0xshariq/email-mcp-server.git
cd email-mcp-server
npm install # Install dependencies
npm run build # Compile TypeScript
npm link # Test locally
Project Structure:
email-mcp-server/
βββ cli/ # CLI implementation (Commander.js)
βββ server/ # MCP server implementation
βββ src/lib/ # Shared email & contact services
βββ dist/ # Compiled JavaScript
βββ docs/ # Complete documentation
Key Technologies:
- TypeScript 5.8+ with strict mode
- Commander.js 14+ for CLI
- Nodemailer 7+ for SMTP
- IMAP-Simple 5+ for IMAP
- MCP SDK 1.15+ for server
Documentation for Developers:
- Architecture Guide - System design and decisions
- Restructure Summary - v2.0 TypeScript migration
- Publishing Guide - Release process
Contributing: Fork β Branch β PR. See Contributing Guidelines
π Support & Resources
Issues & Questions:
- π¨ Troubleshooting Guide - Quick fixes for common issues
- π GitHub Issues - Report bugs or request features
- π¬ GitHub Discussions - Ask questions and share ideas
Documentation by Topic:
- Installation Problems - Platform-specific setup
- Configuration Issues - Environment variables setup
- Authentication Errors - Email provider setup
- Command Reference - All CLI commands
- Performance Tips - Speed improvements
All Documentation: See docs/ folder for complete guides
π License
MIT License - see LICENSE file for details.
π Star this repo if it helps you manage emails efficiently across platforms!
Version: 2.0.0
Last Updated: December 20, 2025
