Shodan MCP Server
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., "@Shodan MCP Server InternetDB lookup for 8.8.8.8"
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 -- AI-Powered Internet Intelligence for Claude, Cursor & VS Code
shodan-mcp is a Model Context Protocol (MCP) server that gives AI agents like Claude, Cursor, and GitHub Copilot direct access to Shodan -- the world's search engine for internet-connected devices. Built by Vorota AI.
20 tools for passive reconnaissance, vulnerability intelligence, DNS analysis, and device search -- all from your IDE. No packets sent to any target.
Quick Start
docker build -t shodan-mcp https://github.com/vorotaai/shodan-mcp.gitAdd to your MCP client (Claude Desktop, Cursor, VS Code, etc.):
{
"mcpServers": {
"shodan-mcp": {
"command": "docker",
"args": ["run", "--rm", "-i", "-e", "SHODAN_API_KEY", "shodan-mcp"],
"env": {
"SHODAN_API_KEY": "your-api-key-here"
}
}
}
}4 tools work immediately with no API key -- CVE lookup, CVE search, CPE search, and InternetDB. Get a Shodan API key at account.shodan.io to unlock all 20 tools.
Related MCP server: mcp-shodan
Available Tools
Free Tools (No API Key Required)
Tool | Description |
| Look up any CVE -- CVSS v3 scores, EPSS exploit prediction, references, affected CPEs |
| Search CVEs with filters -- CISA KEV catalog, EPSS sorting, date ranges |
| Search CPE identifiers by product name (e.g., "apache", "nginx") |
| Fast free IP intelligence -- open ports, vulns, hostnames, CPEs, tags |
Reconnaissance Tools (API Key Required)
Tool | Description |
| Full IP reconnaissance -- ports, services, banners, geolocation, vulns, ISP/org, ASN |
| Search Shodan's database of billions of devices with powerful query syntax |
| Count search results without consuming query credits |
| Resolve hostnames to IP addresses |
| Reverse DNS lookup for IP addresses |
| Domain reconnaissance -- subdomains, DNS records, tags |
| Detect if an IP is a honeypot (0.0 = real, 1.0 = honeypot) |
Utility Tools (API Key Required)
Tool | Description |
| Check API key usage -- plan type, remaining credits |
| Get your external IP address as seen by Shodan |
| Account membership, credits, display name |
| List available search facets for query breakdowns |
| List available search filters |
| Analyze and debug search queries |
| List port numbers Shodan crawlers scan |
| List protocols for on-demand scanning |
| Show HTTP headers your client sends |
Features
20 tools covering IP recon, device search, CVE/CPE intelligence, DNS, domain analysis, and honeypot detection
4 free tools that work with zero configuration -- no API key, no signup
Passive reconnaissance -- all queries hit Shodan's pre-indexed database, no packets touch any target
Structured Pydantic output -- every tool returns typed models, not raw JSON
Input validation -- IP addresses, domains, CVE IDs, and queries are validated before any API call
API key protection -- keys are never exposed in error messages or logs
Docker-first -- single command to build and run
Works with all MCP clients -- Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, Cline
Example Prompts
Once connected, use natural language in your AI client:
"What's my external IP address?"
"What are the details of CVE-2021-44228?"
"Search for CVEs related to Apache HTTP Server sorted by EPSS score"
"Look up CPE identifiers for nginx"
"Do a quick InternetDB lookup on my server's IP"
"What DNS records exist for my company's domain?"
"Resolve the hostname myapp.example.com to an IP address"
"What search filters are available in Shodan?"
"Check my Shodan API plan and remaining query credits"
Installation
Docker (recommended)
docker build -t shodan-mcp https://github.com/vorotaai/shodan-mcp.gitUsing uv
git clone https://github.com/vorotaai/shodan-mcp.git
cd shodan-mcp
uv sync --all-groups
shodan-mcpUsing pip
git clone https://github.com/vorotaai/shodan-mcp.git
cd shodan-mcp
pip install .
shodan-mcpUsage with MCP Clients
shodan-mcp works with all major MCP clients: Claude Desktop, Claude Code, Cursor, VS Code Copilot, Windsurf, and Cline.
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"shodan-mcp": {
"command": "docker",
"args": ["run", "--rm", "-i", "-e", "SHODAN_API_KEY", "shodan-mcp"],
"env": {
"SHODAN_API_KEY": "your-api-key-here"
}
}
}
}Claude Code
claude mcp add shodan-mcp -e SHODAN_API_KEY=your-api-key-here -- docker run --rm -i -e SHODAN_API_KEY shodan-mcpCursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"shodan-mcp": {
"command": "docker",
"args": ["run", "--rm", "-i", "-e", "SHODAN_API_KEY", "shodan-mcp"],
"env": {
"SHODAN_API_KEY": "your-api-key-here"
}
}
}
}VS Code / VS Code Insiders
Add to .vscode/mcp.json:
{
"servers": {
"shodan-mcp": {
"command": "docker",
"args": ["run", "--rm", "-i", "-e", "SHODAN_API_KEY", "shodan-mcp"],
"env": {
"SHODAN_API_KEY": "your-api-key-here"
}
}
}
}Windsurf / Cline
Use the same configuration as Claude Desktop. Refer to your client's documentation for the config file location.
Recommended Workflow
Free quick scan -- Use
shodan-internetdb-lookupfor instant IP intelligence (no key needed)Vulnerability research -- Use
shodan-cve-lookupandshodan-search-cvesto research CVEs (free)Deep reconnaissance -- Use
shodan-ip-lookupfor full host details (API key)Discover exposed hosts -- Use
shodan-searchandshodan-search-countto find and quantify targetsDNS intelligence -- Use
shodan-dns-resolve,shodan-dns-reverse, andshodan-domain-infoFilter honeypots -- Use
shodan-honeypot-scoreto identify deceptive hosts
Configuration
Variable | Default | Description |
| (none) | Shodan API key. Required for 16 tools, not needed for 4 free tools. Get one at account.shodan.io. |
|
| Logging level (DEBUG, INFO, WARNING, ERROR) |
Security
Authorization is required. While Shodan queries are passive, you must still ensure:
You have explicit authorization to investigate any target
You comply with all applicable laws and organizational policies
You use this tool only for legitimate security research, authorized assessments, or defensive operations
Safety Measures
Input validation -- IPs, domains, CVE IDs, hostnames, and queries are validated before any API call
Injection prevention -- Forbidden characters (
;,|,&,$,`, etc.) are blockedNo shell execution -- All HTTP requests use
httpxwith structured parametersAPI key protection -- Keys are passed via environment variables and stripped from error messages
Passive by design -- No packets are sent to any target
FAQ
Do I need a Shodan API key?
Not to get started. 4 tools work immediately with no key: shodan-cve-lookup, shodan-search-cves, shodan-search-cpes, and shodan-internetdb-lookup. A free Shodan API key unlocks the remaining 16 tools -- get one at account.shodan.io.
What MCP clients are supported?
Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline -- any client supporting MCP stdio transport.
Is it safe?
Yes. All queries are passive (no packets to targets), inputs are validated, and API keys are never exposed in error messages.
How is this different from the Shodan website?
shodan-mcp integrates Shodan directly into your AI workflow. Your AI agent queries Shodan, interprets results, correlates findings, and makes recommendations -- all in a single conversation from your IDE.
Contributing
git clone https://github.com/vorotaai/shodan-mcp.git
cd shodan-mcp
uv sync --all-groups
uv run pytestPlease open an issue or pull request on GitHub.
License
Apache License 2.0 -- Copyright (c) Vorota AI
Available Tools
20 toolsshodan-account-profileB
Get your Shodan account profile information.
Returns account membership status, credits, display name, and creation date. Requires a Shodan API key.
Returns: AccountProfileResult with account profile details.
Inputs: timeout. Returns: Shodan account profile information.
shodan-api-infoA
Check your Shodan API key usage — plan type, remaining credits, and limits.
Useful for monitoring API usage and checking remaining query/scan credits. Requires a Shodan API key.
Returns: ApiInfoResult with plan info and remaining credits.
Inputs: timeout. Returns: Shodan API key usage and plan information.
shodan-cve-lookupA
Look up CVE details from Shodan's vulnerability database.
Returns CVSS scores, EPSS exploit prediction scores, references, and affected CPE identifiers. This endpoint is FREE and does NOT require a paid Shodan API key.
Returns: CveResult with detailed vulnerability information.
Inputs: cve_id (required), timeout. Returns: Detailed information about a single CVE from Shodan CVE database.
shodan-dns-resolveA
Resolve hostnames to IP addresses using Shodan's DNS service.
Useful for mapping domain names to IPs before performing IP lookups. Requires a Shodan API key.
Returns: DnsResolveResult with hostname-to-IP mappings.
Inputs: hostnames (required), timeout. Returns: Result of resolving one or more hostnames to IP addresses.
shodan-dns-reverseA
Reverse DNS lookup — find hostnames for IP addresses.
Useful for identifying what domains are hosted on specific IPs. Requires a Shodan API key.
Returns: DnsReverseResult with IP-to-hostnames mappings.
Inputs: ips (required), timeout. Returns: Result of reverse DNS lookup for one or more IPs.
shodan-domain-infoA
Get DNS information about a domain — subdomains, DNS records, and tags.
Powerful for domain reconnaissance and subdomain discovery. Requires a Shodan API key.
Returns: DomainResult with subdomains, DNS records, and domain tags.
Inputs: domain (required), timeout. Returns: DNS information about a domain including subdomains and records.
shodan-honeypot-scoreA
Check if an IP address is likely a honeypot.
Returns a probability score from 0.0 (not a honeypot) to 1.0 (definitely a honeypot). Useful for filtering scan results and identifying deceptive hosts. Requires a Shodan API key.
Returns: HoneypotResult with IP address and honeypot probability score.
Inputs: ip (required), timeout. Returns: Honeypot likelihood score for an IP address.
shodan-http-headersA
Show the HTTP headers your client sends when connecting to a web server.
Useful for debugging and seeing what information your client exposes. Requires a Shodan API key.
Returns: HttpHeadersResult with HTTP header name-value pairs.
Inputs: timeout. Returns: HTTP headers as seen by Shodan when your client connects.
shodan-internetdb-lookupA
Quick, free IP intelligence from Shodan's InternetDB.
Returns open ports, known vulnerabilities, hostnames, CPEs, and tags. This is FREE — no API key required. Faster but less detailed than shodan-ip-lookup.
Returns: InternetDbResult with quick IP intelligence data.
Inputs: ip (required), timeout. Returns: Quick IP intelligence from Shodan InternetDB (free, no API key).
shodan-ip-lookupA
Look up detailed information about an IP address using Shodan.
Returns open ports, services, banners, SSL certificates, geolocation, hostnames, vulnerabilities, and last seen date. This is PASSIVE reconnaissance — no packets are sent to the target.
IMPORTANT: Only query targets you are authorized to assess.
Returns: ShodanHostResult with detailed host information from Shodan's database.
Inputs: target (required), timeout. Returns: Detailed information about a single host from Shodan.
shodan-list-facetsA
List available search facets for Shodan queries.
Facets let you break down search results by property (e.g., country, org, port). Use these with shodan-search-count for result distribution analysis. Requires a Shodan API key.
Returns: SearchFacetsResult with list of available facet names.
Inputs: timeout. Returns: List of available search facets for Shodan queries.
shodan-list-filtersA
List available search filters for Shodan queries.
Filters let you narrow search results (e.g., port:, country:, org:, product:). Use these to discover all available filter options for shodan-search. Requires a Shodan API key.
Returns: SearchFiltersResult with list of available filter names.
Inputs: timeout. Returns: List of available search filters for Shodan queries.
shodan-list-portsA
List port numbers that Shodan crawlers are actively scanning.
Returns the list of ports that the Shodan crawlers are looking for on the Internet. Useful for understanding Shodan's scanning coverage. Requires a Shodan API key.
Returns: PortsResult with list of scanned port numbers.
Inputs: timeout. Returns: List of port numbers that Shodan crawlers scan.
shodan-list-protocolsA
List protocols available for on-demand Shodan scanning.
Returns the protocols that can be used when launching an on-demand scan. Requires a Shodan API key.
Returns: ProtocolsResult with protocol names and descriptions.
Inputs: timeout. Returns: Protocols available for on-demand Shodan scanning.
shodan-my-ipA
Get your current external IP address as seen by Shodan.
Useful for checking what IP address your requests are coming from. Requires a Shodan API key.
Returns: Your external IP address as a string.
Inputs: timeout. Returns: result
shodan-parse-queryA
Parse and analyze a Shodan search query into its components.
Breaks down a query into attributes, filters, errors, and the remaining search string. Useful for debugging complex queries and understanding how Shodan interprets them. Requires a Shodan API key.
Returns: QueryTokensResult with parsed query components.
Inputs: query (required), timeout. Returns: Parsed/tokenized Shodan search query.
shodan-searchA
Search Shodan's database for hosts matching a query.
Uses Shodan's powerful search syntax to find internet-connected devices and services. Supports filters for port, country, organization, product, version, and more. Requires a paid Shodan API key.
IMPORTANT: Only query targets you are authorized to assess.
Returns: ShodanSearchResult with matching hosts and total result count.
Inputs: query (required), page, timeout. Returns: Result set from a Shodan search query.
shodan-search-countA
Count how many hosts match a Shodan query WITHOUT consuming query credits.
Use this to check result volume before running a full search. Requires a Shodan API key but does NOT consume query credits.
Returns: SearchCountResult with total count.
Inputs: query (required), timeout. Returns: Result of a Shodan search count (total matches without full results).
shodan-search-cpesA
Search CPE (Common Platform Enumeration) identifiers by product name.
Useful for finding exact CPE strings to use in vulnerability lookups. This is FREE — no API key required.
Returns: CpeSearchResult with matching CPE identifiers and total count.
Inputs: product (required), skip, limit, timeout. Returns: Result set from a CVEDB CPE search.
shodan-search-cvesA
Search CVEs in Shodan's vulnerability database with powerful filters.
Filter by CISA KEV catalog, sort by EPSS exploit probability, and filter by date range. This is FREE — no API key required.
Returns: CveSearchResult with matching CVEs and total count.
Inputs: skip, limit, is_kev, timeout, +3 more. Returns: Result set from a CVEDB CVE search.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Each tool targets a distinct Shodan operation or resource. Even related tools like ip-lookup and internetdb-lookup are clearly differentiated by detail level and API requirements, and search vs search-count serve different purposes.
All names share a shodan- prefix and kebab-case, but the internal structure is inconsistent: some are verb-first (shodan-search-cves, shodan-list-facets), others are object-first (shodan-ip-lookup, shodan-cve-lookup), and a few are noun phrases (shodan-domain-info, shodan-account-profile).
With 20 tools, the server is slightly heavy but justified by the breadth of Shodan's API. Each tool covers a distinct capability, though a few utilities like my-ip and http-headers are peripheral.
The toolset covers core Shodan workflows: IP lookup, search, DNS, domain recon, CVE lookup, and account management. The main gap is the lack of a tool to trigger on-demand scans, despite listing available scan protocols.
Maintenance
Related MCP Connectors
Defensive Shodan search and host intelligence MCP using customer-provided SHODAN_API_KEY for
CVE lookups (NVD) and dependency-manifest audits (OSV) for AI agents. No API keys.
CVE lookups (NVD) and dependency-manifest audits (OSV) for AI agents. No API keys.
Threat intel + your scans/findings/Shield posture. CVE, EPSS, KEV, package vuln lookup, DAST.
Related MCP Servers
- 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 gradedqualityAmaintenanceEnables AI agents to perform internet reconnaissance through the Shodan API: looking up IP addresses and domains for open ports, banners, TLS certificates, DNS records, and searching or counting internet-connected devices with facets. It also delivers CVE/CPE vulnerability intelligence, including CVSS scores, EPSS estimates, and KEV status.MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to perform Shodan-powered host reconnaissance, internet-device search, DNS lookups, and CVE/CPE vulnerability intelligence through read-only tools.MIT
- AlicenseNot gradedqualityAmaintenanceProvides AI agents with Shodan-powered host and device reconnaissance, DNS lookups, and CVE/CPE vulnerability intelligence, including EPSS and KEV status.MIT