Skip to main content
MCP server CX Codex

faostat-mcp-server — Claude Code MCP server for UN FAO statistics

A local SQLite mirror of UN FAOSTAT: production, trade, food security, land use, fertilizer, emissions for 245+ countries since 1961. Agents resolve codes, query cubes, and run SQL over big result sets.

Apache-2.0 2,410 installs ★ 3 updated 2026-10-18

Install into Claude Code · Platform CLI: remote server All methods and platforms ↓
claude mcp add --transport http faostat-mcp-server https://faostat-mcp-server--cyanheads.run.tools
Open on GitHub

What faostat-mcp-server does

This server brings UN food and agriculture statistics into your coding agent. The bulk corpus lands in a local SQLite mirror, and a DataCanvas layer adds a read-only SQL surface on top. Seven tools, one skill resource.

The flow starts with faostat_list_domains, which lists the ~69-domain catalog and marks what is indexed locally. faostat_resolve_codes maps names like maize or milk to the integer codes queries need, flagging countries versus aggregate regions. faostat_query_observations pulls the cube by areas, items, elements, and a year range. Small results come back inline; anything above the limit spills to a DataCanvas table, capped at 50,000 staged rows.

faostat_commodity_profile assembles a commodity snapshot in one call: top producers, production trend, trade flows. Ambiguous names should be resolved through faostat_resolve_codes with domain QCL first. Staged tables expire after a 2-hour TTL, and the opt-in faostat_dataframe_drop tool requires FAOSTAT_DATAFRAME_DROP_ENABLED=true. Data-quality flags travel with every row and are never stripped.

What it helps with

  • find the right FAOSTAT domain by code or topic
  • turn a commodity name into the integer code a query needs
  • fetch observations by country, item, and year range
  • build a single-commodity profile with producers, trend, and trade
  • run SQL over large result sets without leaving the agent

Example prompts for the agent

  • List FAOSTAT domains that are indexed and ready to query
  • Resolve the item code for maize in the QCL domain
  • Pull a commodity profile for wheat: top producers, trend, exports

How to install faostat-mcp-server

Platform CLI: remote server

claude mcp add --transport http faostat-mcp-server https://faostat-mcp-server--cyanheads.run.tools

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about faostat-mcp-server

How do I install faostat-mcp-server in Claude Code?

Point Claude Code at the hosted server: claude mcp add --transport http faostat-mcp-server https://faostat-mcp-server--cyanheads.run.tools.

What does faostat-mcp-server do?

It exposes UN FAOSTAT data to your agent: production, trade, food balances, land use, fertilizer, emissions. The corpus sits in a local SQLite mirror, and large query results can be worked over with SQL through DataCanvas.

How do large result sets work?

Results that exceed the inline limit spill to a staged DataCanvas table. Use faostat_dataframe_describe to see its schema, then faostat_dataframe_query to run a read-only SELECT against it. Tables live for two hours.

Similar MCP servers

All MCP servers for Data and databases →

Project sponsors

Companies that keep this analytics open