FOFA MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| FOFA_KEY | Yes | FOFA API key. Required; at least fill FOFA_KEY in .env. | |
| FOFA_ENV_FILE | No | Path to alternate credentials file. Absolute path used as-is; relative path resolved relative to project root. Process environment variables take precedence over .env file. | |
| FOFA_MAX_PAGE_SIZE | No | Limits single response page size. | |
| FOFA_MAX_CALL_SECONDS | No | Hard limit on total duration per call. Range 5-600. | 90 |
| FOFA_MAX_TOTAL_RESULTS | No | Limits cumulative total results for the entire service process. | |
| FOFA_RETRY_BACKOFF_SEC | No | Exponential backoff for retryable errors (rate limit/network), respects Retry-After header. Range 0-30. | 0.5 |
| FOFA_MAX_ESTIMATED_FPOINTS | No | Limits cumulative estimated F-points for the entire service process. | |
| FOFA_MAX_REQUESTS_PER_SESSION | No | Limits cumulative requests per service process session. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| fofa_searchA | Run one page of a complete FOFA DSL query. |
| fofa_search_structuredA | Build a FOFA query from common conditions and run one page. |
| fofa_search_nextA | Continue a FOFA cursor query using the previous response's next_token. |
| fofa_statsA | Return FOFA aggregation statistics for a query. Call only when the caller needs distributions such as top titles, countries, ports, or products; do not call automatically after every search. |
| fofa_hostA | Get FOFA host aggregation for one selected IP or hostname. Use after search identifies a priority asset; this is not a bulk replacement for search and should not be called for every result by default. |
| fofa_account_infoA | Get account quota information without exposing API keys. Call when the user requests quota status, before a deliberately large task, or after a quota error. Do not call before every ordinary search. |
| fofa_healthA | Check local configuration without making a remote FOFA request. Use at startup or for installation/configuration diagnosis; it does not consume FOFA quota. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Each tool has a clearly distinct role, and the descriptions explicitly cross-reference when to use alternatives (search vs structured vs next, host vs stats). The search-family trio is well differentiated by intent and the cursor/token flow.
All tools use the fofa_ prefix with consistent snake_case and predictable action suffixes (search, search_structured, search_next, host, stats, account_info, health). The pattern is uniform and readable throughout.
Seven tools is well-scoped for a read-only FOFA search API, with each tool earning its place (query building, pagination, host detail, aggregation, account, health). No redundant or filler tools.
Covers the full lifecycle of a search service: query construction, pagination continuation, asset drill-down, stats, quota, and config health. Only minor gaps exist, such as bulk export/download, which agents can work around.