UN System Data Commons: Find and Verify Public Statistics with MCP

UN System Data Commons is a public platform that connects statistics from across the United Nations system in a searchable knowledge graph. The new data.un.org launched on September 17, 2026 with natural-language search, while the underlying Google Data Commons ecosystem offers an MCP server that lets compatible agents explore statistical data.

The important promise is not “ask anything and get a final answer.” It is a shorter path from a question to a candidate indicator, its place and time coverage, the original source, and a reviewable table. This guide separates the public website workflow from the MCP workflow and covers exact setup locations, completion checks, limitations, security, and three practical use cases.

What changed

International statistics have traditionally been spread across agency portals, spreadsheets, naming systems, and geographic definitions. UN System Data Commons connects those relationships so that a user can search by topic or place and inspect charts, tables, units, and sources together.

The launch is still an expanding collection, not proof that every UN statistic is already available. The public result pages themselves warn that places can be missing because reporting is incomplete and that a comparison can combine dates to create the most relevant view. Treat coverage and provenance as part of the answer, not as footnotes.

Official statistical records flowing into a connected knowledge graph and then into reviewable tables and charts
Distributed statistics become searchable only after indicators, places, dates, and sources are connected.

The website and MCP solve different jobs

Decisiondata.un.org searchData Commons MCP
Best forA few questions, visual inspection, CSV downloadRepeated multi-place queries, agents, and applications
What you needA browserAn MCP client and a free Data Commons API key
VerifyDisplayed source, year, unit, and missing-place noticeVariable metadata, returned dates, and original sources
BoundarySeveral related indicators may match one questionThe standard endpoint queries the base Data Commons graph

This distinction prevents a common sourcing mistake. The website is the UN-operated exploration experience. The official hosted MCP example connects to api.datacommons.org, the base Data Commons service. UN data may be available there, but you should not label every returned number as a UN figure without checking get_variable_metadata and the source attached to the observation.

What to prepare

  • For web search: a current browser plus a clearly defined topic, geography, and time range.
  • For MCP: a client that supports MCP. The official walkthrough uses Google Antigravity.
  • API access: request a free key for the api.datacommons.org domain at Data Commons API Keys.
  • A review sheet: reserve fields for indicator definition, unit, place, date, source, and missing coverage before you start.

Do not paste the key into a public repository, screenshot, or shared article draft. For a team workflow, keep it in a local configuration or secrets manager and document only the environment-variable or placeholder name.

Find a statistic in the browser

  1. Open data.un.org and phrase the question with a place, measurable indicator, and time intent. “How has maternal mortality changed in Southern Asia?” is more bounded than “Tell me about maternal health.”
  2. Read the result title before reading the number. A search can return a rate, an estimated count, and related service-coverage indicators at the same time.
  3. Check the unit and selected year. A result may use “per 100,000 live births,” while a country comparison may choose the most recent year with broad coverage.
  4. Open the Source link. Record the source name and retrieval date instead of copying an isolated value.
  5. If you download a table, inspect column names, place count, blank values, precision, and units before analysis.

A chart appearing is not the completion criterion. A search is complete when you can state which indicator you used, its unit, geography, year, source, and any missing places.

Connect the hosted MCP server

The official Antigravity instructions put the server configuration in ~/.gemini/config/mcp_config.json. Other MCP clients can use the same endpoint and header in their own configuration format.

{
  "mcpServers": {
    "datacommons-mcp": {
      "serverUrl": "https://api.datacommons.org/mcp",
      "headers": {
        "X-API-Key": "YOUR_DATA_COMMONS_API_KEY"
      }
    }
  }
}
  1. Save the file and restart the client.
  2. In Antigravity, run /mcp tools.
  3. Confirm that tools such as search_indicators, get_variable_metadata, and get_observations appear.
  4. Run /mcp resources and confirm that the server’s place, subregion, and directional-relationship playbooks are visible.
  5. Start with a provenance-aware question, such as: “What population data is available for Canada, how far back does it go, and what are the sources?”

The connection is working when the client can call the tools and return candidate indicators plus metadata. Seeing a server name in settings without a successful tool call is not enough.

Understand the six tools as a research sequence

search_indicators discovers variables and topics for a place. search_child_indicators does the same across contained places, such as countries within a region. get_variable_metadata exposes details such as sources and available dates. After that, get_observations fetches a time series for a place, and get_child_observations fetches observations across contained places. get_multi_entity_observations handles directional relationships, such as trade from one country to another.

