Shodan MCP Server

A Model Context Protocol (MCP) server for interacting with the Shodan API. This server provides a WebSocket interface for querying Shodan's

Local serverstdio

What is the Shodan MCP server?

Shodan mcp server lets Claude, Cursor and other MCP clients work with Shodan directly. A Model Context Protocol (MCP) server for interacting with the Shodan API. This server provides a WebSocket interface for querying Shodan's database of internet-connected devices and vulnerabilities.

What Shodan does

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.

The shodan-mcp-server provides a simple way to integrate Shodan intelligence into your applications using the Model Context Protocol (MCP). It exposes several tools that allow you to query Shodan for various types of information.

Tools it exposes

Once connected, the assistant can call this tool directly:

  • search — A JSON object containing a list of devices matching the query

Installing the shodan mcp server

The server is distributed via npm as @modelcontextprotocol/sdk, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.

Configuration

Before the server will start you need to supply one environment variable: SHODAN_API_KEY. Keep credentials in your client's env block or a secrets manager rather than committing them.

Where it fits

Database servers turn schema archaeology and ad-hoc reporting into conversation, which is why they tend to be the second or third server people install. Shodan sits in that group, and the shape of its toolset — search — tells you what it is really for. Worth comparing against the other databases servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • It will not start until its required credentials are present, so set those before wondering why the tools never appear.
  • Maintained by X3r0K.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the shodan mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
searchA JSON object containing a list of devices matching the query.

How to install the Shodan MCP server

{
  "mcpServers": {
    "shodan": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/sdk"],
      "env": {
        "SHODAN_API_KEY": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
SHODAN_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Shodan to search.

Frequently asked questions

It connects Shodan to MCP-compatible AI assistants such as Claude and Cursor, exposing 1 tool (search) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Shodan directly.