shodan
MCP server by BurtTheCoder Community
mcp-shodan is an MCP server that gives AI agents access to the Shodan API and Shodan CVEDB. It returns open ports, banners, TLS certificates, DNS records and CVE severity for IPs, hostnames, search queries and CVEs.
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 connects AI agents to the Shodan API and Shodan CVEDB. Given an IP, hostname, search query, product or CVE, it returns open ports and banners, TLS certificate details, DNS data, and vulnerability severity with EPSS and KEV status. It offers eleven read-only tools covering host lookups, device search, counts, DNS, and CVE and CPE queries.
The server runs over stdio for desktop clients or as an HTTP streaming service. Tool arguments are validated with zod schemas before requests are built, and the API key is sent only to api.shodan.io. The project is aimed at users who have their own Shodan API key and want an AI assistant to run reconnaissance and vulnerability lookups. It is an independent project and is not affiliated with Shodan.
Written from the project's README and checked against it.
Tools it gives your assistant
ip_lookupReturns ports, products, CVEs, TLS, location and cloud data for one IP address.shodan_searchSearches devices using Shodan query syntax, with paging and facet breakdowns.shodan_countReturns total matches and facet breakdowns for a query without results, at no query cost.domain_infoLists subdomains and DNS records for a domain.dns_lookupResolves many hostnames to IP addresses in one batch call.reverse_dns_lookupReturns hostnames for many IP addresses in one batch call.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 and sortable by EPSS.search_filtersLists valid search filter and facet names for Shodan queries.
What you need
- A Shodan API key from account.shodan.io
- Node.js 20 or newer
- A membership or paid Shodan API plan for filtered shodan_search queries
- Docker, optional, for running the HTTP service
| 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?
- Count Shodan results for this query, broken down by country and port.
- Find subdomains and DNS records for example.com.
Good to know
- The HTTP transport has no authentication and should stay on localhost or behind an authenticating proxy.
- Shodan allows about one request per second, so 429 responses can occur.
- Filtered shodan_search queries require a membership or paid API plan.
- 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 API key?
Yes. The source says you need your own Shodan API key, but CVEDB calls carry no key.
Which tools use query credits?
Filtered shodan_search queries and domain_info use credits. shodan_count, ip_lookup, dns_lookup, reverse_dns_lookup, search_filters, api_info and the CVEDB tools are marked free.
Can mcp-shodan run as a shared web service?
Yes. Setting MCP_TRANSPORT=httpStream runs an HTTP streaming service, but the source warns it has no authentication.
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 BurtTheCoder, 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 81 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.
