sec-shodan-mcp
Provides access to Shodan's IoT search engine API for device search, host intelligence, exploit database, network scanning, and security analysis through natural language.
README
Shodan MCP Server
A Model Context Protocol (MCP) server that provides comprehensive access to the Shodan IoT search engine API. This enables AI assistants to perform network reconnaissance, vulnerability research, and security analysis using Shodan's powerful search capabilities.
Features
- Device Search: Search the Shodan database for internet-connected devices using powerful query syntax
- Host Intelligence: Get detailed information about specific IP addresses including open ports, services, and vulnerabilities
- Exploit Database: Search Shodan's exploit database covering CVE, Exploit-DB, and Metasploit
- Network Scanning: Request on-demand scans of IP addresses and network ranges
- Network Monitoring: Create alerts to monitor IP ranges for changes
- DNS Operations: Perform forward and reverse DNS lookups, enumerate subdomains
- Honeypot Detection: Identify potential honeypots using Shodan's honeyscore algorithm
Prerequisites
- Node.js 18 or higher
- A Shodan API key (get one at account.shodan.io)
Installation
# Clone the repository
git clone https://github.com/schwarztim/sec-shodan-mcp.git
cd sec-shodan-mcp
# Install dependencies
npm install
# Build the project
npm run build
Configuration
Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
{
"mcpServers": {
"shodan": {
"command": "node",
"args": ["/path/to/sec-shodan-mcp/dist/index.js"],
"env": {
"SHODAN_API_KEY": "your-api-key-here"
}
}
}
}
Claude Code
Add to ~/.claude/user-mcps.json:
{
"mcpServers": {
"shodan": {
"command": "node",
"args": ["/path/to/sec-shodan-mcp/dist/index.js"],
"env": {
"SHODAN_API_KEY": "your-api-key-here"
}
}
}
}
Available Tools
Search & Discovery
| Tool | Description |
|---|---|
shodan_search |
Search Shodan for devices matching a query with filters like port:, country:, org:, product:, vuln: |
shodan_host |
Get all information about a specific IP including ports, services, banners, vulnerabilities, and SSL certificates |
shodan_count |
Count search results without consuming query credits |
Exploits Database
| Tool | Description |
|---|---|
shodan_exploits_search |
Search for exploits by CVE, author, platform, type, or port |
shodan_exploits_count |
Count matching exploits without returning individual results |
Network Scanning
| Tool | Description |
|---|---|
shodan_scan |
Request on-demand scan of IP addresses or CIDR ranges |
shodan_scan_status |
Check the status of a previously submitted scan |
shodan_list_scans |
List all active on-demand scans |
Network Alerts
| Tool | Description |
|---|---|
shodan_alert_create |
Create monitoring alerts for IP ranges |
shodan_alert_list |
List all active network alerts |
shodan_alert_get |
Get details for a specific alert |
shodan_alert_delete |
Delete a network alert |
shodan_alert_triggers |
List available alert trigger types |
DNS Operations
| Tool | Description |
|---|---|
shodan_dns_resolve |
Resolve hostnames to IP addresses (forward DNS) |
shodan_dns_reverse |
Look up hostnames for IP addresses (reverse DNS) |
shodan_dns_domain |
Get DNS information for a domain including subdomains |
Security Analysis
| Tool | Description |
|---|---|
shodan_honeyscore |
Calculate probability that an IP is a honeypot (0.0 to 1.0) |
Utility
| Tool | Description |
|---|---|
shodan_ports |
List all ports that Shodan crawls |
shodan_protocols |
List protocols available for on-demand scanning |
shodan_filters |
List all search filters available in Shodan |
shodan_facets |
List facets available for search result breakdowns |
shodan_api_info |
Get API plan info including query and scan credits |
shodan_account_profile |
Get account information for the API key |
shodan_myip |
Get your current public IP address |
Query Library
| Tool | Description |
|---|---|
shodan_saved_queries |
Browse the directory of saved search queries |
shodan_search_queries |
Search the saved query directory |
Usage Examples
Search for Devices
# Find Apache servers in the United States
shodan_search: query="apache country:US"
# Find open SSH servers
shodan_search: query="port:22 product:openssh"
# Find devices vulnerable to Log4Shell
shodan_search: query="vuln:CVE-2021-44228"
# Find webcams with screenshots
shodan_search: query="webcam has_screenshot:true"
# Find industrial control systems
shodan_search: query="tag:ics"
# Find devices by organization
shodan_search: query="org:\"Google LLC\""
Get Host Information
# Get details about a specific IP
shodan_host: ip="8.8.8.8"
# Include historical data
shodan_host: ip="8.8.8.8" history=true
Search Exploits
# Search for Log4j exploits
shodan_exploits_search: query="log4j"
# Find exploits by CVE
shodan_exploits_search: query="cve:CVE-2021-44228"
# Find Metasploit modules
shodan_exploits_search: query="source:metasploit"
DNS Operations
# Resolve hostnames
shodan_dns_resolve: hostnames="google.com,github.com"
# Reverse DNS lookup
shodan_dns_reverse: ips="8.8.8.8,1.1.1.1"
# Get domain information
shodan_dns_domain: domain="example.com"
API Credits
Different Shodan API plans have different credit limits:
- Free accounts: Limited search queries per month
- Search with pagination: Consumes query credits
shodan_count: Does NOT consume credits (use for scoping)- On-demand scanning: Consumes scan credits (1 credit per IP)
- Some filters (like
vuln:) require paid plans
Check your current credits with shodan_api_info.
Development
# Run in development mode
npm run dev
# Build for production
npm run build
# Start the server
npm start
Security Notice
This tool is intended for legitimate security research, penetration testing (with authorization), and network defense purposes. Always ensure you have proper authorization before scanning or probing systems you do not own.
Resources
License
MIT License - see LICENSE for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。