Shodan
This is a Model Context Protocol (MCP) server that provides access to the Shodan API. It allows you to programmatically query Shodan for information about devices, vulnerabilities, and more.
claude mcp add --transport stdio x3r0k-shodan-mcp-server node /path/to/shodan-mcp-server/build/index.js \ --env SHODAN_API_KEY="<your_shodan_api_key>"
How to use
The Shodan MCP Server exposes a set of MCP tools that let you query Shodan for host information, DNS lookups, CVE details, and vulnerability data. You can call these tools through the MCP SDK (e.g., @modelcontextprotocol/sdk) from your application to fetch structured JSON results without interacting with Shodan directly. The available tools are: get_ip_info to retrieve details about a specific IP, dns_lookup to resolve domain names, get_vulnerabilities to list vulnerabilities associated with an IP, cve_info to fetch data for a particular CVE, and search to run Shodan-style queries against devices and services. To use them, configure the MCP server in your MCP settings, then invoke the tools by name (e.g., shodan, get_ip_info) with the appropriate input payloads. The server expects inputs as standard JSON objects, and returns structured JSON responses you can consume in your application.
How to install
Prerequisites:
- Node.js (version 14+ recommended) and npm
- Git
- A Shodan API key
Installation steps:
-
Clone the repository git clone https://github.com/X3r0K/Shodan-MCP-Server.git cd Shodan-MCP-Server
-
Install dependencies npm install
-
Build the project (if applicable) npm run build
-
Obtain and configure your Shodan API key in your MCP settings (see Configuration section in README):
- You should set the SHODAN_API_KEY environment variable when launching the server or via your MCP settings file.
-
Run the server (example) node /path/to/shodan-mcp-server/build/index.js
-
Optional: Add to your MCP settings.json { "mcpServers": { "shodan": { "command": "node", "args": ["/path/to/shodan-mcp-server/build/index.js"], "env": { "SHODAN_API_KEY": "<your_shodan_api_key>" }, "disabled": false, "autoApprove": [] } } }
Additional notes
Tips and considerations:
- Keep your SHODAN_API_KEY secure; do not commit it to version control. Prefer environment variables or secret managers when deploying.
- If you rebuild the project, ensure the built index.js path in the MCP config is updated to the new location.
- The MCP SDK usage example in the README demonstrates calling get_ip_info; other tools (dns_lookup, get_vulnerabilities, cve_info, search) follow the same pattern: use_mcp_tool('shodan', '<tool_name>', <payload>) and handle the JSON response.
- If you encounter rate limits from Shodan, consider caching results where appropriate within your application logic.
- Ensure your MCP client and server timeouts are configured to handle network latency when querying the external API.
- Validate inputs before sending to the MCP server to avoid unnecessary API calls.
- Monitor environment variables for sensitive data and rotate keys as needed.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.