topic
substring filter over code, name, and topic (e.g. "trade", "emissions", "QCL")
How to use it
topic is exposed by the Faostat MCP Server MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the topic tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install Faostat MCP Server
docker run --rm -p 3010:3010 -v faostat-mirror:/usr/src/app/.faostat-mirror faostat-mcp-serverOther tools in Faostat MCP Server (12)
is optional on both tools — omit it to operate on the tables staged in the current session (the common case).
for an exact domain lookup (e.g. "RL") — one full record, without a topic search that can match unrelated domains
Workflow: assemble top producers, the production trend, and trade flows for one commodity from the production and trade domains in a single call.
List the canvas tables staged this session, each with provenance, row count, and column schema.
Run a read-only SQL SELECT against the canvas tables staged by the analytical tools.
Discover FAOSTAT statistical domains with codes, descriptions, last-update date, upstream row count, and local index status. The entry point — every query keys on a domain code.
Query a domain's cube by area(s), item(s), element(s), and year range. Inline preview for small results; large sets spill to a DataCanvas table.
Resolve human terms to the opaque integer codes a query needs (areas, items, elements), flagging each area as a country or an aggregate region.
to list just the domains queryable from the local mirror
caps the inline page (default 200, max 1000); a match that outgrows the page is staged to the canvas table in full, and when no table is staged the response reports how many matched — so a low limit trims the response without putting rows out of reach
+ limit to page the catalog; the response reports totalMatches, truncated, and the nextOffset to resume at. Domain descriptions are long, so a browse call is bounded by default — raise limit (max 200) to pull the whole catalog in one response
Writes, DDL, DROP, COPY, PRAGMA, ATTACH, and external-file table functions are rejected by the framework SQL gate. System catalogs (informationschema, sqlitemaster, duckdb) are denied so a caller can't enumerate staged tables it doesn't hold a handle for — list them via faostatdataframedescribe.