by Cyreslab-AI
Provides access to Shodan API functionality and CVE database through a Model Context Protocol server, enabling AI assistants to query internet-connected device information, services, and vulnerabilities.
Enables Model Context Protocol‑compatible AI assistants to retrieve network intelligence, vulnerability data, and monitoring capabilities from Shodan and public CVE sources. The server wraps Shodan’s REST endpoints and the CVE database into callable tools that can be invoked by an LLM.
npm install.SHODAN_API_KEY.npm start or via the MCP configuration below).Q: Do I need a paid Shodan subscription? A: Only features that consume Shodan credits (search, scans, SSL, IoT, exploit search, alerts, notifiers) require a paid API key. CVE data, CPE lookup, InternetDB, and account utilities are free.
Q: Can I run the server without an API key?
A: The server will start, but any tool that calls a paid endpoint will fail. The get_internetdb_host tool works without a key.
Q: How are results limited?
A: Most tools accept a max_items or limit parameter (default 5‑10). Pagination is supported via page, skip, etc.
Q: What programming language is required? A: The server is a Node.js application; ensure Node ≥ 14 is installed.
Q: How do I add the server to Claude or another AI?
A: Use the MCP configuration JSON (see serverConfig below) and restart the AI client to load the new tools.

A Model Context Protocol (MCP) server that provides access to Shodan API functionality and CVE database, allowing AI assistants to query information about internet-connected devices, services, and vulnerabilities.
Clone the repository:
git clone https://github.com/Cyreslab-AI/shodan-mcp-server.git
cd shodan-mcp-server
Install dependencies:
npm install
Build the server:
npm run build
Set up your Shodan API key:
export SHODAN_API_KEY="your-api-key-here"
Start the server:
npm start
This server can be integrated with Claude or other MCP-compatible AI assistants. To add it to Claude Desktop or Claude.app:
Add the server to your MCP settings:
{
"mcpServers": {
"shodan": {
"command": "node",
"args": ["/path/to/shodan-mcp-server/build/index.js"],
"env": {
"SHODAN_API_KEY": "your-api-key-here"
}
}
}
}
Restart Claude to load the new MCP server.
Get detailed information about a specific IP address.
Parameters:
ip (required): IP address to look upmax_items (optional): Maximum number of items to include in arrays (default: 5)fields (optional): List of fields to include in the results (e.g., ['ip_str', 'ports', 'location.country_name'])Search Shodan's database for devices and services.
Parameters:
query (required): Shodan search query (e.g., 'apache country:US')page (optional): Page number for results pagination (default: 1)facets (optional): List of facets to include in the search results (e.g., ['country', 'org'])max_items (optional): Maximum number of items to include in arrays (default: 5)fields (optional): List of fields to include in the results (e.g., ['ip_str', 'ports', 'location.country_name'])summarize (optional): Whether to return a summary of the results instead of the full data (default: false)Get the count of hosts matching a search query without consuming query credits.
Parameters:
query (required): Shodan search query to count hosts forfacets (optional): List of facets to include in the count results (e.g., ['country', 'org'])Scan a network range (CIDR notation) for devices.
Parameters:
cidr (required): Network range in CIDR notation (e.g., 192.168.1.0/24)max_items (optional): Maximum number of items to include in results (default: 5)fields (optional): List of fields to include in the results (e.g., ['ip_str', 'ports', 'location.country_name'])Search for specific types of IoT devices.
Parameters:
device_type (required): Type of IoT device to search for (e.g., 'webcam', 'router', 'smart tv')country (optional): Optional country code to limit search (e.g., 'US', 'DE')max_items (optional): Maximum number of items to include in results (default: 5)Get SSL certificate information for a domain.
Parameters:
domain (required): Domain name to look up SSL certificates for (e.g., example.com)Resolve hostnames to IP addresses using DNS lookup.
Parameters:
hostnames (required): List of hostnames to resolve (e.g., ['google.com', 'facebook.com'])Get hostnames for IP addresses using reverse DNS lookup.
Parameters:
ips (required): List of IP addresses to lookup (e.g., ['8.8.8.8', '1.1.1.1'])Get comprehensive domain information including subdomains and DNS records.
Parameters:
domain (required): Domain name to lookup (e.g., 'google.com')history (optional): Include historical DNS data (default: false)type (optional): DNS record type filter (A, AAAA, CNAME, NS, SOA, MX, TXT)page (optional): Page number for pagination (default: 1)List all available search facets that can be used with Shodan queries.
Parameters: None
List all available search filters that can be used in Shodan queries.
Parameters: None
Parse a search query to understand which filters and parameters are being used.
Parameters:
query (required): Shodan search query to parse and analyzeList all ports that Shodan crawls on the Internet.
Parameters: None
List all protocols that can be used when performing on-demand Internet scans.
Parameters: None
Get detailed information about a specific CVE.
Parameters:
cve_id (required): CVE ID to look up (e.g., 'CVE-2021-44228')Search for vulnerabilities with various filters.
Parameters:
cpe23 (optional): CPE 2.3 string to search for (e.g., 'cpe:2.3:a:apache:log4j:*')product (optional): Product name to search for vulnerabilities (e.g., 'apache', 'windows')is_kev (optional): Filter for Known Exploited Vulnerabilities onlysort_by_epss (optional): Sort results by EPSS score (Exploit Prediction Scoring System)start_date (optional): Start date for filtering CVEs (YYYY-MM-DD format)end_date (optional): End date for filtering CVEs (YYYY-MM-DD format)limit (optional): Maximum number of results to return (default: 10)skip (optional): Number of results to skip for pagination (default: 0)Get Common Platform Enumeration (CPE) information for products.
Parameters:
product (optional): Product name to search for (e.g., 'apache', 'windows')vendor (optional): Vendor name to filter by (e.g., 'microsoft', 'apache')version (optional): Version to filter by (e.g., '2.4.1')limit (optional): Maximum number of results to return (default: 10)skip (optional): Number of results to skip for pagination (default: 0)Get the newest vulnerabilities from the CVE database.
Parameters:
limit (optional): Maximum number of results to return (default: 10)Get Known Exploited Vulnerabilities (KEV) from CISA.
Parameters:
limit (optional): Maximum number of results to return (default: 10)Get CVEs sorted by EPSS score (Exploit Prediction Scoring System).
Parameters:
limit (optional): Maximum number of results to return (default: 10)Get a free, lightweight lookup of an IP address using Shodan's InternetDB (open ports, hostnames, CPEs, vulnerabilities, tags). No API key required.
Parameters:
ip (required): IP address to look up (e.g., '8.8.8.8')Search Shodan's Exploits database (Exploit-DB, Metasploit, CVE-linked exploits) for known exploits.
Parameters:
query (required): Exploits search query (e.g., 'apache cve:2021-44228')page (optional): Page number for results pagination (default: 1)facets (optional): List of facets to include in the results (e.g., ['type', 'platform'])Note: As of this writing, the upstream exploits.shodan.io host redirects to cvedb.shodan.io and no longer serves this API. The tool detects this and returns a clean {"error": "Unexpected response from the Shodan Exploits API", ...} object rather than crashing, in case Shodan restores the endpoint.
Get the count of exploits matching a search query without returning the full exploit records.
Parameters:
query (required): Exploits search query to count results forfacets (optional): List of facets to include in the count results (e.g., ['type', 'platform'])Create a persistent Shodan network alert that monitors one or more IPs/ranges and reports changes over time. This is not a read-only action.
Parameters:
name (required): Descriptive name for the alertip (required): List of IPs or CIDR ranges to monitor (e.g., ['1.2.3.4', '10.0.0.0/24'])expires (optional): Number of seconds the alert should stay active before automatically expiring (omit for no expiration)List all configured Shodan network alerts on the account.
Parameters:
include_expired (optional): Whether to include expired alerts in the results (default: true)Get details about a specific Shodan network alert by ID.
Parameters:
alert_id (required): ID of the alert to retrievePermanently delete a Shodan network alert by ID. This is a destructive action and cannot be undone.
Parameters:
alert_id (required): ID of the alert to deleteList available Shodan notifier providers (e.g. slack, email, webhook, telegram) and the arguments each one requires.
Parameters: None
List all configured Shodan notifiers on the account.
Parameters: None
Create a new Shodan notifier (e.g. Slack, email, webhook) that network alerts can send events to. This is not a read-only action.
Parameters:
provider (required): Notifier provider name (e.g. 'slack', 'email', 'webhook', 'telegram'). Use list_notifier_providers to see available options.args (required): Provider-specific arguments (e.g., {"webhook_url": "https://..."} for slack)description (optional): Human-readable description of the notifierPermanently delete a Shodan notifier by ID. This is a destructive action and cannot be undone.
Parameters:
notifier_id (required): ID of the notifier to deleteGet information about your API plan including credits and limits.
Parameters: None
Get account profile information including membership status and credits.
Parameters: None
Get your current IP address as seen from the Internet.
Parameters: None
shodan://host/{ip}: Information about a specific IP addressSome Shodan API endpoints require a paid membership. The following features are only available with a paid Shodan API key:
Note: CVE database functionality (get_cve_info, search_cves, get_cpes, get_newest_cves, get_kev_cves, get_cves_by_epss) is completely free and does not require a paid Shodan subscription.
Note: get_internetdb_host is completely free and does not require a Shodan API key at all — it queries the public internetdb.shodan.io service directly. The server still requires a SHODAN_API_KEY environment variable to start (used by the other tools).
MIT
If you use this project in your research or publications, please cite it as follows:
author = {Bassem Abidi and Moudather Chelbi},
title = {Shodan MCP Server},
year = {2025},
howpublished = {https://github.com/Cyreslab-AI/shodan-mcp-server},
note = {Accessed: 2025-06-29}
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by chaitin
A self‑hosted web application firewall and reverse proxy that protects web applications from attacks and exploits by filtering, monitoring, and blocking malicious HTTP/S traffic.
by snyk
Scans installed AI agent components, MCP servers, and skill files for prompt‑injection, tool poisoning, toxic flows, hard‑coded secrets and other supply‑chain risks.
by OpenOSINT
Provides an AI‑driven OSINT workflow that lets users query a natural‑language REPL, CLI, web UI, or MCP server, automatically selecting and chaining 18 reconnaissance tools to collect, pivot, verify, and report public‑source intelligence.
by 2akouwu
Provides deterministic verification of AI‑generated claims against binary artifacts, ensuring every structural or behavioral assertion is grounded in the actual file and preserving verified state across context resets.
by safedep
Provides enterprise‑grade open source software supply chain security by scanning source code, dependencies, containers and SBOMs, detecting vulnerabilities and malicious packages, and enforcing policy as code.
by tufantunc
Provides controlled SSH access for LLM agents with command classification, policy‑based authorization, human‑in‑the‑loop approval, and immutable audit logging.
by semgrep
Offers an MCP server that lets LLMs, agents, and IDEs run Semgrep scans to detect security vulnerabilities in source code.
by KeyValueSoftwareSystems
Enables adversary emulation for AI agents, LLM applications, and MCP servers, letting teams test their AI systems against realistic attack scenarios.
by PortSwigger
Enables Burp Suite to communicate with AI clients via the Model Context Protocol, providing an MCP server and bundled stdio proxy.
{
"mcpServers": {
"shodan": {
"command": "npx",
"args": [
"-y",
"shodan-mcp-server"
],
"env": {
"SHODAN_API_KEY": "<YOUR_API_KEY>"
}
}
}
}claude mcp add shodan npx -y shodan-mcp-server