Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

FofaMap searches internet assets via FOFA. Follow the user's language for briefings and set report_language explicitly when requested; omitting report_language on fofa_render_report/fofa_agent_run follows the saved interface language. CLI smart-field preferences do not rewrite MCP fields; use fofa_fields suggestions and explicit fields. When the user names a product, OA, VPN, middleware, database, camera, CMS or ops panel, call fofa_rules first (no FOFA quota) and use the returned query values verbatim in fofa_search or fofa_stats. Never invent app= names. Empty keywords return a bounded catalog preview and category summary; inspect verified flags and focus with category/keyword. Legacy names have not been reverified. Host aggregation and stats APIs depend on FOFA vip_level; call fofa_account and fofa_fields first (the equivalent Resources are available on hosts that support them). Registered users have no host API; personal/education accounts have no stats API. Stats fields are only protocol, domain, port, title, os, server, country, asn, org, asset_type, fid and icp; product cannot be aggregated. fofa_search rejects invalid syntax locally. Map a requested count onto size (records per page), max_records (total cap) and max_pages. Examples: 只要前30个 means size=30, max_records=30, max_pages=1; 前300条,每页100条 means size=100, max_records=300, max_pages=3. Do not raise a limit the user already stated. Omitting max_records and max_pages returns one page of size, not the full population; read total. Set both caps to fetch more, up to 1000 records and 20 pages. Use fofa_export for a larger file. Heavy return fields lower the effective page size: body to 500; cert/banner/header to 2000. fofa_render_report preserves up to 10000 supplied rows and rejects an inconsistent result_count. fofa_agent_run and fofa_exposure_review stay full unless sample is true. Call fofa_search_next immediately with the same size. An expired cursor (40870) means start a new fofa_search; page 1 is not the next page. A multi-page fofa_search already continues on numbered /search/all pages when its own cursor expires. city is English. region accepts English or Chinese. country accepts a code or the Chinese name. after and before are FOFA update time, not first-seen. Host aggregation is one request per second. Stats aggregation is one request per 5 seconds and returns the published top 5. product.version is a search field for business accounts and above, not a stats field. For a published FOFA hotspot, use the official topic query. A version hit is exposure, not a confirmed vulnerability. Use fofa_search for one exact query. MCP does not need FofaMap's configured model. The host agent parses the request, reflects on the rows, writes the briefing and advice, then calls fofa_render_report. Call fofa_agent_run only when the user explicitly wants FofaMap's own model, and set use_fofamap_model true. Its max_records is the deduplicated total across queries, not a promise to return the whole population. It never scans. fofa_agent_run returns a job immediately; poll fofa_job_status, cancel with fofa_job_cancel and keep this server running. Tool failures carry JSON in isError content text: error/code/api_code/retryable/action/message. Do not treat failures as zero matches. For a named product plus a place, a time window, port stats and a scan preview, call fofa_exposure_review. It returns the full update-time result, port distribution and every default-port target unless sample is true. It never runs Nuclei. A real scan still requires nuclei_plan and an explicit approval. Do not invent coverage ratios from the sample. Validate queries before spending quota. Never plan Nuclei scans without an explicit authorized scope. For scanning, inspect nuclei_capabilities, nuclei_guide and nuclei_templates, then present up to 3 nuclei_recommend commands with reasons. Let the user choose/customize through nuclei_customize before exact plan approval. When AI target selection is enabled, use nuclei_select_targets to review every candidate and record decisions before nuclei_plan. nuclei_execute returns a background job; poll fofa_job_status in the same server. Attach completed scan_job_id in fofa_render_report. For timed mapping use fofa_schedule_create/list/update/set_enabled/stop/delete/history. Show the timezone and resolved next_run. A saved schedule needs a running fofamap-scheduler worker; inspect its heartbeat before promising timed execution. Periodic jobs create snapshots, trend reports and a report index, and never auto-execute active scans.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
fofa_validate_queryA

Perform local syntax checks without spending FOFA quota.

fofa_fieldsB

Return the versioned FOFA field and membership capability catalogue without using quota.

fofa_accountA

Return the current FOFA account tier, API capabilities and quota information.

fofa_searchC

Fetch one exact query. Omitting both caps returns one page of size; read total for the population.

fofa_search_nextA

Continue with the opaque cursor immediately. An expired cursor (40870) is an error; start a new search.

fofa_icon_searchB

Fetch a public website favicon safely, calculate its FOFA MurmurHash3 value, and search matching assets.

fofa_host_profileB

Get FOFA Host aggregation for one IP or DNS name. One request per second. Registered users have no Host API.

fofa_statsC

Aggregate official dimensions. The published contract is the top 5. product cannot be aggregated. Wait 5 seconds between calls.

fofa_syntaxB

Return official FOFA query operators and syntax fields from the API appendix.

fofa_rulesC

Search a bounded rule preview; focus by category/keyword and inspect per-rule verification before product searches.

