Ask an AI assistant, with sources
An assistant that fetches UN figures and cites them.
Lesson 6 of 6 · Analyse it in Python
Try it yourself
-
claude mcp add undata -- uvx --from "undata[mcp]" undata-mcp - Python, after
import undata as unprint(un.for_ai(table, task="brief")) # paste into any assistant un.ai_pack(table, "pack.zip") # or upload this
Remember: Give the assistant the data and its sources, then ask what the numbers mean.
Transcript
- A I assistants are quick with numbers. But where do those numbers come from? Connect undata, and the assistant fetches UN statistics itself, with the source in every answer.
- Setup is one entry in the assistant’s settings. In Claude Desktop, add undata as an MCP server. The uv tool fetches Python and the package the first time it runs. In Claude Code, it is a single command.
- The assistant gets fourteen tools. Search indicators, browse the SDG framework, fetch data, and run the same analyses you saw in this series. Every one only reads. None needs an account, or a key.
- Ask which least developed countries are on track to bring maternal mortality below seventy by 2030. The assistant calls undata’s progress tool, with the indicator, the group, and the target. What comes back is the whole table, a summary worked out from the numbers, and the sources, so the answer can cite them.
- And the safeguards travel with it. Ask about Bengal, and the tool refuses to guess, so the assistant has to come back and ask you, instead of answering about somewhere else.
- No connector where you work? un.for_ai turns a table into one message to paste, with its sources and caveats. un.ai_pack makes a zip to upload: the data, a data dictionary, and a prompt.
- That is the series. UN data, with its sources, wherever you work: in a notebook, a spreadsheet, a terminal, or an assistant.