mcp-shodan
MCP server for querying the Shodan API
claude mcp add --transport stdio burtthecoder-mcp-shodan npx -y @burtthecoder/mcp-shodan \ --env SHODAN_API_KEY="your-shodan-api-key"
How to use
The mcp-shodan server exposes a set of tools that integrate Shodan’s network intelligence into your MCP workflow. It provides access to Shodan’s IP reconnaissance, DNS operations, vulnerability data from the CVEDB, and device discovery capabilities. You can query detailed information about IP addresses, perform forward and reverse DNS lookups, search Shodan’s device database, and retrieve CVE information tied to products or CPEs. Each tool returns structured, machine-friendly output designed for easy consumption by other MCP components or automation scripts.
Once the server is running, you can invoke the built-in tools through your MCP client by naming the tool (for example ip_lookup, shodan_search, cve_lookup, dns_lookup, reverse_dns_lookup, cpe_lookup, cves_by_product) and passing the required parameters. Ensure you provide your Shodan API key via the SHODAN_API_KEY environment variable when configuring the server, so requests to Shodan are authenticated and rate-limited appropriately.
How to install
Prerequisites:
- Node.js (v20 or later) and npm
- A valid Shodan API Key
Manually install via npm and configure the server:
- Install the MCP server globally:
npm install -g @burtthecoder/mcp-shodan
- Configure Claude Desktop (example) to use the installed server:
{
"mcpServers": {
"shodan": {
"command": "mcp-shodan",
"env": {
"SHODAN_API_KEY": "your-shodan-api-key"
}
}
}
}
Configuration file locations (examples):
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Alternatively, run from source:
git clone https://github.com/BurtTheCoder/mcp-shodan.git
cd mcp-shodan
npm install
npm run build
- If using the built artifact, configure Claude Desktop to point to the built index:
{
"mcpServers": {
"shodan": {
"command": "node",
"args": ["/absolute/path/to/mcp-shodan/build/index.js"],
"env": {
"SHODAN_API_KEY": "your-shodan-api-key"
}
}
}
}
- Start or reload Claude/Desktop to apply changes.
Additional notes
Tips and common issues:
- Ensure SHODAN_API_KEY is set and valid; invalid keys will generate authentication errors (401/403).
- If you encounter rate-limit errors, check your Shodan credits and adjust usage or apply for higher quota.
- The mcp_config example assumes the MCP server is invoked via npx. If deploying differently, adapt the command and args accordingly (e.g., node with a built index.js).
- When running from source, run npm run build to generate the production index.js used by the node command.
- Keep the API key secure and do not commit it to version control; use environment variables in your deployment configuration.
Related MCP Servers
mcp-knowledge-graph
MCP server enabling persistent memory for Claude through a local knowledge graph - fork focused on local development
osint-tools
MCP server exposing multiple OSINT tools for AI assistants like Claude
frontmcp
TypeScript-first framework for the Model Context Protocol (MCP). You write clean, typed code; FrontMCP handles the protocol, transport, DI, session/auth, and execution flow.
mcp-package-version
An MCP server that provides LLMs with the latest stable package versions when coding
ironcurtain
A secure* runtime for autonomous AI agents. Policy from plain-English constitutions. (*https://ironcurtain.dev)
mcp-bun
Bun Javascript Runtime MCP Server for AI Agents