Integrates with VirusTotal's threat intelligence database to scan extracted Indicators of Compromise (IoCs) from email headers and content, providing detection ratios and threat classifications for domains, IPs, and file hashes.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@HeaderHawkanalyze suspicious_email.eml for phishing risks and indicators of compromise"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
HeaderHawk 🦅
An advanced email security analysis MCP (Model Context Protocol) server that provides real-time phishing detection, threat intelligence integration, and comprehensive email header analysis.
Overview
HeaderHawk is a specialized MCP server designed to help security analysts, cybersecurity professionals, and organizations detect and analyze phishing attempts, malicious emails, and security threats through deep email header analysis and threat intelligence integration.
Key Features:
📧 Comprehensive email header parsing and analysis
🎯 Phishing indicator detection with confidence scoring
🔍 Indicators of Compromise (IoCs) extraction
🛡️ VirusTotal threat intelligence integration
🔐 DKIM/SPF/DMARC authentication validation
🌐 Domain reputation analysis
⚡ Real-time threat assessment
🦠 Malware detection and payload analysis
📊 Business Email Compromise (BEC) pattern detection
🔬 Social engineering tactic identification
Installation
Prerequisites
Python 3.8+
pip (Python package manager)
VirusTotal API key (for threat scanning features)
From PyPI (Recommended)
From Source
Quick Start
Basic Usage with Claude Desktop
Install HeaderHawk:
pip install headerhawkConfigure Claude Desktop (
claude_desktop_config.json):{ "mcpServers": { "headerhawk": { "command": "headerhawk-mcp", "env": { "VIRUSTOTAL_API_KEY": "your_virustotal_api_key_here" } } } }Restart Claude Desktop and start analyzing emails!
Command Line Usage
Available Functions
1. analyze_email(file_path: str)
Performs comprehensive phishing analysis on an email file.
Input:
file_path: Path to .eml file
Returns:
Email header metadata (From, To, Date, Message-ID)
Authentication results (DKIM, SPF, DMARC status)
Phishing indicators with confidence scores
Risk assessment summary
Detailed analysis recommendations
Malware/payload detection results
Example:
Real-World Example Output:
2. extract_iocs(file_path: str)
Extracts Indicators of Compromise from email content and headers.
Input:
file_path: Path to .eml file
Returns:
URLs found in email
IP addresses detected
Domains referenced
Email addresses extracted
File hashes (if present)
Attachment metadata
Classification by type and risk level
Example:
Real-World Example Output:
3. scan_with_virustotal(file_path: str)
Scans extracted IoCs against VirusTotal threat intelligence database.
Input:
file_path: Path to .eml fileEnvironment variable:
VIRUSTOTAL_API_KEY
Returns:
VirusTotal scan results for each IoC
Detection ratios (e.g., "5/72")
Last analysis dates
Verdict summary
Detailed threat classifications
Campaign correlation (if available)
Example:
Phishing Indicators Detected
HeaderHawk analyzes emails for 25+ phishing and malware indicators including:
Authentication Failures
DKIM signature failures
SPF policy misalignment
DMARC failures
Missing authentication headers
Deprecated signing algorithms (RSA-SHA1)
Authentication bypass attempts
Header Anomalies
Spoofed sender domains
Mismatched Reply-To addresses
Suspicious X-headers
Mail forwarding inconsistencies
X-Recommended-Action flags
Spoofed corporate identity headers
Content Analysis
Urgency language patterns
Authority impersonation attempts
Suspicious URL patterns
Known phishing keywords
Business Email Compromise (BEC) patterns
Social engineering tactics
Generic greetings ("Good day", "Dear Sir/Madam")
Fake business requests
Infrastructure Indicators
Suspicious mail servers
Blacklisted IP addresses
Generic/free email providers for business
Impossible travel patterns
Bulletproof hosting providers
Newly registered malicious domains
Domain registration age analysis
Technical Indicators
Return-Path misalignment
Multiple forwarding hops
Encoding anomalies
Obfuscated content
Suspicious attachment formats (.7z, .scr, .vbs, .exe)
Base64-encoded executable payloads
Archive bombs or compressed payloads
Malware Detection
Archive files (.7z, .rar, .zip) containing executables
Visual Basic Script (.vbs) payloads
Executable masquerading as documents
Ransomware/trojan attack chains
Known malware signatures
Payload obfuscation techniques
Real-World Usage Examples
Example 1: Legitimate Marketing Email
Example 2: Malicious RFQ Phishing Email
MCP Integration
With Claude (claude.ai or Claude Desktop)
Available MCP Tools
When used with Claude or other MCP-compatible clients:
say_hello - Test connection status
analyze_email - Full phishing analysis with malware detection
extract_iocs - Extract indicators of compromise
scan_with_virustotal - Threat intelligence lookup
Configuration
Environment Variables
Configuration File
Create ~/.headerhawk/config.json:
Output Format
Email Analysis Output
IoCs Extraction Output
Use Cases
1. Security Analysts
Quickly triage and analyze suspicious emails in bulk with confidence scoring and automated threat intelligence lookup. Identify malware campaigns and BEC attempts in seconds.
2. IT Security Teams
Integrate HeaderHawk into security information and event management (SIEM) systems for automated email threat detection and alerting.
3. Cybersecurity Researchers
Extract and analyze phishing campaigns with comprehensive IoC extraction, malware payload detection, and threat intelligence correlation.
4. Email Gateway Administrators
Deploy HeaderHawk as part of email gateway solutions for real-time phishing detection, malware scanning, and automated quarantine.
5. Incident Response Teams
Rapidly analyze emails during security incidents with detailed forensic information, malware analysis, and threat assessment for faster response.
6. Managed Security Service Providers (MSSPs)
Offer HeaderHawk as part of email security services for clients, with automated reports and threat summaries.
Deployment Strategies
PyPI Package Distribution
MCP Registry Submission
HeaderHawk is available for submission to the official MCP Registry at mcp-registry.anthropic.com.
To register:
Format project following MCP standards
Submit to registry with documentation
Enable discovery for Claude users globally
Docker Deployment
Kubernetes Deployment
API Reference
analyze_email()
extract_iocs()
scan_with_virustotal()
Performance Characteristics
Operation | Typical Time | Notes |
Email Analysis | 50-200ms | Local processing only |
IoCs Extraction | 30-100ms | Includes regex parsing + attachment analysis |
VirusTotal Scan | 1-5s per IoC | Depends on API rate limits |
Malware Detection | 100-300ms | Payload analysis and pattern matching |
Full Pipeline | 2-10s | Complete analysis with threats + VT lookup |
Limitations & Considerations
File Size: Works best with emails < 50MB
Encoding: Handles UTF-8, ASCII, and common encodings
VirusTotal API: Requires API key for threat scanning (free tier: 4 requests/minute)
False Positives: Machine learning-based detection may have edge cases
Zero-Days: Cannot detect previously unknown threat patterns
Language: Phishing keyword detection optimized for English
Payload Analysis: Limited to email-embedded payloads; does not execute malware
Troubleshooting
VirusTotal API Issues
File Not Found
Encoding Issues
Malware Detection Not Working
Contributing
Contributions are welcome! Areas for improvement:
Additional phishing detection heuristics
Support for more email formats (.msg, .pst)
Enhanced machine learning models
Additional threat intelligence integrations
Payload detonation sandbox integration
Performance optimizations
Multi-language support
Development
Setup Development Environment
Running Tests
Security Considerations
API Keys: Never commit API keys to version control
Email Data: Use in compliance with your organization's data retention policies
Rate Limiting: Respect VirusTotal API rate limits to avoid blocking
Threat Intelligence: VirusTotal results reflect community detections, not absolute truth
Payload Safety: Extracted payloads are not executed; analysis is performed on file metadata
Data Privacy: Emails are analyzed locally unless using VirusTotal scanning
License
MIT License - See LICENSE file for details
Support & Community
GitHub Issues: Report bugs and request features
MCP Specification: Model Context Protocol Documentation
VirusTotal API: VirusTotal Developers
Acknowledgments
Built on the Model Context Protocol (MCP) specification
Threat intelligence powered by VirusTotal
Email parsing utilizing industry-standard libraries
Inspired by security research in phishing detection and malware analysis
Changelog
v0.0.1 (Initial)
Core email analysis functionality
IoC extraction
VirusTotal integration
MCP server implementation
Roadmap
v0.1.0: Spam/Ham scoring and detection logic improvements
v0.2.0: Sandbox payload detonation integration
v0.3.0: Additional threat intelligence integrations (AlienVault OTX, URLhaus)
v0.4.0: Multi-language phishing keyword support
v1.0.0: Production-ready with comprehensive documentation
Made with 🦅 for cybersecurity professionals
For questions or support, reach out through GitHub Issues or community channels.