Wraps Shodan's network intelligence and vulnerability APIs to bring internet-wide device discovery into Claude conversations. You can query IP addresses for open ports and services, search for internet-connected devices with Shodan queries, perform DNS lookups, and pull vulnerability data from Shodan's CVEDB including CVE details and CPE mappings. Works across Claude Desktop, Claude Code, Codex CLI, and Gemini CLI. Requires a Shodan API key. Reach for this when you need to investigate network infrastructure, research security vulnerabilities, or analyze internet-facing assets directly from your AI assistant without jumping between tools.
Public tool metadata for what this MCP can expose to an agent.
ip_lookupRetrieve comprehensive information about an IP address, including geolocation, open ports, running services, SSL certificates, hostnames, and cloud provider details if available. Returns service banners and HTTP server information when present.1 paramsRetrieve comprehensive information about an IP address, including geolocation, open ports, running services, SSL certificates, hostnames, and cloud provider details if available. Returns service banners and HTTP server information when present.
ipstringshodan_searchSearch Shodan's database of internet-connected devices. Returns detailed information about matching devices including services, vulnerabilities, and geographic distribution. Supports advanced search filters and returns country-based statistics.2 paramsSearch Shodan's database of internet-connected devices. Returns detailed information about matching devices including services, vulnerabilities, and geographic distribution. Supports advanced search filters and returns country-based statistics.
querystringmax_resultsnumbercve_lookupQuery detailed vulnerability information from Shodan's CVEDB. Returns comprehensive CVE details including CVSS scores (v2/v3), EPSS probability and ranking, KEV status, proposed mitigations, ransomware associations, and affected products (CPEs).1 paramsQuery detailed vulnerability information from Shodan's CVEDB. Returns comprehensive CVE details including CVSS scores (v2/v3), EPSS probability and ranking, KEV status, proposed mitigations, ransomware associations, and affected products (CPEs).
cvestringdns_lookupResolve domain names to IP addresses using Shodan's DNS service. Supports batch resolution of multiple hostnames in a single query. Returns IP addresses mapped to their corresponding hostnames.1 paramsResolve domain names to IP addresses using Shodan's DNS service. Supports batch resolution of multiple hostnames in a single query. Returns IP addresses mapped to their corresponding hostnames.
hostnamesarraycpe_lookupSearch for Common Platform Enumeration (CPE) entries by product name in Shodan's CVEDB. Supports pagination and can return either full CPE details or just the total count. Useful for identifying specific versions and configurations of software and hardware.4 paramsSearch for Common Platform Enumeration (CPE) entries by product name in Shodan's CVEDB. Supports pagination and can return either full CPE details or just the total count. Useful for identifying specific versions and configurations of software and hardware.
skipnumbercountbooleanlimitnumberproductstringcves_by_productSearch for vulnerabilities affecting specific products or CPEs. Supports filtering by KEV status, sorting by EPSS score, date ranges, and pagination. Can search by product name or CPE 2.3 identifier. Returns detailed vulnerability information including severity scores and impa...9 paramsSearch for vulnerabilities affecting specific products or CPEs. Supports filtering by KEV status, sorting by EPSS score, date ranges, and pagination. Can search by product name or CPE 2.3 identifier. Returns detailed vulnerability information including severity scores and impa...
skipnumbercountbooleancpe23stringlimitnumberis_kevbooleanproductstringend_datestringstart_datestringsort_by_epssbooleanreverse_dns_lookupPerform reverse DNS lookups to find hostnames associated with IP addresses. Supports batch lookups of multiple IP addresses in a single query. Returns all known hostnames for each IP address, with clear indication when no hostnames are found.1 paramsPerform reverse DNS lookups to find hostnames associated with IP addresses. Supports batch lookups of multiple IP addresses in a single query. Returns all known hostnames for each IP address, with clear indication when no hostnames are found.
ipsarrayA Model Context Protocol (MCP) server for querying the Shodan API and Shodan CVEDB. This server provides comprehensive access to Shodan's network intelligence and security services, including IP reconnaissance, DNS operations, vulnerability tracking, and device discovery. All tools provide structured, formatted output for easy analysis and integration.
claude mcp add --transport stdio --env SHODAN_API_KEY=your-shodan-api-key shodan -- npx -y @burtthecoder/mcp-shodan
codex mcp add shodan --env SHODAN_API_KEY=your-shodan-api-key -- npx -y @burtthecoder/mcp-shodan
gemini mcp add -e SHODAN_API_KEY=your-shodan-api-key shodan npx -y @burtthecoder/mcp-shodan
To install Shodan Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @burtthecoder/mcp-shodan --client claude
npm install -g @burtthecoder/mcp-shodan
{
"mcpServers": {
"shodan": {
"command": "mcp-shodan",
"env": {
"SHODAN_API_KEY": "your-shodan-api-key"
}
}
}
}
Configuration file location:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonIf you prefer to run from source or need to modify the code:
git clone https://github.com/BurtTheCoder/mcp-shodan.git
cd mcp-shodan
npm install
npm run build
{
"mcpServers": {
"shodan": {
"command": "node",
"args": ["/absolute/path/to/mcp-shodan/build/index.js"],
"env": {
"SHODAN_API_KEY": "your-shodan-api-key"
}
}
}
}
ip_lookupip (required): IP address to lookupshodan_searchquery (required): Shodan search querymax_results (optional, default: 10): Number of results to returncve_lookupcve (required): CVE identifier in format CVE-YYYY-NNNNN (e.g., CVE-2021-44228)dns_lookuphostnames (required): Array of hostnames to resolvereverse_dns_lookupips (required): Array of IP addresses to lookupcpe_lookupproduct (required): Name of the product to search forcount (optional, default: false): If true, returns only the count of matching CPEsskip (optional, default: 0): Number of CPEs to skip (for pagination)limit (optional, default: 1000): Maximum number of CPEs to returncves_by_productcpe23 (optional): CPE 2.3 identifier (format: cpe:2.3:part:vendor:product:version)product (optional): Name of the product to search for CVEscount (optional, default: false): If true, returns only the count of matching CVEsis_kev (optional, default: false): If true, returns only CVEs with KEV flag setsort_by_epss (optional, default: false): If true, sorts CVEs by EPSS scoreskip (optional, default: 0): Number of CVEs to skip (for pagination)limit (optional, default: 1000): Maximum number of CVEs to returnstart_date (optional): Start date for filtering CVEs (format: YYYY-MM-DDTHH:MM:SS)end_date (optional): End date for filtering CVEs (format: YYYY-MM-DDTHH:MM:SS)If you see API key related errors (e.g., "Request failed with status code 401"):
Verify your API key:
Common Error Codes:
Configuration Steps: a. Get your API key from Shodan Account b. Add it to your configuration file:
{
"mcpServers": {
"shodan": {
"command": "mcp-shodan",
"env": {
"SHODAN_API_KEY": "your-actual-api-key-here"
}
}
}
}
c. Save the config file d. Restart Claude Desktop
Testing Your Key:
curl "https://api.shodan.io/dns/resolve?hostnames=google.com&key=your-api-key"
If you see module loading errors:
Build the project:
npm install
npm run build
Test interactively with FastMCP's built-in dev tool:
npx fastmcp dev build/index.js
The server includes comprehensive error handling for:
server.json manifest, CLI install support for Claude Code, Codex, and Gemini CLI@modelcontextprotocol/sdk to FastMCP — modular tool files, automatic schema validation, simplified error handlinggit checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
SHODAN_API_KEY*secretYour Shodan API key
com.mcparmory/google-search
io.github.pipeworx-io/brave-search
marcopesani/mcp-server-serper
brave/brave-search-mcp-server
com.mcparmory/google-search-console
acamolese/google-search-console-mcp