A safer order is discover candidates, inspect metadata, retrieve values, align dates and gaps, then interpret. Asking for a finished report first makes it harder to notice which of several similar indicators the agent selected.

A natural-language question separated into place, metric, date, and source checks before human review
Split every question into place, indicator, date, and source, then review coverage before accepting the output.

Write questions with four constraints

  • Place: specify whether you mean a country, region, state, or city.
  • Indicator: prefer a measurable variable such as life expectancy or vaccination coverage over a broad phrase such as “health conditions.”
  • Time: choose a latest value, a defined range, or a common comparison year.
  • Output: request a table, CSV-ready rows, a source list, or a short explanation.

For example, improve “Rank South American countries by life expectancy” to “Compare life expectancy across South American countries using the latest common year where possible; show units, missing countries, and original sources separately.” The second version makes review requirements explicit.

Three practical workflows

1. Fact-check a number in a news draft

Input: the country, indicator, year, and claim in the draft. Process: use the public website to find the candidate indicator, open its source, and compare the observation for the same year. Deliverable: a review row containing the exact indicator name, unit, year, value, source URL, and retrieval date. Check: determine whether the figure is modeled or observed and whether the geographic definition matches the draft. If the year is unavailable, record a mismatch rather than silently substituting a nearby year.

2. Build a country comparison for a nonprofit

Input: target countries and water, education, or health indicators. Process: use MCP to discover variables, prefer a common year, then retrieve observations for contained places. Deliverable: a CSV with value, unit, year, source, and missing-value columns. Check: do not present indicators with different reporting cycles as if they were measured simultaneously. Separate high-missingness indicators from the primary decision table.

3. Prototype a public-data research app

Input: a place and topic selected by the user. Process: expose candidate indicators from search_indicators, let the user select one, and only then retrieve observations. Deliverable: a reviewable table with source links and a download option. Check: keep the API key server-side and distinguish authentication errors, empty results, and unsupported requests in the UI. The official documentation currently lists custom non-geographic entities, events, graph relationship exploration, and chart-formatted output as unsupported.

Cost, security, and data limits

The official setup requires a free Data Commons API key, but that does not make the rest of the workflow free. Your MCP client, model, hosting, or automated runs may have separate pricing and quotas. Test with one indicator and two places before scheduling large recurring queries.

A value returned from an official knowledge graph does not make the agent’s narrative or arithmetic automatically correct. The documentation explicitly recommends double-checking responses. Review unit conversions, regional totals, mismatched years, and any missing-value interpolation against the source and the calculation method.

If you combine public statistics with internal data, also inspect where the client stores prompts, logs, downloads, and credentials. Use the smallest necessary access scope and do not send confidential records merely because the public-data side of the workflow is open.

Troubleshooting order

  1. No tools appear: verify the configuration path, JSON commas and quotes, and whether the client was restarted.
  2. Authentication fails: confirm the key was requested for api.datacommons.org and that the header is exactly X-API-Key. Never paste the real key into chat for debugging.
  3. No suitable indicator: use search_indicators and topic hierarchies before repeatedly rephrasing the final question.
  4. Values conflict: compare source, unit, observation period, and estimate method in variable metadata.
  5. You need a chart: retrieve structured data and visualize it in a separate tool rather than assuming the MCP server returns finished chart objects.

Who should use which path

Start with the website when you need to verify a few questions and visually inspect the results. Add MCP when you must repeat the same evidence-gathering pattern across places or indicators, or when an application needs structured access. Consider self-hosting only when you need a custom Data Commons instance, private datasets, or direct control over deployment and access policy.

For a first run, choose one indicator and two places. Confirm the candidate variable, metadata, observations, and source in that order, then produce one small CSV. Scale only after that sequence is reproducible. If your problem begins with a research paper and repository rather than a public knowledge graph, compare the workflow with the Paper2Agent guide.

Official sources

Sources checked September 19, 2026.

한국어로 이 가이드 읽기

Comments

Popular posts from this blog

OpenAI Agents API: A Practical Guide to Managed Agent Runtimes

Diagram Design: Set Up Claude Code or Codex for Clearer Diagrams

Notion Agent Skills: Turn Repeatable Team Work into Reusable Instructions