sec-shodan-mcp
Enables searching and counting exploits from Shodan's exploit database, which includes Metasploit modules, for vulnerability research.
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., "@sec-shodan-mcp search for open SSH servers in the US"
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.
Shodan MCP Server
A Model Context Protocol (MCP) server that provides comprehensive access to the Shodan IoT search engine API. This enables AI assistants to perform network reconnaissance, vulnerability research, and security analysis using Shodan's powerful search capabilities.
Features
Device Search: Search the Shodan database for internet-connected devices using powerful query syntax
Host Intelligence: Get detailed information about specific IP addresses including open ports, services, and vulnerabilities
Exploit Database: Search Shodan's exploit database covering CVE, Exploit-DB, and Metasploit
Network Scanning: Request on-demand scans of IP addresses and network ranges
Network Monitoring: Create alerts to monitor IP ranges for changes
DNS Operations: Perform forward and reverse DNS lookups, enumerate subdomains
Honeypot Detection: Identify potential honeypots using Shodan's honeyscore algorithm
Related MCP server: Shodan MCP Server
Prerequisites
Node.js 18 or higher
A Shodan API key (get one at account.shodan.io)
Installation
# Clone the repository
git clone https://github.com/schwarztim/sec-shodan-mcp.git
cd sec-shodan-mcp
# Install dependencies
npm install
# Build the project
npm run buildConfiguration
Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
{
"mcpServers": {
"shodan": {
"command": "node",
"args": ["/path/to/sec-shodan-mcp/dist/index.js"],
"env": {
"SHODAN_API_KEY": "your-api-key-here"
}
}
}
}Claude Code
Add to ~/.claude/user-mcps.json:
{
"mcpServers": {
"shodan": {
"command": "node",
"args": ["/path/to/sec-shodan-mcp/dist/index.js"],
"env": {
"SHODAN_API_KEY": "your-api-key-here"
}
}
}
}Available Tools
Search & Discovery
Tool | Description |
| Search Shodan for devices matching a query with filters like |
| Get all information about a specific IP including ports, services, banners, vulnerabilities, and SSL certificates |
| Count search results without consuming query credits |
Exploits Database
Tool | Description |
| Search for exploits by CVE, author, platform, type, or port |
| Count matching exploits without returning individual results |
Network Scanning
Tool | Description |
| Request on-demand scan of IP addresses or CIDR ranges |
| Check the status of a previously submitted scan |
| List all active on-demand scans |
Network Alerts
Tool | Description |
| Create monitoring alerts for IP ranges |
| List all active network alerts |
| Get details for a specific alert |
| Delete a network alert |
| List available alert trigger types |
DNS Operations
Tool | Description |
| Resolve hostnames to IP addresses (forward DNS) |
| Look up hostnames for IP addresses (reverse DNS) |
| Get DNS information for a domain including subdomains |
Security Analysis
Tool | Description |
| Calculate probability that an IP is a honeypot (0.0 to 1.0) |
Utility
Tool | Description |
| List all ports that Shodan crawls |
| List protocols available for on-demand scanning |
| List all search filters available in Shodan |
| List facets available for search result breakdowns |
| Get API plan info including query and scan credits |
| Get account information for the API key |
| Get your current public IP address |
Query Library
Tool | Description |
| Browse the directory of saved search queries |
| Search the saved query directory |
Usage Examples
Search for Devices
# Find Apache servers in the United States
shodan_search: query="apache country:US"
# Find open SSH servers
shodan_search: query="port:22 product:openssh"
# Find devices vulnerable to Log4Shell
shodan_search: query="vuln:CVE-2021-44228"
# Find webcams with screenshots
shodan_search: query="webcam has_screenshot:true"
# Find industrial control systems
shodan_search: query="tag:ics"
# Find devices by organization
shodan_search: query="org:\"Google LLC\""Get Host Information
# Get details about a specific IP
shodan_host: ip="8.8.8.8"
# Include historical data
shodan_host: ip="8.8.8.8" history=trueSearch Exploits
# Search for Log4j exploits
shodan_exploits_search: query="log4j"
# Find exploits by CVE
shodan_exploits_search: query="cve:CVE-2021-44228"
# Find Metasploit modules
shodan_exploits_search: query="source:metasploit"DNS Operations
# Resolve hostnames
shodan_dns_resolve: hostnames="google.com,github.com"
# Reverse DNS lookup
shodan_dns_reverse: ips="8.8.8.8,1.1.1.1"
# Get domain information
shodan_dns_domain: domain="example.com"API Credits
Different Shodan API plans have different credit limits:
Free accounts: Limited search queries per month
Search with pagination: Consumes query credits
shodan_count: Does NOT consume credits (use for scoping)On-demand scanning: Consumes scan credits (1 credit per IP)
Some filters (like
vuln:) require paid plans
Check your current credits with shodan_api_info.
Development
# Run in development mode
npm run dev
# Build for production
npm run build
# Start the server
npm startSecurity Notice
This tool is intended for legitimate security research, penetration testing (with authorization), and network defense purposes. Always ensure you have proper authorization before scanning or probing systems you do not own.
Resources
License
MIT License - see LICENSE for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Available Tools
32 toolsshodan_account_profileARead-only
Get account information associated with the API key.
Inputs: no named parameters.
shodan_alert_createA
Create a network alert to monitor IP ranges for changes.
Inputs: ip (required), name (required), expires.
shodan_alert_deleteCDestructive
Delete a network alert.
Inputs: alert_id (required).
shodan_alert_getBRead-only
Get details for a specific alert.
Inputs: alert_id (required).
shodan_alert_listARead-only
List all active network alerts.
Inputs: no named parameters.
shodan_alert_triggersARead-only
List available alert trigger types.
Inputs: no named parameters.
shodan_api_infoARead-only
Get API plan info including query credits, scan credits, and limits.
Inputs: no named parameters.
shodan_countARead-only
Count search results without consuming query credits. Useful for scoping searches.
Inputs: query (required), facets.
shodan_cpe_lookupARead-only
Look up CPE 2.3 identifiers matching a product name.
Inputs: product (required), skip, count, limit.
shodan_cve_lookupARead-only
Look up a specific CVE by ID. Returns CVSS, EPSS, references, and affected products.
Inputs: cve_id (required).
shodan_cves_by_epssARead-only
Get CVEs ranked by EPSS (Exploit Prediction Scoring System) score.
Inputs: skip, limit, order, min_epss, +1 more.
shodan_cve_searchARead-only
Search CVEs by CPE, product name, KEV status, or EPSS score. Cannot specify both cpe23 and product.
Inputs: skip, cpe23, limit, is_kev, +6 more.
shodan_cves_kevBRead-only
Get CISA Known Exploited Vulnerabilities (KEV) catalog entries.
Inputs: skip, limit, maxResults.
shodan_cves_newestARead-only
Get the most recently published CVEs.
Inputs: limit.
shodan_dns_domainARead-only
Get DNS information for a domain including subdomains. Consumes 1 query credit.
Inputs: domain (required), page, type, history, +1 more.
shodan_dns_resolveARead-only
Resolve hostnames to IP addresses (forward DNS lookup).
Inputs: hostnames (required).
shodan_dns_reverseARead-only
Look up hostnames for IP addresses (reverse DNS lookup).
Inputs: ips (required).
shodan_exploits_countARead-only
Count exploits matching a query without returning individual results.
Inputs: query (required), facets.
shodan_exploits_searchARead-only
Search the Shodan Exploits database. Covers Exploit-DB, CVE, Metasploit, and more.
Inputs: query (required), page, facets, detailed, +1 more.
shodan_facetsARead-only
List all facets available for search result breakdowns.
Inputs: no named parameters.
shodan_filtersARead-only
List all search filters available in Shodan.
Inputs: no named parameters.
shodan_honeyscoreARead-only
Calculate the probability that an IP is a honeypot. Returns 0.0 (not a honeypot) to 1.0 (honeypot).
Inputs: ip (required).
shodan_hostARead-only
Get all information about a specific IP including open ports, services, banners, vulnerabilities, and SSL certificates.
Inputs: ip (required), minify, history, detailed, +1 more.
shodan_list_scansB
List all active on-demand scans.
Inputs: no named parameters.
shodan_myipARead-only
Get your current public IP address as seen by Shodan.
Inputs: no named parameters.
shodan_portsARead-only
List all ports that Shodan crawls on the Internet.
Inputs: no named parameters.
shodan_protocolsARead-only
List all protocols available for on-demand scanning.
Inputs: no named parameters.
shodan_saved_queriesBRead-only
Browse the directory of saved search queries.
Inputs: page, sort, order.
shodan_scanA
Request Shodan to scan specific IPs or CIDR ranges. Each IP consumes 1 scan credit.
Inputs: ips (required).
shodan_scan_statusB
Check the status of a previously submitted scan.
Inputs: scan_id (required).
shodan_searchARead-only
Search Shodan for devices matching a query. Uses filters like 'port:', 'country:', 'org:', 'product:', 'os:', 'vuln:'. Returns formatted host summaries.
Inputs: query (required), page, facets, minify, +2 more.
shodan_search_queriesBRead-only
Search the directory of saved queries.
Inputs: query (required), page.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 32 tools
Most tools target distinct resources (DNS, search, host, scan, alerts, exploits, CVE, account) and descriptions clarify boundaries. However, pairs like shodan_cve_search vs. shodan_exploits_search and shodan_saved_queries vs. shodan_search_queries could cause minor misselection.
Naming follows a loose shodan_<resource>_<action> pattern, but there are deviations: shodan_list_scans uses verb-first (list_scans) while shodan_alert_list uses resource-first (alert_list), and several tools are bare nouns (ports, filters, host). Terms like myip and cves_kev also break the convention.
With 32 tools, the server feels bloated. Many are low-level utilities (shodan_myip, shodan_honeyscore, shodan_ports, shodan_protocols) that could be consolidated. The number exceeds the 25-tool threshold for 'too many' and makes the toolset harder for agents to navigate.
The toolset covers Shodan's core API well: search, host details, DNS, on-demand scans, alerts, exploits, CVEs, and account info. Minor gaps exist (e.g., no update alert, no cancel scan), but most workflows can be completed without dead ends.
Maintenance
Related MCP Connectors
Unofficial Shodan MCP — wraps the full Shodan REST API (api.shodan.io)
Defensive Shodan search and host intelligence MCP using customer-provided SHODAN_API_KEY for
Unofficial Shodan InternetDB MCP — wraps Shodan InternetDB (internetdb.shodan.io)
CVE, KEV, EPSS, SBOM and advisory lookups; per-CVE exposure from Shodan data (© Shodan). Keyless.
Related MCP Servers
- AlicenseBqualityCmaintenanceProvides access to Shodan API functionality, enabling AI assistants to query information about internet-connected devices for cybersecurity research and threat intelligence.2355MIT
- AlicenseAqualityDmaintenanceEnables comprehensive security reconnaissance, vulnerability assessment, and threat intelligence gathering by integrating Shodan's API. It provides tools for searching internet-connected devices, performing DNS operations, and querying the Shodan exploit database.11Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables to search and analyze internet-connected devices using the Shodan API, with tools for host search, DNS, scanning, exploits, alerts, and more.MIT
- FlicenseAqualityDmaintenanceEnables searching Shodan for devices and services, and looking up host details, through natural language.21-