fofa_exportB

Start a bounded export job; retrieve status and artifact through MCP resources.

fofa_job_statusB

Read local export, agent or scan job state.

fofa_render_reportC

Render host-agent text without calling FofaMap's model. Omitted report_language follows the saved interface language.

fofa_agent_runB

Start an Agent background job with use_fofamap_model=true; returns immediately.

Poll fofa_job_status or cancel with fofa_job_cancel. Never scans. Omitted report_language follows interface language.

fofa_job_cancelA

Cancel an active Agent, Nuclei scan or export job in this server and reclaim its worker. Incurred charges are not refunded.

fofa_exposure_reviewC

Return the full update-time result, port stats and a simulated scan. Set sample only when the user asked for 抽样.

fofa_schedule_createB

Save a passive one-time/interval/hourly/daily/weekly/monthly mapping schedule.

Show timezone/next_run/queries/liveness. check_alive=null follows the current global default; task wording has priority.

fofa_schedule_updateA

Replace a saved schedule's time, task and query specification while retaining history; running tasks cannot be edited.

fofa_schedule_listA

List durable schedules and the scheduler heartbeat. Does not run due tasks.

fofa_schedule_historyC

Read execution history, counts, snapshot changes and MD/HTML/JSON paths.

fofa_schedule_set_enabledA

Pause/resume a schedule; resuming recomputes a future due time.

fofa_schedule_stopA

Stop future runs and request cancellation of the active run (worker polls every second). Preserve history/reports.

fofa_schedule_deleteA

Delete a schedule from active management; cancel its run and retain history/reports in the index archive.

Only call when the user explicitly requests deletion. Deleted tasks cannot be resumed or edited.

nuclei_guideB

Read/cache the installed Nuclei command guide. Executable changes invalidate it; refresh after updates. Does not scan.

nuclei_recommendC

Prepare up to three reasoned, asset-aware commands and typed plans. No plan is approved or executed.

nuclei_select_targetsB

Prepare or validate host-AI target selection. No model/API calls, probing, approval or execution.

First omit decisions to read numbered candidates. Host AI returns decisions {id,action,reason,duplicate_of}. Actions: keep/exclude/duplicate. Shared IP/title cannot merge virtual hosts or different protocols/ports. Missing decisions keep candidates. Present the audit to the user, then approve an exact plan of selected targets.

nuclei_customizeB

Accept CLI flags, e.g. '-rl 10 -c 3', '-pt tcp -id redis-detect -severity info', '-timeout 8 -retries 1'.

Key=value is not supported. Does not execute shell text or approve the plan.

nuclei_templatesA

List installed template IDs, protocol, severity and network ports without scanning. Exact IDs/paths still need an approved plan.

nuclei_capabilitiesA

Inspect the local Nuclei executable, supported template types and non-Web target formats. Does not scan.

nuclei_planB

Create an exact, expiring Nuclei plan and one-time approval token. Scanning must be enabled.

nuclei_executeB

Start an approved exact scan. install_if_missing=true requires separate user consent for official component downloads.

Poll fofa_job_status until completed or failed. Keep the MCP server running.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
fields_resourceCurrent versioned FOFA field catalogue.
runtime_resourceQuota-free version, build and code identity. No account or model calls.
rules_resourceBundled FOFA app= fingerprint library (official names from fofa.info/library).
account_resourceCurrent FOFA account capability and usage data.

TDQS

B3.2/5.0

Scored across 31 tools

Disambiguation4/5

Tools split cleanly into three coherent groups (FOFA search/query, scheduling lifecycle, Nuclei scanning) plus generic job status/cancel, and descriptions distinguish close pairs like fofa_search vs fofa_search_next vs fofa_icon_search. Minor overlap exists between fofa_exposure_review and fofa_stats and between fofa_job_cancel and fofa_schedule_stop, but the boundaries are described well enough for an agent to select correctly.

Naming Consistency4/5

Names use consistent snake_case with stable domain prefixes (fofa_, nuclei_) and a clear verb_noun pattern for actions (fofa_search, fofa_schedule_create, nuclei_select_targets). A few tools are noun-only (fofa_account, fofa_fields, fofa_syntax, fofa_job_status), a minor deviation but still readable and predictable within their group.

Tool Count3/5

At 31 tools this is above the 25-tool threshold and the surface effectively bundles three subsystems (FOFA query engine, durable scheduler, Nuclei scan pipeline) into one server. Almost every tool corresponds to a genuine operation, but the breadth makes the set heavy rather than tightly scoped.

Completeness5/5

Coverage is thorough end-to-end: search pagination via cursors, icon/host/stats/exposure queries, full schedule CRUD plus enable/disable, stop, history and delete, job status/cancel, and a complete Nuclei lifecycle from templates and recommendations through plan, approval token and execute. No obvious dead ends for the stated mapping-and-scanning purpose.

Maintenance

ActivityMaintained
ResponsivenessOutdated data