what is Shodan MCP Server?
Shodan MCP Server is a Model Context Protocol (MCP) server designed for querying the Shodan API and Shodan CVEDB, providing comprehensive access to network intelligence and security services.
how to use Shodan MCP Server?
To use Shodan MCP Server, install it via npm, configure it with your Shodan API key, and run it as a WebSocket server to interact with Shodan's services.
key features of Shodan MCP Server?
- Host Information: Retrieve detailed information about any IP address.
- Search: Utilize Shodan's database with the same query syntax as the website.
- DNS Lookup: Perform DNS resolution for domains.
- CVE Information: Access detailed information about specific CVE vulnerabilities.
use cases of Shodan MCP Server?
- Conducting IP reconnaissance for security assessments.
- Tracking vulnerabilities associated with specific devices.
- Performing DNS lookups for network analysis.
- Searching for devices and services exposed on the internet.
FAQ from Shodan MCP Server?
- What is required to run the Shodan MCP Server?
You need a Shodan API key, which can be obtained by signing up at shodan.io.
- Can I use this server for commercial purposes?
Yes, as long as you comply with Shodan's terms of service.
- Is there a limit to the number of queries I can make?
Query limits depend on your Shodan account type.
Shodan MCP Server
A Model Context Protocol (MCP) server for interacting with the Shodan API. This server provides a WebSocket interface for querying Shodan's database of internet-connected devices and vulnerabilities.
Features
- Host Information: Get detailed information about an IP address
- Search: Query Shodan's database using their search syntax
- DNS Lookup: Resolve domain names
- CVE Information: Get details about specific CVE vulnerabilities
Prerequisites
- Node.js >= 20.0.0
- Docker (optional)
- Shodan API Key
Installation
# Clone the repository
git clone https://github.com/yourusername/shodan-mcp-server.git
cd shodan-mcp-server
# Install dependencies
npm install
Configuration
Set your Shodan API key as an environment variable:
export SHODAN_API_KEY=your_api_key_here # Unix/Linux/macOS
$env:SHODAN_API_KEY="your_api_key_here" # Windows PowerShell
Usage
Running with Node.js
npm start
Running with Docker
# Build the image
npm run build
# Run the container
docker run -e SHODAN_API_KEY=your_api_key_here -p 3000:3000 shodan-mcp-server
The server will start on port 3000 by default. You can change the port by setting the PORT
environment variable.
API Documentation
The server implements the Model Context Protocol (MCP) over WebSocket. Available tools:
host_info
Get all available information for an IP address
{
"tool": "host_info",
"params": {
"ip": "8.8.8.8"
}
}
search
Search Shodan using the same query syntax as the website
{
"tool": "search",
"params": {
"query": "nginx country:\"US\"",
"page": 1,
"limit": 10
}
}
dns_lookup
Get DNS resolution for a domain
{
"tool": "dns_lookup",
"params": {
"domain": "example.com"
}
}
cve_info
Get information about a specific CVE vulnerability
{
"tool": "cve_info",
"params": {
"cveId": "CVE-2021-44228"
}
}
License
MIT