Shodan Intelligence MCP Server
Expose passive ASN, open-port banner lookup, and exposed service asset enrichment as read-only MCP resources.
Prerequisites & Step-by-Step Installation
Copy & run inside isolated labBefore You Start (Prerequisites)
- + Read-only Shodan API key stored outside git repositories
- + Node.js >= 20 or Python >= 3.11 runtime
- + Authorized organizational IP blocks or domain inventory list
Install the official Shodan CLI and verify API quota
pip install shodan
export SHODAN_API_KEY="$YOUR_SCOPED_KEY"
shodan info
Keep SHODAN_API_KEY in OS keychain or environment variables rather than committed JSON files.
Register the read-only passive lookup MCP server
claude mcp add shodan-mcp -e SHODAN_API_KEY="$SHODAN_API_KEY" -- shodan-mcp --read-only --rate-limit 1req/s
Rate limiting avoids unintended API credit exhaustion (OWASP LLM10 protection).
shodan info | grep -E "Query credits|Scan credits"
Client Integration & Configuration Files
Review scope limits before wiringclaude mcp add shodan-intel-mcp-server -- shodan-mcp --read-only --rate-limit 1req/s
{
"mcpServers": {
"shodan-intel-mcp-server": {
"command": "shodan-mcp",
"args": [
"--read-only",
"--rate-limit",
"1req/s"
],
"env": {
"TOOLWAR_SAFE_MODE": "strict",
"AUTH_TOKEN": "YOUR_SCOPED_TOKEN_HERE"
}
}
}
}
{
"mcpServers": {
"shodan-intel-mcp-server": {
"command": "shodan-mcp",
"args": [
"--read-only",
"--rate-limit",
"1req/s"
]
}
}
}
services:
shodan-intel-mcp-server:
image: toolwar-sandbox/mcp-runner:latest
read_only: true
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
How to Use & Defensive Workflow
Authorized assessment protocolTypical Scenario: Audit exposed TLS certificates, open ports, and stale banners across owned ASNs passively without sending a single active probe packet.
- 01. Confirm your API key is loaded via environment variable and inspect remaining query credits.
- 02. Query organizational netblocks or owned domains via the MCP host tool.
- 03. Cross-reference unexpected open ports against cloud firewall rules and decommissioning tickets.
Look up passive Shodan metadata for our owned ASN range, highlight expired TLS certificates or unexpected management ports, and format a remediation table.
Bind the MCP server exclusively inside a read-only workspace or isolated container (`read_only: true`, `--cap-drop=ALL`). Enforce strict CIDR/directory allowlists and never expose local MCP stdio or SSE ports on untrusted network interfaces without mutual authentication.
Technical Architecture & Deployment Brief
Overview & Role in Security Engineering
Shodan Intelligence MCP Server (Security MCP Server) is engineered to support practitioners focused on passive external attack surface inventory, TLS certificate inspection, ASN ownership verification, and zero-packet-touch telemetry correlation. Within the ToolWar ecosystem, it serves as an explicit bridge between AI reasoning layers and verifiable cybersecurity telemetry.
Technical Architecture & Data Flow
The Model Context Protocol (MCP) separates the language model reasoning layer from privileged binary execution. Rather than letting an AI assistant invoke unconstrained shell commands, this server exposes typed, schema-validated read/inspection tools with explicit scope boundaries.
Unlike ad-hoc prompt wrappers that execute unconstrained strings directly in a shell, structured integration enforces typed parameter validation, bounded scope allowlists, and explicit separation between untrusted analyzed artifacts (source files, telemetry logs, network banners, or binary samples) and system-level control instructions.
Recommended Deployment Practice
- Isolate the Execution Boundary: Deploy integrations inside ephemeral containers or dedicated analysis VMs so untrusted repositories, binaries, or HTTP responses cannot affect primary workstations.
- Enforce Least-Privilege Scoping: Use read-only filesystem mounts, non-privileged service tokens, and target CIDR allowlists before enabling interactive assistant sessions.
- Verify Outputs Deterministically: Pair this connector with least-privilege runtime profiles and inspect every returned JSON schema before forwarding findings into automated tickets or dashboards.
Integration & Operational Caveats
- Treat all external content ingested by an LLM (including code comments, HTML titles, log lines, and MCP responses) as potential prompt-injection vectors.
- Review configuration JSON and
SKILL.mdmanifests carefully before binding credentials or running inside automated CI/CD pipelines.