Shodan MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Shodan MCP or direct API to search exposed hosts, inspect services, monitor network exposure, and consume collection feeds through natural language.

Shodan logoShodan
Api Key

Shodan is an Internet intelligence service for discovering exposed devices and services. It helps security teams search host data and monitor network exposure.

45 Tools

Try Shodan now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
Shodan
Try asking
TOOLS

Supported Tools

Every Shodan action and event your agent gets out of the box.

Add Alert Notifier

Attach an existing notifier to a paid Shodan network alert.

Add Organization Member

Add a Shodan user to the connected Enterprise organization and upgrade their account, granting organization access.

Count Hosts

Count hosts matching a Shodan search query and optionally return facet counts, without returning banners or consuming query credits for a plain count.

Create Network Alert

Create continuous Shodan monitoring for specified IP addresses or CIDR ranges.

Create Notifier

Create a reusable Shodan notification destination.

Delete Network Alert

Permanently delete a Shodan network alert and stop monitoring its configured IP addresses or CIDR ranges.

Delete Notifier

Permanently delete a Shodan notification service.

Disable Alert Trigger

Disable one or more trigger rules on a paid Shodan network alert.

Enable Alert Trigger

Enable one or more trigger rules on a paid Shodan network alert.

Get Account Profile

Return membership status, credits, display name, username, creation time, and additional profile fields for the owner of the connected Shodan API key.

Get API Plan Information

Return the connected API key's Shodan plan, query and scan credits, monitored-IP allowance, usage limits, and unlocked protocol features.

Get Domain Information

Return one page of subdomains and DNS records for a domain.

Get Execution Egress IP

Return the public source IP address Shodan observes for this API request.

Get Host Information

Return Shodan's current or historical service observations for one IP address.

Get Network Alert

Get one Shodan network alert, including its filters, triggers, and attached notifiers.

Get Notifier

Get one Shodan notification service and its provider-specific destination arguments.

Get Observed Request Headers

Return the HTTP request headers Shodan observes for this Composio API call.

Get Organization

Return the connected account's Shodan organization, administrators, members, member upgrade, authorized domains, and branding.

Get Scan Status

Return the submission or processing status of one Shodan on-demand scan.

Ignore Alert Service

Add one IP:port service to a Shodan network alert trigger's ignore list so matching events no longer notify.

List Alert Triggers

List trigger rules that can be enabled on Shodan network alerts.

List Crawled Ports

List TCP and UDP port numbers currently crawled by Shodan.

List Dataset Files

List downloadable file metadata for one Shodan bulk dataset.

List Datasets

List bulk Shodan datasets available to the connected account.

List Network Alerts

List network alerts on the connected account, optionally including expired alerts.

List Notifier Providers

List supported notification providers and the provider-specific argument names each requires.

List Notifiers

List notification services available on the connected account.

List Saved Queries

Return one page of community-saved Shodan search queries, with optional vote or timestamp ordering.

List Saved Query Tags

List the most popular tags used by community-saved Shodan queries.

List Scan Protocols

List protocol names and descriptions accepted by Shodan on-demand scan requests.

List Scans

Return one page of active and recent on-demand scans for the connected Shodan account.

List Search Facets

List facet names accepted by Shodan host search.

List Search Filters

List filter names accepted in Shodan host-search query syntax.

Remove Alert Notifier

Detach a notifier from a paid Shodan network alert so future matching events are no longer sent through it.

Remove Organization Member

Permanently remove a member from the connected Shodan Enterprise organization and downgrade their account.

Request Internet Scan

Submit an Internet-wide scan for one port and protocol, initiating external network traffic and consuming scan credits.

Request Scan

Submit an asynchronous Shodan scan for specified IP addresses or CIDR ranges.

Resolve Hostnames

Resolve one or more hostnames to IP addresses.

Reverse DNS Lookup

Look up hostnames for one or more IP addresses.

Search Hosts

Return one page of Shodan banners matching a query, with optional facets and field selection.

Search Saved Queries

Return one page of community-saved Shodan queries matching text.

Tokenize Search Query

Parse a Shodan search query into text, filters, attributes, and syntax errors without running the search.

Unignore Alert Service

Remove one IP:port service from a Shodan network alert trigger's ignore list so matching events can notify again.

Update Network Alert

Replace the complete IP and CIDR range list monitored by an existing Shodan network alert.

Update Notifier

Replace provider-specific arguments for an existing Shodan notifier.

SETUP GUIDE

Connect Shodan MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["shodan"],
  mcp: true,
});
Create a session scoped to Shodan and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Search Shodan for exposed Apache servers in the United States",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a Shodan request
SETUP GUIDE

Connect Shodan API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["shodan"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to Shodan
3

Run Shodan tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Search Shodan for exposed Apache servers in the United States" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the Shodan tool calls through the session, and print the final answer

Why Use Composio?

AI Native Shodan Integration

  • Supports both Shodan MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable host searches and service lookups
  • Rich coverage for querying exposed devices, banners, network data, and collection feeds

Managed Auth

  • Connect Shodan with your own API key through a secure credential flow
  • Central place to manage, scope, and revoke Shodan access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Shodan
  • Scoped, least privilege access to Shodan resources
  • Full audit trail of agent actions to support review and compliance

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

Start with Shodan.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Shodan tool your agent needs.Free to start.

Start building