Lightweight MCP server for local AI-powered cybersecurity reconnaissance
PocketRecon-AI is a Model Context Protocol (MCP) server that enables Large Language Models (LLMs) to perform cybersecurity reconnaissance tasks directly within conversational interfaces. Built for low-power devices like Raspberry Pi and local PCs. PocketRecon-AI connects AI agents with powerful security tools including Nmap, Netcat, WhatWeb, Curl, and more.
The system uses a two-tier architecture: an MCP server that communicates with your LLM (LM Studio, VS Code, Cursor, etc.), and a Flask-based backend API that executes the actual system commands.
PocketRecon-AI is cross-platform, and runs on both Linux and Windows environments.
- ICMP Ping β Reachability testing with configurable packet counts
- Traceroute β Network path analysis to destinations
- Nmap Scanning β Port scanning, OS detection, NSE script execution and more
- Netcat β TCP connectivity testing and raw socket interaction
- Directory Brute-forcing β Web directory enumeration using dirb wordlist
- Technology Fingerprinting β CMS and framework detection
- HTTP Security Auditing β Header analysis (HSTS, CSP, etc.)
- Web Content Extraction β Structured data extraction from webpages
- WHOIS Lookup β Domain registration data retrieval
- DNS Enumeration β Subdomain discovery and record analysis
- CVE Lookup β Passive vulnerability search via NVD
- IP Reputation β AbuseIPDB integration for threat intelligence
- Web Search β Lightweight DuckDuckGo searching
- MCP Server β Native Model Context Protocol support
- Works with: LM Studio, VS Code, Cursor, Ollama, and any MCP-compatible client
- Automated security workflows via conversational interface
Comparison of AI-powered cybersecurity reconnaissance platforms, autonomous pentesting assistants, and MCP-based offensive security tooling.
| Feature | PocketRecon-AI | mcp-kali-server | PentAGI | HexStrike-AI |
|---|---|---|---|---|
| Weight | π’ Extremely Lightweight | π‘ Moderate | π΄ Very Heavy | π‘ Moderate |
| Safety | π’ Abstracted wrapper-based execution | π΄ Direct shell command execution | π’ Containerized sandbox execution | π΄ Direct shell command execution |
| Dependencies | π’ Python + Nmap | π‘ Kali Linux environment | π΄ 20+ GB stack + API keys | π 150+ external tools |
| Setup Complexity | π’ Minimal | π‘ Moderate | π΄ High | π‘ Moderate |
| System Requirements | π’ Runs on a Potato | π‘ Low-end PC | π΄ 4+ GB RAM recommended | π‘ Low-end PC |
| Capability Scope | π‘ Reconnaissance & scanning | π’ Full Kali ecosystem | π’ Autonomous pentesting framework | π’ Broad offensive tooling |
PocketRecon-AI uses a two-component architecture that separates the LLM interface from the command execution:
| Component | Role | File |
|---|---|---|
| MCP Server (client) | MCP-compatible server, communicates with LLM | pocket_recon_mcp.py |
| Backend API (server) | Flask server that executes commands | pocket_recon_server.py |
The MCP Server (client) exposes tools to your LLM and forwards requests to the Backend API (server), which runs the actual security tools on your system.
- Python 3.10+
- Docker (optional, for containerized deployment)
- System Tools (must be installed on the backend API server):
curlpingtraceroutenetcatnmap
git clone https://github.com/hXR16F/PocketRecon-AI
cd PocketRecon-AIpython -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txt
sudo apt install nmap # On Windows: install from https://nmap.org/download#windowspython pocket_recon_server.py --host 0.0.0.0 --port 5005docker build -t pocket-recon .docker run -d \
--name pocket-recon \
-p 5005:5005 \
--cap-add=NET_ADMIN \
--cap-add=NET_RAW \
pocket-recon- Open LM Studio and edit
mcp.json. - Configure as follows:
{
"mcpServers": {
"PocketRecon-AI": {
"command": "python",
"args": [
"/path/to/pocket_recon_mcp.py",
"--server",
"http://localhost:5005"
],
"timeout": 900000
}
}
}All tools are exposed to your LLM via the MCP protocol and map to backend API endpoints:
| Tool | Description | Parameters | API Endpoint |
|---|---|---|---|
ping |
ICMP echo requests for reachability testing | target, count |
POST /api/ping |
nmap |
Network scanning (ports, OS detection, NSE scripts, etc.) | target, ports, scan_type, scripts, os_detection, service_detection, script_scan, script_args, top_ports_count, timing, extra_args |
POST /api/nmap |
netcat |
TCP connectivity and raw socket interaction | target, port, data |
POST /api/netcat |
traceroute |
Trace network route to destination | target |
POST /api/traceroute |
whois |
Retrieve domain registration data | domain |
POST /api/whois |
curl |
Perform customizable HTTP requests using curl | url, method, data, json_body, headers, query_params, cookies, follow_redirects, timeout, connect_timeout, verbose, extra_args |
POST /api/curl |
dirbuster |
Web directory brute-force enumeration | target |
POST /api/dirbuster |
http_request |
Advanced HTTP interaction with redirect control | method, url, headers, params, data, json, follow_redirects, max_redirects |
POST /api/http_request |
whatweb |
Technology fingerprinting (CMS, frameworks) | target |
POST /api/whatweb |
dns_enum |
DNS record analysis and subdomain discovery | domain |
POST /api/dns_enum |
header_security_audit |
Security header audit (HSTS, CSP, etc.) | url, method |
POST /api/header_security_audit |
cve_lookup |
Passive CVE lookup via NVD keyword search | product, version |
POST /api/cve_lookup |
abuseipdb_checker |
IP reputation check using AbuseIPDB | ip |
POST /api/abuseipdb_checker |
visit_website |
Extract structured content from webpage | url, max_links, content_limit, timeout |
POST /api/visit_website |
web_search |
Lightweight web search using DuckDuckGo | query, limit |
POST /api/web_search |
- Network Isolation: Run PocketRecon-AI in an isolated network segment
- Access Control: Restrict backend API to localhost or trusted IPs
- Logging: Enable audit logging for all tool executions
- Updates: Keep system tools (Nmap, etc.) updated regularly
FOR AUTHORIZED CYBERSECURITY PROFESSIONALS AND EDUCATIONAL USE ONLY
- Unauthorized Scanning: Do NOT use this tool to scan networks, systems, or domains you do not own or have explicit written permission to test.
- Legal Compliance: Ensure all usage complies with local laws and ethical guidelines.
Built with π