Shodan MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Shodan MCP Serversearch for exposed SSH servers in 192.168.1.0/24"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Shodan MCP Server
An MCP (Model Context Protocol) server that exposes the Shodan API as MCP tools. Built with FastMCP and the official shodan-python library.
Setup
cp .env.example .env # add your SHODAN_API_KEY
pip install -r requirements.txt
python server.pyRelated MCP server: Shodan MCP Server
Tools
30 tools across 9 categories:
Core Search
Tool | Description |
| Search Shodan hosts (query, page, limit, offset, facets, fields) |
| Get all info on an IP address |
| Get result count for a query |
| List available search filters |
| Parse and analyze a search query |
| List available search facets |
| List ports Shodan crawls |
| List on-demand scan protocols |
| List service name to port mappings |
| Get API key info and credits |
DNS
Tool | Description |
| Get DNS records for a domain |
IP Tools
Tool | Description |
| Get your current public IP |
| Honeypot probability (0.0–1.0) |
Community Queries
Tool | Description |
| List shared community queries |
| Search community queries |
| List query tags |
Scanning
Tool | Description |
| Submit IPs/netblocks for scanning |
| Check scan status |
| List previous scans |
| Scan the internet for a port/protocol |
Alerts / Monitoring
Tool | Description |
| Create a network alert |
| List or get alert details |
| Delete an alert |
| List available alert triggers |
Exploits
Tool | Description |
| Search the exploit archive |
| Count exploit results |
Bulk Data
Tool | Description |
| List available datasets |
| List files in a dataset |
Notifiers
Tool | Description |
| List configured notifiers |
| List supported providers |
Error Handling
All tools catch shodan.APIError and return {"error": "<message>"} instead of raising.
Docker
docker compose up -d --buildProject Structure
├── server.py # Entry point — creates FastMCP app, wires up tools
├── tools/
│ └── shodan.py # All 30 tool implementations + Shodan client wrapper
├── AGENTS.md # Context for AI coding assistants
├── requirements.txt
├── .env.example
├── Dockerfile
└── docker-compose.ymlAgent Context
See AGENTS.md for conventions, architecture, and tool registration patterns used in this project.
This server cannot be deployed
Maintenance
Related MCP Connectors
Defensive Shodan search and host intelligence MCP using customer-provided SHODAN_API_KEY for
Shodan MCP — wraps the full Shodan REST API (api.shodan.io)
Shodan InternetDB MCP — wraps Shodan InternetDB (internetdb.shodan.io)
Censys MCP — internet-scan search over the Censys Platform API (censys.com)
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides access to Shodan API functionality, enabling AI assistants to query information about internet-connected devices for cybersecurity research and threat intelligence.2347MIT
- FlicenseNot gradedqualityDmaintenanceIntegrates Shodan search capabilities into MCP-compatible applications for discovering internet-connected devices. Enables domain searches, IP lookups, and advanced queries to identify exposed services, infrastructure mapping, and security analysis.3-
- AlicenseAqualityDmaintenanceEnables comprehensive security reconnaissance, vulnerability assessment, and threat intelligence gathering by integrating Shodan's API. It provides tools for searching internet-connected devices, performing DNS operations, and querying the Shodan exploit database.11Apache 2.0
- AlicenseAqualityDmaintenanceEnables AI agents to perform passive reconnaissance, vulnerability intelligence, DNS analysis, and device search using Shodan's database of internet-connected devices, all from within your IDE.2022Apache 2.0