/faostat-mcp-server:faostat-guidefrom faostat-mcp-server
Analyze food and agriculture statistics with faostat_* tools. Use for cross-country comparisons, production and trade analysis, and SQL across staged results where coverage, reporting years, aggregate areas, units, or incomplete results affect the conclusion.
Ships in faostat-mcp-server. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use FAOSTAT for historical food and agriculture statistics from the domains available in this deployment's local mirror. Catalog presence does not establish local availability or observation coverage. The query surface is an area/item/element/year cube; do not infer bilateral trade partners or sub-national detail from country trade totals.
Obtain domain codes from faostat_list_domains and area, item, and element identities from faostat_resolve_codes. Pass numeric item codes through item_codes; when code is null, pass the exact code_text through item_codes_text (letters are case-insensitive). Food Balance Sheets items resolve like any other, with kind null. Resolve items and elements in each domain being analyzed; a CPC crosswalk is not an item code. Areas share a vocabulary across domains, so a resolved area alone does not establish observations in the chosen domain. Each area carries FAO's M49 code (m49_code on matches, area_m49 on observations), a string with leading zeros; to join another source, look an area up by it with m49_code on dimension area. The codes are FAO's, with dotted extensions and historical entities' former codes, not ISO numeric codes.
Use the canvas and table identifiers returned by faostat_query_observations or faostat_commodity_profile. A canvas identifier alone does not establish that the latest call staged a table: check the spill status and returned table name.
Use faostat_commodity_profile for a quick production/trade overview of one QCL item; live-animal items, which carry no Production, rank on Stocks, and ranking_elements names the elements and units behind each ranking. If the commodity is ambiguous, resolve and select its identity rather than combining candidates. Its rankings and annual trend aggregate the full filtered mirror match independently of the staged observation table; incomplete staging does not make those summaries partial. A crop traded mostly in processed form (paddy rice 27) shows little or no trade under its own item: find the traded product's TCL code with faostat_resolve_codes (domain TCL, dimension item, a query naming the product) and pass it as trade_item_code. Exporters and importers then rank that item, while producers and the trend stay on the selected one; trade_item names it.
For a controlled comparison, use faostat_query_observations with the intended item, element, countries, and reporting period. For production versus trade, resolve the identities in both domains and check units before comparing. Join staged slices on the dimensions that identify the intended observations, including year, period, and source where present; filter or aggregate each side to the intended grain first so multiple elements, units, or sources do not multiply joined rows.
With DataCanvas on, a first page of faostat_query_observations whose match exceeds limit stages the whole match as a DataCanvas table; without DataCanvas, follow nextOffset to read every page up to offset 100000, and partition a larger match. Call faostat_dataframe_describe for the returned canvas and table before writing SQL, then faostat_dataframe_query with one read-only SELECT. Pass the same canvas identifier to subsequent analytical calls when staging related results beside the first. Read each table's returned expires_at; if it disappears, rerun the source query and use the new identifiers.
Use disjoint year or code selections when partitioning an incomplete retrieval, and verify every partition's completeness before combining it. A dataframe query's truncation instead limits its returned SQL rows: aggregate further or page deterministically with ORDER BY and SQL LIMIT/OFFSET. Keep each SQL page within the tool's response limit.
Send ordinary words to faostat_resolve_codes. Its full-text search applies prefix matching to each distinct word; quotes, parentheses, asterisks, and control characters only separate words, so it accepts no raw FTS operators or quoted-phrase syntax. A blank or * query lists the dimension; any other query made only of quotes, parentheses, asterisks, and whitespace fails invalid_query. The profile's item_query follows the same rule, except that a blank or * item_query names no commodity and fails missing_item without item_code; a label comparison there reads ";" and "," alike ("Peas, dry" selects "Peas; dry"). Use its substring search when token-prefix matching does not express the intended label search, then inspect the candidates before selecting a code.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
faostat-mcp-server@cyanheads is listed by cyanheads/cyanheads — review the source before installing
npx claudepluginhub cyanheads/cyanheads --plugin faostat-mcp-server