About FoFa MCP Server
FoFa MCP Server connects AI assistants to FoFa API functions for querying internet-connected devices and services. It provides database search and account usage information retrieval.
Key features
- 01Search FoFa device and service data
- 02Set query fields and pagination
- 03Retrieve account details and usage
Use cases
- 01Find internet-facing devices matching a query
- 02Review FoFa account information and usage
MCP support
The server exposes FoFa search and user-information functions to MCP-compatible AI assistants.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEFoFa MCP Server
A Model Context Protocol (MCP) server that provides access to FoFa API functionality, allowing AI assistants to query information about internet-connected devices and services.
Features
- Search Capabilities: Search FoFa's database for devices and services based on various queries.
- User Information: Retrieve user information from FoFa, including account details and usage statistics.
Installation
- Clone the repository:
git clone https://github.com/help116114/fofa-mcp-server.git cd fofa-mcp-server - Install dependencies:
npm install - Build the server:
npm run build - Set up your FoFa API key and email:
export FOFA_API_KEY="your-api-key-here" export FOFA_EMAIL="your-email-here" - Start the server:
npm start
MCP Integration
This server can be integrated with Claude or other MCP-compatible AI assistants. To add it to Claude Desktop or Claude.app:
- Add the server to your MCP settings:
{ "mcpServers": { "fofa": { "command": "node", "args": ["/path/to/fofa-mcp-server/build/index.js"], "env": { "FOFA_API_KEY": "your-api-key-here", "FOFA_EMAIL": "your-email-here" } } } } - Restart Claude to load the new MCP server.
Tools
search_fofa
- Description: Search FoFa's database for devices and services.
- Input Schema:
query: FoFa search query (e.g., 'app="Apache HTTP Server"').page: Page number for results pagination (default: 1).size: Number of results per page (default: 100).fields: List of fields to include in the results (e.g., ['ip', 'port', 'title']).
get_user_info
- Description: Get user information from FoFa.
- Input Schema: Input information。
Requirements
- Node.js (version 16 or higher)
- npm (usually comes with Node.js)
- FoFa API key and email
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.