- Explore MCP Servers
- fofa_MCP
Fofa Mcp
What is Fofa Mcp
fofa_MCP is an asset search tool based on the FOFA platform, designed to retrieve and analyze asset information effectively.
Use cases
Common use cases include querying specific domains or IPs, assessing security risks associated with assets, and formatting results for reporting.
How to use
To use fofa_MCP, install the required dependencies, set up your environment, and utilize the provided API functions to perform asset queries.
Key features
Key features include FOFA asset information retrieval, multi-condition combined queries, security risk assessment suggestions, and batch result formatting.
Where to use
fofa_MCP can be used in cybersecurity, network monitoring, vulnerability assessment, and asset management.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Fofa Mcp
fofa_MCP is an asset search tool based on the FOFA platform, designed to retrieve and analyze asset information effectively.
Use cases
Common use cases include querying specific domains or IPs, assessing security risks associated with assets, and formatting results for reporting.
How to use
To use fofa_MCP, install the required dependencies, set up your environment, and utilize the provided API functions to perform asset queries.
Key features
Key features include FOFA asset information retrieval, multi-condition combined queries, security risk assessment suggestions, and batch result formatting.
Where to use
fofa_MCP can be used in cybersecurity, network monitoring, vulnerability assessment, and asset management.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
FOFA资产搜索工具
功能特性
- FOFA资产信息检索
- 多条件组合查询(域名/IP/端口/网页内容等)
- 安全风险评估建议
- 批量结果格式化输出
技术栈
- Python 3.12
- FastAPI框架
- httpx异步HTTP客户端
- FOFA官方API
安装指南
#下载好uv
# 使用pipx安装(推荐隔离环境)
pip install uv
# 验证安装
uv --version
#拉取代码
git clone https://github.com/hnking-star/fofa_MCP.git
#cuersor或者其他clint配置mcpServers
"mcpServers": {
"fofa-mcp-server": {
"command": "uv",
"args": [
"run",
"--active",
"F:\\ai\\mcp\\fofamcp\\fofa\\fofa.py"
]
}
}
配置key

使用示例

from fofa import get_alerts
# 基本查询
results = await get_alerts(domain="example.com")
# 组合查询
results = await get_alerts(
ip="192.168.1.1",
port="80,443",
body="Apache Tomcat"
)
安全警告
- API密钥需妥善保管
- 遵守FOFA API使用条款
- 禁止进行未授权扫描
- 建议配置请求频率限制
开源协议
FOFA Asset Search Tool
Features
- FOFA asset information retrieval
- Multi-condition combined query
- Security risk assessment
- Batch result formatting
Tech Stack
- Python 3.12
- FastAPI Framework
- httpx Async Client
- FOFA Official API
Installation
# Create virtual environment
python -m venv .venv
# Activate environment
.venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
Usage Example
from fofa import get_alerts
# Basic query
results = await get_alerts(domain="example.com")
# Advanced query
results = await get_alerts(
ip="192.168.1.1",
port="80,443",
body="Apache Tomcat"
)
Security Notice
- Keep API keys secure
- Comply with FOFA API terms
- Unauthorized scanning prohibited
- Recommended request rate limiting
License
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










