This MCP server provides a convenient way to access Shodan's network intelligence and security services through Claude Desktop. It offers tools for IP reconnaissance, DNS operations, vulnerability tracking, and device discovery with structured outputs for easy analysis.
The simplest way to install the Shodan MCP server:
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.json
If you prefer to run from source:
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"
}
}
}
}
Retrieves comprehensive information about an IP address.
ip_lookup
ip
(required): IP address to lookupSearch Shodan's database of internet-connected devices.
shodan_search
query
(required): Shodan search querymax_results
(optional, default: 10): Number of results to returnQuery detailed vulnerability information from Shodan's CVEDB.
cve_lookup
cve
(required): CVE identifier in format CVE-YYYY-NNNNN (e.g., CVE-2021-44228)Resolve domain names to IP addresses using Shodan's DNS service.
dns_lookup
hostnames
(required): Array of hostnames to resolvePerform reverse DNS lookups to find hostnames associated with IP addresses.
reverse_dns_lookup
ips
(required): Array of IP addresses to lookupSearch for Common Platform Enumeration (CPE) entries by product name.
cpe_lookup
product
(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 returnSearch for vulnerabilities affecting specific products or CPEs.
cves_by_product
cpe23
(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 encounter API key related errors:
Verify your API key:
Common error codes:
Steps to configure your API key:
To test your key:
curl "https://api.shodan.io/dns/resolve?hostnames=google.com&key=your-api-key"
If you see module loading errors:
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.