Skip to main content
Glama

shodan-mcp

Serwer MCP udostepniajacy API Shodan.IO, oparty o FastMCP i oficjalna biblioteke shodan-python.

Wymagania

  • Python 3.13+

  • uv

  • Klucz API Shodan

Related MCP server: Shodan MCP Server

Instalacja

uv sync

Konfiguracja klucza API

Klucz pobierany jest wylacznie ze zmiennej srodowiskowej SHODAN_API_KEY. Nie zapisuj klucza w repozytorium. Do lokalnych testow skopiuj .env.example do .env.

Uruchomienie

Transport: stdio (domyslny dla lokalnego Claude Code / Claude Desktop).

SHODAN_API_KEY=... uv run server.py

Konfiguracja klienta MCP

Przyklad wpisu (.mcp.json lub claude mcp add):

{
  "mcpServers": {
    "shodan": {
      "command": "uv",
      "args": ["run", "--directory", "/home/ra/secra/shodan-mcp", "server.py"]
    }
  }
}

Tool: search

Generalne wyszukiwanie przez API Shodan. Laczy wolny tekst (query) z opcjonalnymi filtrami-dorkami, ktore tool sklada w finalne zapytanie Shodan.

Obslugiwane filtry: org, hostname, net, ip, port, country, city, product, version, os, asn, isp, title (http.title), http_status (http.status), ssl, vuln, tag, after, before, has_screenshot.

Dodatkowe parametry: page (strona wynikow), facets (agregacje, np. port:10,org:5), raw (gdy true, zwraca pelny surowy JSON zamiast przycietego zestawu pol).

Przyklad: query="nginx", country="PL", port=443 -> zapytanie nginx country:PL port:443.

Tool: host

Lookup po adresie IP. Zwraca szczegoly hosta (org, isp, asn, lokalizacja, porty, tagi, podatnosci) oraz liste wykrytych uslug.

Parametry: ip (wymagany), history (pelna historia banerow), minify (okrojony zestaw pol), raw (pelny surowy JSON zamiast przycietego).

Roadmap

Kolejne toole: count (sam licznik), search_cursor (paginacja kursorowa), scan / alerts.

Available Tools

2 tools
hostA

Zwraca szczegolowe informacje o adresie IP z bazy Shodan.

Parametry: ip: adres IP do sprawdzenia. history: gdy True zwraca pelna historie banerow (a nie tylko ostatnie). minify: gdy True prosi Shodan o okrojony zestaw danych (szybciej, mniej pol). raw: gdy True zwraca pelny surowy JSON z Shodan zamiast przycietego.

Zwraca slownik z danymi hosta (org, isp, asn, lokalizacja, porty, tagi, podatnosci) oraz lista wykrytych uslug (services).

ParametersJSON Schema
NameRequiredDescriptionDefault
ipYes
rawNo
minifyNo
historyNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fully bears the burden of behavioral disclosure. It explains the effect of each parameter (history, minify, raw) and describes the return format (dict with fields like org, isp, asn, etc.). It does not mention rate limits or error conditions, but overall provides good transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is reasonably concise, consisting of two paragraphs: a clear purpose statement followed by a parameter list. It is front-loaded with the main purpose, but could be slightly tighter by removing redundant phrasing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that an output schema exists (context signal), the description does not need to fully detail return values, but it still lists key fields. Parameters are explained completely. Missing error handling or example calls, but overall complete for a simple lookup tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description is the sole source of parameter meaning. It explains all four parameters: ip (address to check), history (full history), minify (truncated data), and raw (full JSON). This adds significant value beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states it returns detailed information about an IP address from the Shodan database ('Zwraca szczegółowe informacje o adresie IP z bazy Shodan'). This distinguishes it from the sibling 'search' tool, which likely returns a list of IPs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for looking up a specific IP, but does not explicitly state when to use this tool versus the sibling 'search' tool or provide exclusions. Context is clear but lacks explicit guidance on alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv0.1.0
    • First observedhost
    • First observedsearch

TDQS

A3.9/5.0
Disambiguation5/5

The 'host' and 'search' tools have clearly distinct purposes: one retrieves details for a specific IP, the other performs general queries with filters. No overlap.

Naming Consistency5/5

Both tool names are single lowercase verbs ('host', 'search') following a consistent simple pattern. No mixing of styles.

Tool Count3/5

With only 2 tools, the set feels thin for a comprehensive Shodan interface. While it covers basic operations, more tools (e.g., count, DNS) would improve scope.

Completeness3/5

The tools cover core Shodan functionality (IP lookup and search), but missing common operations like count or streaming. A minor gap for a minimal server.

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/radeksh/shodan-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server