shodan
MCP server by w0h1v Community
Gives AI assistants access to the Shodan API and Shodan CVEDB for host recon, device search, DNS and CVE lookups. Aimed at security analysts who want open ports, banners, TLS details and vulnerability severity from an agent. Requires your own Shodan API key.
Install shodan
Built from the published package, never by AI.
claude mcp add shodan -e SHODAN_API_KEY=YOUR_SHODAN_API_KEY -- npx -y @burtthecoder/mcp-shodanRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"shodan": {
"env": {
"SHODAN_API_KEY": "YOUR_SHODAN_API_KEY"
},
"args": [
"-y",
"@burtthecoder/mcp-shodan"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"shodan": {
"env": {
"SHODAN_API_KEY": "YOUR_SHODAN_API_KEY"
},
"args": [
"-y",
"@burtthecoder/mcp-shodan"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"shodan": {
"env": {
"SHODAN_API_KEY": "YOUR_SHODAN_API_KEY"
},
"args": [
"-y",
"@burtthecoder/mcp-shodan"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add shodan --env SHODAN_API_KEY=YOUR_SHODAN_API_KEY -- npx -y @burtthecoder/mcp-shodan{
"mcpServers": {
"shodan": {
"env": {
"SHODAN_API_KEY": "YOUR_SHODAN_API_KEY"
},
"args": [
"-y",
"@burtthecoder/mcp-shodan"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add shodan npx -y @burtthecoder/mcp-shodanGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the shodan block.
About
mcp-shodan is an MCP server that gives AI agents access to the Shodan API and Shodan CVEDB. Given an IP, hostname, search query, product or CVE, it returns open ports and banners, TLS certificates, DNS records, and vulnerability severity with EPSS and KEV status. It offers eleven read-only tools covering host lookups, device search, subdomains, DNS, and CVE and CPE queries.
It runs over stdio for desktop clients such as Claude Code, Codex CLI and Gemini CLI, or as an HTTP streaming service. Tool arguments are validated with zod schemas, and the API key is sent only to api.shodan.io. The project is independent and not affiliated with Shodan. It suits analysts and developers who want recon data inside an AI assistant.
Written from the project's README and checked against it.
Tools it gives your assistant
ip_lookupPorts, products, CVEs, TLS, location and cloud for one IP, optionally with banner history.shodan_searchSearches devices with Shodan query syntax, with paging and facet breakdowns.shodan_countReturns total matches and facet breakdowns for a query, without results, at no credit cost.domain_infoLists subdomains and DNS records for a domain.dns_lookupResolves hostnames to IPs, in batch.reverse_dns_lookupReturns hostnames for IPs, in batch.cve_lookupGives CVSS, EPSS, KEV, references and affected CPEs for one CVE.cpe_lookupReturns CPE 2.3 identifiers for a product name.cves_by_productLists CVEs for a product or CPE, filterable by KEV and date, sortable by EPSS.api_infoShows your Shodan plan and remaining query and scan credits.
What you need
- Shodan API key from account.shodan.io
- Node.js 20 or newer
- Paid or membership Shodan API plan for search filters
- Docker, optional, for the HTTP transport image
| Setting | Needed | What it is |
|---|---|---|
SHODAN_Environment variable, secret | Required | Your Shodan API key |
From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.
Try asking
- What is exposed on 8.8.8.8, and is CVE-2021-44228 in the KEV catalog?
- How many devices match this Shodan query, before I run the search?
- List CVEs for nginx sorted by EPSS score, filtered to KEV entries.
Good to know
- All eleven tools are read-only.
- The HTTP transport has no authentication, so keep it on localhost or behind an authenticating proxy.
- Shodan allows about one request per second, so you may get 429 errors.
- Independent project, not affiliated with Shodan.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to shodan
All alternatives →Agentmesh MCP Proxy is a security proxy for MCP servers, described by its publisher as a firewall for the Model Context Protocol. It is aimed at teams that run AI agents which call tools and other agents.
Hardens client-side artifacts such as binaries, Electron apps, JS bundles, Python and WebAssembly against AI reverse-engineering agents. Built for developers who ship proprietary logic to user-controlled devices.
Bla Agents is an MCP server and CLI that adds seeded, format-specific decoys to shipped binaries, JavaScript, WebAssembly and other artifacts. It is for developers who ship proprietary logic to user-controlled devices and want to make AI reverse-engineering slower.
A shared OAuth server for the MCP route of an app, built on better-auth, with passkey sign-in for the owner
Agent Governance Toolkit adds policy enforcement, identity, sandboxing and audit logging to autonomous AI agents. It is aimed at teams shipping agents to production. The source does not confirm the Claude Desktop MCP server named in the listing.
Convex MCP Gateway is a Convex component that exposes selected Convex functions as MCP tools. It checks each call with your own authorize callback and writes an audit log. It is for developers who run Convex apps and want AI assistants to call parts of them.
Compare with Agentmesh MCP Proxy, Bla or Bla Agents
shodan: common questions
Does mcp-shodan need a Shodan account?
Yes. You need your own Shodan API key from account.shodan.io to use it.
Which tools use Shodan query credits?
Filtered shodan_search queries cost one query credit plus one per extra page, and domain_info costs one per call. The CVEDB tools, shodan_count, ip_lookup, dns_lookup and reverse_dns_lookup are free.
Is the HTTP streaming transport secure?
The source says the HTTP transport has no authentication. Keep the port on localhost or behind an authenticating reverse proxy, since anyone who can reach it can spend your query credits.
How do I install shodan?
In Claude Code run claude mcp add shodan -e SHODAN_API_KEY=YOUR_SHODAN_API_KEY -- npx -y @burtthecoder/mcp-shodan. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is shodan the official server?
shodan is a community project by w0h1v, not verified by a company domain.
Is shodan free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is shodan safe to use?
It scores 82 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to shodan?
Similar MCP servers: Agentmesh MCP Proxy, Bla, Bla Agents, MCP Auth.
Does shodan work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
