theHarvester MCP Server
Integrates with Baidu search engine to harvest emails and subdomains associated with target domains.
Integrates with Brave search engine for domain reconnaissance, including email and subdomain discovery.
Integrates with DuckDuckGo search engine to discover emails and subdomains related to target domains.
Integrates with GitHub code search to find emails and subdomains in public repositories.
Integrates with SecurityScorecard to gather security-related intelligence and subdomain data.
Integrates with VirusTotal to query domain information and discover associated subdomains and emails.
Click on "Deploy 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., "@theHarvester MCP Server Recon domain example.com for emails and subdomains"
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.
theHarvester MCP Server
An MCP (Model Context Protocol) server that provides AI assistants with access to theHarvester - a powerful OSINT reconnaissance tool for email and subdomain harvesting during penetration testing.
Overview
theHarvester is one of the most widely used OSINT tools for gathering intelligence during the reconnaissance phase of penetration testing. This MCP server wraps theHarvester's capabilities, allowing AI assistants like Claude to perform domain reconnaissance tasks through a structured interface.
The server executes theHarvester commands via SSH on a Kali Linux host, making it ideal for security professionals who maintain a dedicated Kali environment.
Related MCP server: kali-mcp
Features
Email Harvesting - Discover email addresses associated with target domains
Subdomain Discovery - Find subdomains using 40+ public and premium data sources
DNS Brute Force - Enumerate subdomains using wordlist-based brute forcing
Shodan Integration - Query discovered hosts for open ports, services, and banners
Takeover Detection - Check for subdomain takeover vulnerabilities
Virtual Host Discovery - Identify virtual hosts on discovered IP addresses
Installation
Prerequisites
Kali Linux Host - A Kali Linux system accessible via SSH
SSH Configuration - SSH access configured in
~/.ssh/configtheHarvester - Installed on the Kali host:
sudo apt install theharvesterNode.js - Version 18 or higher
Setup
# Clone the repository
git clone https://github.com/schwarztim/sec-theharvester-mcp.git
cd sec-theharvester-mcp
# Install dependencies
npm install
# Build the project
npm run buildMCP Configuration
Add to your Claude Desktop or MCP client configuration:
{
"mcpServers": {
"theharvester": {
"command": "node",
"args": ["/path/to/sec-theharvester-mcp/dist/index.js"],
"env": {
"KALI_HOST": "kali"
}
}
}
}Tools
Tool | Description |
| Full OSINT search with configurable sources and options |
| List available data sources and API requirements |
| Quick search focused on email harvesting |
| Quick search for subdomain/host discovery |
| DNS brute force enumeration |
| Search with Shodan integration for detailed host info |
| Comprehensive reconnaissance using all features |
| Verify theHarvester availability on Kali host |
Data Sources
No API Key Required
anubis, baidu, bing, crtsh, dnsdumpster, duckduckgo
hackertarget, otx, rapiddns, sitedossier, subdomaincenter
threatminer, urlscan, yahoo
API Key Required
bevigil, binaryedge, brave, bufferoverun, censys
criminalip, fullhunt, github-code, hunter, hunterhow
intelx, leakix, netlas, onyphe, pentesttools
projectdiscovery, rocketreach, securityscorecard
securitytrails, shodan, tomba, virustotal, zoomeye
Configure API keys in theHarvester's configuration file on your Kali host.
Configuration
Environment Variables
Variable | Default | Description |
|
| SSH hostname for Kali Linux system |
SSH Setup
Ensure your SSH config (~/.ssh/config) includes an entry for your Kali host:
Host kali
HostName 192.168.1.100
User root
IdentityFile ~/.ssh/kali_keyUsage Examples
Basic Domain Search
{
"tool": "theharvester_search",
"arguments": {
"domain": "example.com",
"sources": ["bing", "crtsh", "dnsdumpster"],
"limit": 500
}
}Email Harvesting
{
"tool": "theharvester_emails",
"arguments": {
"domain": "example.com",
"sources": ["hunter", "tomba", "bing"]
}
}Subdomain Discovery with DNS Resolution
{
"tool": "theharvester_hosts",
"arguments": {
"domain": "example.com",
"dns_resolve": true,
"dns_brute": true
}
}Full Reconnaissance
{
"tool": "theharvester_full_recon",
"arguments": {
"domain": "example.com"
}
}Output Format
All tools return structured JSON with:
Parsed results (emails, hosts, IPs, URLs, ASNs)
Statistics and metadata
Raw output for detailed analysis
Example response:
{
"domain": "example.com",
"sources": ["bing", "crtsh"],
"emails": ["admin@example.com", "support@example.com"],
"hosts": ["www.example.com", "mail.example.com"],
"ips": ["93.184.216.34"],
"urls": [],
"asns": [],
"interesting_urls": [],
"raw_output": "..."
}Security Considerations
This tool is intended for authorized security testing only
Always obtain proper authorization before scanning any domain
Be mindful of rate limits on data source APIs
Some sources may log your queries
Development
# Watch mode for development
npm run dev
# Build for production
npm run build
# Run the server
npm startRelated Projects
theHarvester - The underlying OSINT tool
Model Context Protocol - MCP specification
License
MIT License - see LICENSE for details.
Disclaimer
This tool is provided for educational and authorized security testing purposes only. Users are responsible for ensuring they have proper authorization before scanning any systems or domains. The authors are not responsible for any misuse of this software.
Available Tools
8 toolstheharvester_check_statusA
Check if theHarvester is available and working on the Kali host.
Inputs: no named parameters.
theharvester_dns_bruteA
Perform DNS brute force enumeration to discover subdomains using a wordlist.
Inputs: domain (required), dns_server.
theharvester_emailsC
Quick search focused on harvesting email addresses from a domain.
Inputs: domain (required), limit, sources.
theharvester_full_reconA
Comprehensive reconnaissance using all available sources and features. Takes longer but provides the most complete results.
Inputs: domain (required), output_file.
theharvester_hostsB
Quick search focused on discovering subdomains and hosts for a domain.
Inputs: domain (required), sources, dns_brute, dns_resolve.
theharvester_searchC
Run theHarvester to gather OSINT on a domain. Collects emails, subdomains, hosts, IPs, and URLs from various public sources.
Inputs: domain (required), limit, shodan, sources, +3 more.
theharvester_shodanB
Run theHarvester with Shodan integration to get detailed host information including open ports and banners.
Inputs: domain (required), sources.
theharvester_sourcesA
List all available data sources for theHarvester, with information about API key requirements.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct OSINT task (general search, source listing, DNS brute, email search, host search, Shodan integration, full recon, status check) with clear descriptions, making them easily distinguishable.
All tools share the 'theharvester_' prefix and use snake_case, but the suffixes vary between nouns (e.g., emails, hosts) and verbs (e.g., search, check_status), causing slight inconsistency.
With 8 tools, the set is well-scoped for theHarvester's OSINT functionality, covering both broad and focused operations without unnecessary redundancy.
The tool surface covers the major features of theHarvester: general search, source enumeration, DNS brute force, email/host harvesting, Shodan integration, and a comprehensive full recon, with no obvious gaps.
Maintenance
Related MCP Connectors
Email & Subdomain Finder - theHarvester OSINT Cloud | Bulk
Passive OSINT and security recon: DNS, TLS, email posture, IP reputation, CVE/KEV, CT logs.
Domain intel for AI agents: RDAP registration, DNS, email deliverability, tech stack.
Domain intel for AI agents: RDAP registration, DNS, email deliverability, tech stack.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to perform controlled OSINT tasks (domain, IP, email, phone, username recon; metadata analysis; breach checks) in a Docker sandboxed Kali Linux environment.-
- AlicenseAqualityCmaintenanceEnables AI assistants to run Kali Linux security tools in an isolated Docker container for tasks like network scanning, port checking, and service enumeration.77 npm1MIT
- AlicenseAqualityFmaintenanceEnables AI assistants to perform Active Directory reconnaissance by enumerating users, groups, computers, trusts, and password policies using ldapdomaindump on a remote Kali host via SSH.9MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to execute security testing tools on a Kali Linux machine over SSH, including reconnaissance, web app scanning, and static/dynamic analysis.117 npmMIT