Skip to content
Field Guide

Ask an AI assistant, with sources

An assistant that fetches UN figures and cites them.

1:30 Captions in the video Python AI assistants Recorded 14 October 2026

YouTube
Lesson 6 of 6 · Analyse it in Python The last lesson of this course

Try it yourself

  • claude mcp add undata -- uvx --from "undata[mcp]" undata-mcp

    Claude Code. For Claude Desktop, see the undata page.

  • Python, after import undata as un
    print(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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. That is the series. UN data, with its sources, wherever you work: in a notebook, a spreadsheet, a terminal, or an assistant.

Go deeper

↑ ↓ to move · Enter to open · A match inside a video opens the lesson at the moment the words are said.