• SEARCH
  • STRUCTURE
  • DATA
  • HUMAN

How to find and extract ONS statistics with your AI

Connect this MCP to your AI client to turn the UK Office for National Statistics catalog into a searchable, queryable database.

Ask AI about this page

Short answer

How can I use AI to get ONS data?

Your AI searches the ONS catalog for specific topics, drills down into dataset dimensions, and pulls the exact numbers you need. You get raw statistical observations without manual browsing. Here is how the process works.

The results of your queries

Where your data lands

Depending on what you ask, your AI delivers different levels of data depth.

SEARCH

Targeted dataset discovery

The AI scans the 337+ available datasets to find the exact topic you're looking for. You get a list of relevant datasets instead of endless scrolling.

STRUCTURE

Dimension mapping

Your AI identifies how the data is organized, such as time periods or geographic regions. This ensures you know exactly what filters are available.

DATA

Precise observations

The AI pulls specific data points and values from the chosen dataset. You get the actual numbers you need for your analysis.

HUMAN

Final interpretation

The AI provides the raw data and metadata. You remain responsible for the final statistical analysis and reporting.

The workflow

What your AI does when you ask for data.

The AI moves from broad searches to specific data points using a sequence of specialized tools.

  1. Locate datasets

    The AI searches the ONS catalog to find datasets that match your specific keywords or topics.

    search_datasets
  2. Inspect dataset structure

    Once a dataset is found, the AI checks its metadata and available filters to understand the scope.

    get_dataset_infoget_dimensions
  3. Identify filter options

    The AI looks at specific dimensions to see what specific categories or timeframes are available for selection.

    get_dimension_options
  4. Extract values

    The AI pulls the actual statistical observations based on the dimensions you've selected.

    get_observations

Try it

Copy these to start.

Use these prompts to begin your research.

Starting points

Replace the bracketed text with your specific research topics or timeframes.

UK ONS Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_fvId9Opua7L9Nik9gCqSg8golmJupaDzpV9JVlBd/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — UK ONS capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "uk-ons-discovery-search-337-statistical-datasets-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_fvId9Opua7L9Nik9gCqSg8golmJupaDzpV9JVlBd/mcp"
    }
  }
}
Copy into chat04
  • Search the ONS catalog for datasets related to [UK inflation rates].

  • Find the dimensions available in the [Consumer Price Index] dataset.

  • Get the statistical observations for [unemployment rates] in [London] for [2023].

  • Show me the available options for the [geography] dimension in the [population] dataset.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect UK ONS Discovery once, then ask.

One click connects this MCP to your AI client. Your credentials stay encrypted, and you can start querying the ONS catalog immediately.

Connect UK ONS Discovery to your AI

FAQ

How the ONS Discovery MCP behaves

  • 01

    Can the AI update or change ONS data?

    No. The AI only reads data from the ONS catalog. It cannot modify any official statistics.

  • 02

    Can the AI download files directly to my computer?

    No. The AI extracts observations and data points into your chat. You must manually save any data you want to keep.

  • 03

    How many datasets can the AI search?

    The AI can search through all 337+ datasets available in the ONS catalog.

  • 04

    Does the AI perform the statistical modeling for me?

    No. The AI pulls the raw observations and metadata. You are responsible for performing the actual statistical modeling or trend analysis.

  • 05

    Can I ask for data from specific years?

    Yes, provided that the specific dataset contains those time dimensions.

  • More questions about UK ONS Discovery? The Connector page answers them. See everything the UK ONS Discovery Connector can do

Connect UK ONS to Claude, Cursor, ChatGPT & more