An AI-powered email intelligence platform that integrates with Gmail and OpenAI. It can be run as a CLI tool or deployed on AWS Lambda for enhanced capabilities.
The AI-Powered Email Intelligence Platform
Damien Email Wrestler is an enterprise-grade AI email intelligence platform that transforms how you manage email through natural language AI assistants like Claude. Built with hybrid CLI + AWS Lambda architecture, advanced AI intelligence, cost optimization, and seamless MCP integration.
Damien Email Wrestler consists of integrated components with hybrid CLI + AWS Lambda processing:
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā
ā AI Assistant āāāāāŗā Smithery Adapter āāāāāŗā Damien MCP āāāāāŗā Gmail API ā
ā (Claude) ā ā (Port 8081) ā ā Server ā ā ā
ā ā ā ā ā (Port 8892) ā ā ā
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāā
ā ā
ā ā¼
ā¼ āāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāā ā Hybrid Processing ā
ā ā ā Layer ā
ā Smithery ā ā ⢠Standard CLI āāāāāāāāā
ā Registry ā ā ⢠Privacy Guard ā ā
ā ā ā ⢠Smart Router ā ā
āāāāāāāāāāāāāāāāāāā ā ⢠Batch Processor ā ā
āāāāāāāāāāāāāāāāāāāāāāā ā
ā ā
ā¼ ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā AWS Lambda Enhancement ā ā
ā (When Credentials Set) ā ā
ā ⢠Email Processor ā ā
ā ⢠AI Analyzer (85%+) ā ā
ā ⢠Rule Engine ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā
ā¼ ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā Privacy-First Storage ā ā
ā ⢠Metadata Only ā ā
ā ⢠TTL Auto-Cleanup āāāāāāāā
ā ⢠DynamoDB Tables ā
ā ⢠No Content Storage ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāā
# Clone repository
git clone https://github.com/your-org/damien-email-wrestler.git
cd damien-email-wrestler
# Configure environment
cp .env.example .env
# Add your Gmail credentials and OpenAI API key to .env
# Install dependencies
cd damien-cli && poetry install && cd ..
cd damien-mcp-server && poetry install && cd ..
cd damien-smithery-adapter && npm install && cd ..
# Start all services with one command
./scripts/start-all.sh
Expected Output: ā All services running with health checks passed
Add to your ~/.claude/claude_desktop_config.json
:
{
"mcpServers": {
"damien-email-wrestler": {
"command": "node",
"args": ["./damien-smithery-adapter/dist/index.js"],
"cwd": "/path/to/damien-email-wrestler",
"env": {
"DAMIEN_MCP_SERVER_URL": "http://localhost:8892",
"DAMIEN_MCP_SERVER_API_KEY": "your-api-key-from-.env"
}
}
}
}
# Authenticate with Gmail
cd damien-cli && poetry run damien login
# Run validation tests
cd .. && ./run_e2e_tests.sh
š You're ready! Try in Claude Desktop: "List my recent emails and suggest 3 automation rules"
You: "Analyze my emails from the last week and find patterns"
Claude: [Uses damien_ai_analyze_emails] Found 3 key patterns:
⢠15 newsletter emails (suggest auto-archive rule)
⢠8 meeting requests (suggest calendar integration)
⢠12 customer support emails (suggest priority labeling)
You: "Create a rule to automatically archive newsletters"
Claude: [Uses damien_ai_create_rule] Created rule with 95% confidence:
ā
Auto-archive emails containing "unsubscribe" from marketing domains
You: "Optimize my inbox for better productivity"
Claude: [Uses damien_ai_optimize_inbox] Completed optimization:
⢠Archived 47 old newsletters
⢠Labeled 23 emails as "Action Required"
⢠Created 3 smart filters for automatic organization
# CLI Usage
poetry run damien emails list --query "from:boss@company.com" --max-results 10
poetry run damien ai analyze-emails --days 30 --min-confidence 0.8
poetry run damien rules suggest --categories "productivity,automation"
# Bulk Operations
poetry run damien emails bulk-label --query "is:unread older_than:30d" --label "Archive"
poetry run damien emails bulk-trash --query "category:promotions older_than:90d" --dry-run
# AI Intelligence Configuration
AI_MODEL_STRATEGY="cost_optimized" # cost_optimized | performance_optimized | balanced
USE_OPENAI_API=true # Use OpenAI API vs local models
TRACK_TOKEN_USAGE=true # Enable cost monitoring
COST_ALERT_THRESHOLD_USD=10.00 # Alert when costs exceed threshold
# Performance Tuning
MAX_TOKENS_PER_REQUEST=4000 # Token limit per API call
SIMPLE_TASK_MAX_TOKENS=1000 # Threshold for gpt-4o-mini usage
COMPLEX_TASK_MIN_CONFIDENCE=0.8 # Threshold for gpt-4o usage
# Privacy & Security
PII_DETECTION_ENABLED=true # Enable PII protection
AUDIT_LOGGING_ENABLED=true # Enable compliance logging
CONSENT_REQUIRED=false # Require explicit consent for processing
# Start/Stop Services
./scripts/start-all.sh # Start all services
./scripts/stop-all.sh # Stop all services
# Service Health
curl http://localhost:8892/health # MCP Server health
curl http://localhost:8081/health # Smithery Adapter health
# Logs
tail -f logs/damien-mcp-server.log # MCP Server logs
tail -f logs/smithery-adapter.log # Adapter logs
tail -f logs/token_usage.json # Cost tracking logs
NO License - see LICENSE for details.
Built with:
Transform your email experience with AI-powered intelligence. Welcome to the future of email management. š
A Discord relay server to send messages and prompts to a channel and receive responses.
Personalized music recommendations and playlist management for TIDAL, powered by its API and LLM filtering.
Send SMS messages using the Aligo SMS API.
Interact with RetellAI's voice services to create conversational voice AI.
A news feed server for aggregating news from various sources.
An AI voice toolkit with TTS, voice cloning, and video translation, now available as an MCP server for smarter agent integration.
Send SMS messages using the Twilio API. Functions as an MCP server or a standalone REST API.
A standardized interface for managing, sending, and retrieving emails through the Gmail API.
An open-source messaging server for client-to-client communication using MCP HTTP Streamable messaging.
Integrates with Mailtrap Email API.