Shodan MCP Server

Shodan MCP Server

Enables comprehensive security reconnaissance, vulnerability assessment, and threat intelligence gathering by integrating Shodan's API. It provides tools for searching internet-connected devices, performing DNS operations, and querying the Shodan exploit database.

Category
访问服务器

README

Shodan MCP Server (stdio)

Model Context Protocol (MCP) server integration for Shodan API, enabling Claude AI to perform comprehensive security reconnaissance, vulnerability assessment, and threat intelligence gathering.

Features

  • Comprehensive Host Search: Search Shodan's database of internet-connected devices
  • Detailed Host Information: Get in-depth data about specific IP addresses
  • DNS Operations: Forward and reverse DNS lookups
  • Vulnerability Discovery: Find hosts with specific CVEs and security issues
  • Exploit Database: Search for available exploits
  • API Management: Monitor query credits and usage
  • Protocol/Port Information: Access Shodan's supported protocols and ports

Prerequisites

  • Node.js 18.0.0 or higher
  • Shodan API key (Get one here)
  • Claude Desktop or compatible MCP client

Installation

1. Clone and Install Dependencies

cd /path/to/shodan-mcp-server
npm install

2. Get Shodan API Key

  1. Sign up at shodan.io
  2. Navigate to Account
  3. Copy your API key

3. Configure Environment

Create a .env file:

echo "SHODAN_API_KEY=your_api_key_here" > .env

4. Configure Claude Desktop

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "shodan": {
      "command": "node",
      "args": ["/path/to/shodan-mcp-server/src/index.js"],
      "env": {
        "SHODAN_API_KEY": "your_api_key_here"
      }
    }
  }
}

Available Tools

shodan_host_search

Search Shodan for hosts matching a query.

Parameters:

  • query (required): Shodan search query
  • facets (optional): Comma-separated facets for aggregation
  • page (optional): Page number for pagination

Example:

Query: "apache country:US"
Facets: "country,org,port"

shodan_host_info

Get detailed information about a specific IP address.

Parameters:

  • ip (required): IP address to lookup
  • history (optional): Include historical data

Example:

IP: "8.8.8.8"
History: true

shodan_dns_lookup

Resolve domain names to IP addresses.

Parameters:

  • hostnames (required): Array of hostnames

Example:

Hostnames: ["example.com", "google.com"]

shodan_dns_reverse

Perform reverse DNS lookup on IP addresses.

Parameters:

  • ips (required): Array of IP addresses

Example:

IPs: ["8.8.8.8", "1.1.1.1"]

shodan_api_info

Get information about your API plan and remaining credits.

Parameters: None

shodan_exploits_search

Search the Shodan Exploits database.

Parameters:

  • query (required): Search query
  • facets (optional): Facets for aggregation
  • page (optional): Page number

Example:

Query: "CVE-2021-44228"
Facets: "type,platform"

shodan_ports

Get list of ports that Shodan crawls.

Parameters: None

shodan_protocols

Get supported protocols for querying.

Parameters: None

shodan_count

Get total count of results for a query without returning data.

Parameters:

  • query (required): Shodan search query
  • facets (optional): Facets for aggregated counts

shodan_query_search

Search for saved community queries.

Parameters:

  • query (required): Search term
  • page (optional): Page number

shodan_query_tags

Get popular tags for saved queries.

Parameters:

  • size (optional): Number of tags to return (default: 10)

Shodan Query Syntax

Basic Filters

city:"San Francisco"          - Filter by city
country:US                    - Filter by country code
org:"Google"                  - Filter by organization
net:192.168.0.0/24           - Filter by IP range
port:22                       - Filter by port
product:Apache               - Filter by product name
version:2.4.1                - Filter by version
os:"Windows 10"              - Filter by operating system

Vulnerability Filters

vuln:CVE-2021-44228          - Search for specific CVE
vuln:CVE-2020-*              - Search for CVEs from 2020

HTTP Filters

http.title:"Admin Panel"      - Filter by page title
http.html:"password"          - Search in HTML content
http.status:200               - Filter by HTTP status
http.component:"wordpress"    - Filter by web component

SSL Filters

ssl:"example.com"             - Search by SSL certificate
ssl.cert.expired:true         - Find expired certificates
ssl.version:sslv2            - Filter by SSL version
ssl.cipher:export            - Find weak ciphers

Combining Filters

port:22 country:US org:"Amazon"
apache city:"Los Angeles" vuln:CVE-2021-44228

Usage Examples

1. Asset Discovery

// Find all assets for an organization
{
  "query": "org:\"Example Corp\"",
  "facets": "country,port,product"
}

2. Vulnerability Assessment

// Find systems vulnerable to Log4Shell
{
  "query": "vuln:CVE-2021-44228 country:US",
  "page": 1
}

3. Threat Intelligence

// Find potential C2 infrastructure
{
  "query": "product:\"Cobalt Strike\"",
  "facets": "country,org"
}

4. DNS Investigation

// Resolve multiple domains
{
  "hostnames": [
    "example.com",
    "suspicious-domain.com"
  ]
}

5. Exploit Research

// Find exploits for a CVE
{
  "query": "CVE-2021-44228",
  "facets": "type,platform,author"
}

Skills

Three comprehensive skills are included:

1. shodan-recon

Perform reconnaissance and asset discovery. Automates the process of:

  • DNS enumeration
  • Asset discovery
  • Port and service enumeration
  • Detailed host analysis
  • Comprehensive reporting

2. shodan-vuln-scan

Identify and assess vulnerabilities. Includes:

  • CVE discovery
  • Exploit availability checking
  • Risk assessment
  • Remediation recommendations
  • Vulnerability matrix generation

3. shodan-threat-intel

Gather threat intelligence. Capabilities:

  • C2 infrastructure tracking
  • Phishing infrastructure identification
  • Malware distribution point discovery
  • IOC enrichment
  • Threat actor tracking
  • Temporal analysis

Development

Running in Development

npm run dev

Testing Tools

# Test the server manually
node src/index.js

# In another terminal, send test requests
# (requires MCP client for full testing)

Adding New Tools

  1. Add tool definition to TOOLS array in src/index.js
  2. Add case handler in CallToolRequestSchema handler
  3. Update README with new tool documentation

Resources

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选