One connection, and your agent can look up real statistics from 85+ official sources — the World Bank, the UN, the ABS, the US Census — instead of answering from memory. Takes about ten minutes, and your agent does most of it.
Go to apikeys.datacommons.org, sign in with Google, and create a key. Free, no card.
api.datacommons.org — the one with api. on the front, not plain
datacommons.org.
Copy the key somewhere you can paste from. You'll need it in about thirty seconds.
In Claude Code or Codex. Replace the last line with your actual key.
Add the Data Commons MCP server for me. The guide is in my kit at mcp/data-commons.md — read it and follow it for whichever tool I'm using. Explain each step before you run it. My API key is: PASTE-YOUR-KEY-HERE
If you haven't installed the kit, the guide is public — swap the second sentence for: "the guide is at github.com/dragonfly-thinking/fluency-agents-and-skills, file mcp/data-commons.md."
Quit the whole application — not just the window, and not just a new chat. Connections are only picked up when the app starts.
In Claude Code, run /mcp — you want datacommons in the list.
Then ask it this:
Using Data Commons, get the latest unemployment rate for Ballarat, Victoria. Give me the exact variable DCID and the provenance URL the tool returned.
Inside Claude Code every failure looks identical — ✘ Failed to connect — so ask
your agent to run the server by hand and read the real error. Paste this:
The Data Commons connection is failing. Run the server by hand so we can see the actual error, then work through the troubleshooting table in mcp/data-commons.md.
| What it says | What it means |
|---|---|
| command not found: uvx | The tool that runs it isn't on your PATH. Your agent knows the fix — it needs the full path instead. |
| DC_API_KEY is not set | The key didn't reach the server. The config entry needs another look. |
| Status: 401 | The key is mistyped — or it was made for the wrong domain. Back to step 1. |
| Ready, but no tools | The server is fine. Either the config went to the wrong file, or the app wasn't fully quit. |
--skip-api-key-validation. It's the first thing a search result
will suggest and it makes things worse — the server then reports ✔ Connected with
a completely invalid key, and every query fails silently instead. If you're tempted to add it,
the key is the problem. Fix the key.
Worth knowing before you put one in a board paper. Data Commons harmonises 180+ datasets from 85+ official sources — genuinely broad, but not complete and not uniform.
Your key lives in a config file on your own machine. That's the normal pattern for
these connections. Still — never copy it into your CLAUDE.md or
AGENTS.md, into a skill, or into any folder that syncs or gets committed.
Good things to ask once it's working: unemployment by country, life-expectancy comparisons, city-level census data, CO₂ emissions over time.