io.github.daedalus/mcp-shodan
MCP server exposing all Shodan API functionality
Versions
0.1.0latestTools 20
shodan_host Get all available information on an IP. Args: ip: IP address of the computer. history: True if you want to grab the historical banners for the host. minify: True to only return the list of ports and general host information. Returns: A dictionary containing all available information on the IP. Example: >>> shodan_host("1.1.1.1") {"ip": "1.1.1.1", "ports": [443, 80], ...}
shodan_count Returns the total number of search results for the query. Args: query: Search query; identical syntax to the website. facets: A list of properties to get summary information on. Returns: A dictionary with 'total' property and optionally 'facets'. Example: >>> shodan_count("apache") {"total": 1000000, "facets": {...}}
shodan_search Search the SHODAN database. Args: query: Search query; identical syntax to the website. page: Page number of the search results. limit: Number of results to return. offset: Search offset to begin getting results from. facets: A list of properties to get summary information on. minify: Whether to minify the banner. Returns: A dictionary with 'matches' and 'total' properties. Example: >>> shodan_search("apache", limit=10) {"matches": [...], "total": 1000000}
shodan_search_cursor Search the SHODAN database and return an iterator. Args: query: Search query; identical syntax to the website. minify: Whether to minify the banner. retries: How often to retry the search in case it times out. Returns: A list of search results. Example: >>> list(shodan_search_cursor("nginx")) [{...}, {...}]
shodan_alerts List all of the active alerts that the user created. Args: aid: Filter by alert ID. include_expired: Whether to include expired alerts. Returns: A dictionary containing the alerts. Example: >>> shodan_alerts() {"alerts": [...]}
shodan_create_alert Create a new alert. Args: name: Name of the alert. ip: IP address or netblock to monitor. expires: Number of seconds until the alert expires. Returns: A dictionary containing the created alert. Example: >>> shodan_create_alert("My Server", "1.2.3.4") {"id": "alert_123", "name": "My Server", ...}
shodan_delete_alert Delete the alert with the given ID. Args: aid: The ID of the alert to delete. Returns: A dictionary confirming deletion. Example: >>> shodan_delete_alert("alert_123") {"deleted": true}
shodan_scan Scan a network using Shodan. Args: ips: A list of IPs or netblocks in CIDR notation. force: Whether to force re-scan (enterprise only). Returns: A dictionary with scan ID and information. Example: >>> shodan_scan("1.2.3.4/24") {"id": "scan_123", "count": 256, "credits_left": 100}
shodan_scan_internet Scan the internet using Shodan. Args: port: The port that should get scanned. protocol: The name of the protocol. Returns: A dictionary with scan ID and information. Example: >>> shodan_scan_internet("443", "https") {"id": "scan_123"}
shodan_scan_status Get the status information about a previously submitted scan. Args: scan_id: The unique ID for the scan. Returns: A dictionary with status information. Example: >>> shodan_scan_status("scan_123") {"status": "complete", "progress": 100}
shodan_queries List the search queries that have been shared by other users. Args: sort: Sort by 'votes' or 'timestamp'. order: Order 'asc' or 'desc'. Returns: A list of saved search queries. Example: >>> shodan_queries() {"matches": [...]}
shodan_queries_search Search the directory of saved search queries in Shodan. Args: query: The search string to look for. page: Page number to iterate over results. Returns: A list of matching saved search queries. Example: >>> shodan_queries_search("nginx") {"matches": [...]}
shodan_queries_tags Get popular query tags. Args: size: The number of tags to return. Returns: A list of tags. Example: >>> shodan_queries_tags() {"matches": [...]}
shodan_info Returns information about the current API key. Returns: A dictionary with API key information. Example: >>> shodan_info() {"plan": "developer", "credits": 100}
shodan_ports Get a list of ports that Shodan crawls. Returns: An array containing the ports that Shodan crawls for. Example: >>> shodan_ports() [22, 80, 443, ...]
shodan_protocols Get a list of protocols that the Shodan on-demand scanning API supports. Returns: A dictionary containing protocol name and description. Example: >>> shodan_protocols() {"http": "HTTP", "ssh": "SSH"}
shodan_services Get a list of services that Shodan crawls. Returns: A dictionary containing ports and service names. Example: >>> shodan_services() {"80": "http", "443": "https"}
shodan_exploits_count Search the Shodan Exploits archive and return total count. Args: query: The exploit search query. facets: A list of properties to get summary information on. Returns: A dictionary with total count and facets. Example: >>> shodan_exploits_count("cve:2024") {"total": 1000, "facets": {...}}
shodan_exploits_search Search the Shodan Exploits archive. Args: query: The exploit search query. page: The page number to access. facets: A list of properties to get summary information on. Returns: A dictionary containing the results. Example: >>> shodan_exploits_search("cve:2024") {"matches": [...], "total": 1000}
shodan_search_tokens Returns information about the search query itself. Args: query: Search query; identical syntax to the website. Returns: A dictionary with filters, errors, attributes and string. Example: >>> shodan_search_tokens("apache port:80") {"filters": ["port:80"], "errors": [], ...}
Permissions 2
filesystem low env_vars low