
FAOSTAT MCP
Pipes the entire FAOSTAT REST API into your MCP client as 21 callable tools. You get direct access to UN data on crop yields, trade flows, food security indicators, and agricultural emissions across 245 countries from 1961 onward. Ships with three-tier caching (in-memory, SQLite, optional Redis) and built-in rate limiting so you don't hammer FAO's servers. The `faostat_setup` tool stores credentials in your system keychain, so you authenticate once and forget about it. Install via PyPI or the MCP registry, then ask Claude or Cursor natural language questions about global agriculture stats without writing a single API call yourself.
- GitHub stars
- 20
- tools
- 23
- auth
- Secret needed
- transport
- STDIO
- env vars
- 3
- last updated
- Oct 2, 2026
Tools
23 toolsPublic tool metadata for what this MCP can expose to an agent.
faostat_pingCheck API health
Check API health
No parameter schema in public metadata yet.
faostat_list_groupsList all data groups
List all data groups
No parameter schema in public metadata yet.
faostat_groups_and_domainsFull domain tree
Full domain tree
No parameter schema in public metadata yet.
faostat_list_domainsDomains within a group
Domains within a group
No parameter schema in public metadata yet.
faostat_get_dimensionsAvailable filters for a domain
Available filters for a domain
No parameter schema in public metadata yet.
faostat_get_codesBrowse all country/item/element filter codes
Browse all country/item/element filter codes
No parameter schema in public metadata yet.
faostat_search_codesSearch codes by name — returns requires_confirmation=true when multiple codes match, forcing the agent to ask you before proceeding
Search codes by name — returns requires_confirmation=true when multiple codes match, forcing the agent to ask you before proceeding
No parameter schema in public metadata yet.
faostat_get_definitionsDomain definitions
Domain definitions
No parameter schema in public metadata yet.
faostat_get_definitions_by_typeDefinitions by type within a domain
Definitions by type within a domain
No parameter schema in public metadata yet.
faostat_definition_typesAll definition types
All definition types
No parameter schema in public metadata yet.
faostat_get_definition_typeFAO-wide definitions for one type, no domain needed (regions/areagroup, countries, indicators, items, units, flags…) with search and limit
FAO-wide definitions for one type, no domain needed (regions/areagroup, countries, indicators, items, units, flags…) with search and limit
No parameter schema in public metadata yet.
faostat_resolve_nameCheck a region, country or indicator name against FAO definitions — returns no_matching_definition when the lookup finds no match
Check a region, country or indicator name against FAO definitions — returns no_matching_definition when the lookup finds no match
No parameter schema in public metadata yet.
faostat_get_metadataFull domain metadata
Full domain metadata
No parameter schema in public metadata yet.
faostat_get_metadata_printPrintable metadata
Printable metadata
No parameter schema in public metadata yet.
faostat_get_dataFetch actual statistics
Fetch actual statistics
No parameter schema in public metadata yet.
faostat_get_datasizeEstimate query result size before fetching
Estimate query result size before fetching
No parameter schema in public metadata yet.
faostat_get_rankingsTop-N country rankings
Top-N country rankings
No parameter schema in public metadata yet.
faostat_get_report_dataReport data
Report data
No parameter schema in public metadata yet.
faostat_get_report_headersReport column headers
Report column headers
No parameter schema in public metadata yet.
faostat_list_bulk_downloadsBulk download file listing
Bulk download file listing
No parameter schema in public metadata yet.
faostat_list_documentsRelated documents
Related documents
No parameter schema in public metadata yet.
faostat_setupFirst-time setup — validate and store credentials securely; subsequent sessions authenticate automatically
First-time setup — validate and store credentials securely; subsequent sessions authenticate automatically
No parameter schema in public metadata yet.
faostat_refresh_tokenManually refresh the API access token
Manually refresh the API access token
No parameter schema in public metadata yet.
Sponsors
Configuration
FAOSTAT_API_TOKENsecretOptional. A FAOSTAT access token from the Developer Portal. Tokens expire after 1 hour, so prefer FAOSTAT_USERNAME + FAOSTAT_PASSWORD, which refresh automatically.
FAOSTAT_USERNAME*FAOSTAT account email (free account at https://www.fao.org/faostat/en/#developer-portal). Used to obtain and refresh tokens automatically.
FAOSTAT_PASSWORD*secretFAOSTAT account password. Used with FAOSTAT_USERNAME to obtain and refresh tokens automatically.
Readme
FAOSTAT MCP Server
Query UN food and agriculture statistics with AI — powered by the Model Context Protocol
Details
- Repository
- github.com/berba-q/faostat-mcp
- Website
- github.com/berba-q/faostat-mcp#readme
- Categories
- Security & Pentesting, Data & Analytics
- Package
faostat-mcp- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active