← Fluency visuals
AI Fluency · Session 4

Connect Data Commons

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.

You are not editing config files. Step 2 is a prompt. Your agent reads the guide that came with your kit and does the setup itself — including the fiddly parts. Your job is the key, the paste, and the check.
1
Get a free key

Go to apikeys.datacommons.org, sign in with Google, and create a key. Free, no card.

When it asks which domain Choose 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.

2
Paste this to your agent

In Claude Code or Codex. Replace the last line with your actual key.

Paste to Claude Code or Codex
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."

It may ask which app you use. Tell it the one you actually open — Claude Code, the Claude chat app, or Codex. They keep their settings in different places, so it needs to know which to set up.
3
Quit the app, then open it again

Quit the whole application — not just the window, and not just a new chat. Connections are only picked up when the app starts.

4
Check it — properly

In Claude Code, run /mcp — you want datacommons in the list. Then ask it this:

The verification question
Using Data Commons, get the latest unemployment rate for Ballarat, Victoria. Give me the exact variable DCID and the provenance URL the tool returned.
Why such an oddly specific question? Because if you ask something easy — Australia's population — you'll get a confident, correct-looking answer even with nothing connected. The model already knows it. A DCID and a provenance URL can only come from the tool. No DCID, no URL, no connection — whatever the answer says.

If it doesn't work

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:

Paste to your agent
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 saysWhat it means
command not found: uvxThe 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 setThe key didn't reach the server. The config entry needs another look.
Status: 401The key is mistyped — or it was made for the wrong domain. Back to step 1.
Ready, but no toolsThe server is fine. Either the config went to the wrong file, or the app wasn't fully quit.
Don't add --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.

What the numbers are, and aren't

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.