Datacommons
v0.2.1Data Commons MCP — harmonised public statistics for places, from Google Data Commons (REST v2).
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
datacommons_find_place
Find the Google Data Commons place id (dcid) for a place name — country, state, county, city, region. Returns candidates with name and place type, e.g. "California" -> geoId/06, "India" -> country/IND. Use the dcid with datacommons_observation or datacommons_child_places. Narrow ambiguous names (Paris, Georgia) with place_type.
| Parameter | Type | Description |
|---|---|---|
_apiKey * | string | Data Commons API key (free). Get one at https://apikeys.datacommons.org |
name * | string | Place name, e.g. "California", "Paris", "Cook County" |
limit | number | Max candidates (default 10, max 25) |
place_type | string | Restrict to one place type, e.g. Country, State, County, City, AdministrativeArea1, EurostatNUTS2 |
datacommons_find_variable
Search Google Data Commons statistical variables by plain-language indicator, e.g. "median household income" -> Median_Income_Household, "unemployment rate" -> UnemploymentRate_Person. Returns variable ids with names and a match score. Use the id as `variable` in datacommons_observation.
| Parameter | Type | Description |
|---|---|---|
_apiKey * | string | Data Commons API key (free). Get one at https://apikeys.datacommons.org |
query * | string | What you want to measure, e.g. "life expectancy", "CO2 emissions per capita" |
limit | number | Max variables (default 10, max 25) |
datacommons_observation
Get the value of one Google Data Commons statistical variable for one place: the latest value (default), the value at a date, or the whole time series. Each value names its original publisher (US Census, World Bank, Eurostat, CDC, ...) and lists how alternate sources differ. Example: variable "Count_Person", place "country/USA".
| Parameter | Type | Description |
|---|---|---|
_apiKey * | string | Data Commons API key (free). Get one at https://apikeys.datacommons.org |
place * | string | Place dcid, e.g. country/USA, geoId/06, Earth (find with datacommons_find_place) |
variable * | string | Statistical variable dcid, e.g. Count_Person, Median_Income_Household (find with datacommons_find_variable) |
date | string | LATEST (default), all (full series), or a date: 2019, 2019-06, 2019-06-30 |
limit | number | With date=all, max observations returned, most recent kept (default 50, max 500) |
datacommons_child_places
Compare one Google Data Commons statistical variable across every child place of a parent — e.g. population of all US states, median income of every county in Texas (geoId/48, County), GDP of every country in Europe. Returns rows sorted by value with names and the publisher of each value.
| Parameter | Type | Description |
|---|---|---|
_apiKey * | string | Data Commons API key (free). Get one at https://apikeys.datacommons.org |
child_type * | string | Child place type, e.g. State, County, City, Country |
parent_place * | string | Parent place dcid, e.g. country/USA, geoId/48, europe, Earth |
variable * | string | Statistical variable dcid, e.g. Count_Person |
date | string | LATEST (default) or a date: 2020, 2020-06 |
limit | number | Max rows (default 50, max 300) |
sort | string | Sort by value (default desc) |