Skip to main content
Glama
berba-q

FAOSTAT MCP Server

by berba-q

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
REDIS_DATABASENoRedis database number.
FAOSTAT_PASSWORDNoFAOSTAT account password. Must be used with FAOSTAT_USERNAME.
FAOSTAT_USERNAMENoFAOSTAT account username (email). Must be used with FAOSTAT_PASSWORD.
FAOSTAT_API_TOKENNoFAOSTAT API token. Either this or FAOSTAT_USERNAME and FAOSTAT_PASSWORD must be provided for authentication.
FAOSTAT_DISK_CACHENoSet to 'false' to disable disk cache.true
REDIS_HOST_IP_ADDRESSNoRedis host IP address for optional caching.
REDIS_HOST_PORT_NUMBERNoRedis host port number.

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

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

Tools

Functions exposed to the LLM to take actions

NameDescription
faostat_pingA

Check the FAOSTAT API health status. Returns a status message indicating if the API is online.

faostat_refresh_tokenA

Force-refresh the FAOSTAT API authentication token.

faostat_setupA

Validate and persist FAOSTAT credentials for automatic authentication across sessions. username is the account email. Saves to the system keychain when available and ~/.config/faostat-mcp/credentials.json (mode 600).

faostat_list_groupsB

List all top-level FAOSTAT data groups (e.g. Production, Trade, Food Security). Use this to discover what categories of data are available.

faostat_groups_and_domainsB

Get the full hierarchical tree of all FAOSTAT groups and their domains. Use this for a complete overview of all available datasets.

faostat_list_domainsC

List all datasets (domains) within a FAOSTAT group.

faostat_get_dimensionsB

Get the structure of a domain — what dimensions (filters) are available, such as area (country), item (commodity), element (measure), and year.

faostat_get_codesA

Browse domain FILTER codes. Prefer faostat_search_codes for named lookups. Element filter codes differ from display codes (QCL: Production filter 2510, display 5510). limit=0 returns all codes.

faostat_search_codesA

Find domain FILTER codes by name (case-insensitive substring). Use before querying unknown codes. A unique match is usable; multiple matches require user selection. Default limit=25; narrow the query when truncated. query must be nonblank.

faostat_get_dataA

Fetch domain data. Resolve filter codes with faostat_search_codes first. Element FILTER codes differ from display codes (QCL Production: filter 2510, display 5510). Filter large queries by area/item/year; check datasize when unsure. Prefer response_format="compact" and fields to save tokens; objects and csv are supported. limit=50; 0 returns all rows. Preserve units when selecting fields.

faostat_get_datasizeA

Estimate the number of rows a data query will return BEFORE fetching. Use this to check if a query is too large before calling faostat_get_data. Accepts the same filter parameters as faostat_get_data.

faostat_get_definitionsB

Get all definitions (descriptions of items, elements, flags) for a domain.

faostat_get_definitions_by_typeC

Get definitions for a domain filtered by type (e.g. items, elements, flags).

faostat_definition_typesA

List all available definition types (used with faostat_get_definition_type for FAO-wide definitions, or faostat_get_definitions_by_type within one domain).

faostat_get_definition_typeA

Get FAOSTAT-wide definitions without a domain. Types include areagroup, area, indicator, element, item, unit, flag; use faostat_definition_types for all types. search filters text columns; limit=100, 0 returns all. response_format: compact (default) or objects. Definition codes are not necessarily query filter codes.

faostat_resolve_nameA

Find FAOSTAT definitions by name when the domain is unknown. kind: region, country, indicator (includes elements/items). definition_code identifies a definition, NOT a domain query filter; use faostat_search_codes for query codes. Exact matches are defined; partial matches require confirmation. no_matching_definition means this lookup found no match, not proof FAO never defines the concept. Narrow truncated matches. Custom constructions require explicit user request and a non-FAO label.

faostat_get_metadataB

Get full methodology and metadata for a domain — including data sources, collection methods, coverage, and limitations.

faostat_get_metadata_printC

Get metadata for a domain in a printable/simplified format.

faostat_list_bulk_downloadsB

List available bulk download files for a domain (ZIP/CSV archives). These contain the full domain dataset and can be very large.

faostat_list_documentsC

List related documents (methodology papers, questionnaires) for a domain.

faostat_get_rankingsB

Rank countries by a domain item/element/year. element_code is a DISPLAY code (QCL Production: 5510), unlike get_data filter code 2510. limit=10. response_format defaults to compact; objects and csv are supported.

faostat_get_report_dataC

Get structured report data from FAOSTAT.

faostat_get_report_headersC

Get the column headers/schema for a report before fetching its data.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3/5.0

Scored across 23 tools

Disambiguation3/5

Several tools overlap heavily in discovery and lookup roles: faostat_get_definitions, faostat_get_definitions_by_type, faostat_get_definition_type, faostat_definition_types, faostat_get_codes, and faostat_search_codes all deal with codes or definitions, requiring careful attention to subtle distinctions. The descriptions do differentiate filter codes from display codes and definition codes from query codes, which helps, but the set remains easy to misselect.

Naming Consistency4/5

Almost all tools use the faostat_ prefix with snake_case and a verb_noun pattern such as faostat_get_data, faostat_list_domains, and faostat_search_codes. The main deviations are noun-phrase names like faostat_definition_types, faostat_groups_and_domains, and faostat_ping, plus inconsistency between faostat_get_definition_type and faostat_definition_types.

Tool Count3/5

At 23 tools, the set is on the heavy side for a data-access server. The domain is complex enough to justify many tools, but authentication, discovery, code lookup, definitions, metadata, and reporting could likely be consolidated, making this borderline rather than well-scoped.

Completeness4/5

The surface covers authentication, group/domain discovery, code lookup, definitions, metadata, data retrieval, rankings, reports, and bulk-download discovery. Minor gaps remain, such as no actual bulk-download retrieval tool and no obvious report-discovery tool beyond fetching headers or data.

Maintenance

ActivityMaintained
ResponsivenessNo issues