FOFA
基于 MCP (Model Control Protocol)的 FOFA API 查询服务器,提供简单易用的 FOFA 数据查询接口。
What is FOFA?
FOFA is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 基于 mcp (model control protocol)的 fofa api 查询服务器,提供简单易用的 fofa 数据查询接口。
基于 MCP (Model Control Protocol)的 FOFA API 查询服务器,提供简单易用的 FOFA 数据查询接口。
This server falls under the Search & Data Extraction category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- 基于 MCP (Model Control Protocol)的 FOFA API 查询服务器,提供简单易用的 FOFA
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx fofaConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use FOFA
The FOFA MCP Server exposes the FOFA cybersecurity search engine API through the Model Context Protocol, allowing AI assistants to query internet-exposed assets, discover services, and perform reconnaissance directly from a conversation. It supports querying by IP, domain, protocol, and dozens of other FOFA search syntax fields.
Prerequisites
- Python 3.11 or later
- A valid FOFA account with an API key (obtainable from fofa.info)
- pip or Poetry for installing Python dependencies
- An MCP-compatible client such as Claude Desktop or Cursor with Cline extension
Clone the repository
Download the FOFA MCP server source code from GitHub.
git clone https://github.com/intbjw/fofa-mcp-server.git
cd fofa-mcp-serverInstall dependencies
Install required Python packages using pip or Poetry.
# Using pip
pip install -r requirements.txt
# Using Poetry
poetry installObtain your FOFA API key
Log in to your account at fofa.info, navigate to your profile settings, and copy your API key. This key is required to authenticate all search requests.
Configure the MCP client
Add the FOFA server to your MCP client configuration, passing your API key as the FOFA_KEY environment variable.
Verify the connection
Ask your AI assistant to call the fofa_userinfo_tool to confirm authentication is working before running searches.
FOFA Examples
Client configuration
Add this block to your claude_desktop_config.json or Cline MCP settings, replacing YOUR_API_KEY with your actual FOFA key.
{
"mcpServers": {
"fofa-mcp-server": {
"command": "python3",
"args": ["/path/to/fofa-mcp-server/main.py"],
"env": {
"FOFA_KEY": "YOUR_API_KEY"
}
}
}
}Prompts to try
Example prompts to use with Claude once the FOFA server is connected.
- "Search FOFA for Apache servers exposed on port 8080 in Germany"
- "Find all IPs running Elasticsearch without authentication using FOFA"
- "Query FOFA for domain:example.com and return all fields including certificates"
- "Show my FOFA account information and remaining API quota"Troubleshooting FOFA
Authentication error: invalid API key
Double-check the FOFA_KEY value in your MCP config. Keys are case-sensitive and should not include extra whitespace. You can verify your key works by calling the fofa_userinfo_tool first.
Search returns no results or quota exceeded error
FOFA API access is quota-limited based on your subscription tier. Monitor your usage on the FOFA dashboard. Reduce the size parameter (default 50) in searches to conserve quota.
Python version incompatibility
The server requires Python 3.11 or later. Run 'python3 --version' to check. If you are on an older version, install Python 3.11+ via pyenv or your system package manager before re-installing dependencies.
Frequently Asked Questions about FOFA
What is FOFA?
FOFA is a Model Context Protocol (MCP) server that 基于 mcp (model control protocol)的 fofa api 查询服务器,提供简单易用的 fofa 数据查询接口。 It connects AI assistants to external tools and data sources through a standardized interface.
How do I install FOFA?
Follow the installation instructions on the FOFA GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with FOFA?
FOFA works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is FOFA free to use?
Yes, FOFA is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
FOFA Alternatives — Similar Search & Data Extraction Servers
Looking for alternatives to FOFA? Here are other popular search & data extraction servers you can use with Claude, Cursor, and VS Code.
TrendRadar
★ 58.0kA real-time hotspot monitoring and news aggregation assistant that provides AI-powered analysis of trending topics across multiple platforms via the Model Context Protocol. It enables users to track news and receive automated notifications through va
Scrapling
★ 52.7k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!
PDF Math Translate
★ 33.9k[EMNLP 2025 Demo] PDF scientific paper translation with preserved formats - 基于 AI 完整保留排版的 PDF 文档全文双语翻译,支持 Google/DeepL/Ollama/OpenAI 等服务,提供 CLI/GUI/MCP/Docker/Zotero
GPT Researcher
★ 27.2kAn autonomous agent that conducts deep research on any data using any LLM providers
Agent Reach
★ 20.1kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Xiaohongshu
★ 13.7kMCP for xiaohongshu.com
Browse More Search & Data Extraction MCP Servers
Explore all search & data extraction servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up FOFA in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use FOFA?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.