Open Data

ONS Statistics MCP Server

Chat with AI and run tools instantly.

UK Office for National Statistics API providing access to official UK statistical datasets including inflation (CPIH/CPI), GDP, labour market, population, housing, trade, and other economic and social indicators.

Managed
6 tools
Agent guide included

Chat with AI and run tools instantly.

Browse all tools

AI Skill
SKILL.md

Domain knowledge for ONS Statistics — workflow patterns, data models, and gotchas for your AI agent.

ONS Statistics

The Office for National Statistics (ONS) is the UK's largest independent producer of official statistics. This API provides programmatic access to CMD (Customise My Data) datasets.

Data Model

  • Dataset — A named collection of observations (e.g. cpih01 = CPIH inflation). Has editions and versions.
  • Edition — A release track within a dataset (typically "time-series").
  • Version — A numbered snapshot of an edition. The latest version has the most recent data.
  • Dimensions — The axes of a dataset (e.g. time, geography, aggregate). Each version has its own set of dimension options.
  • Observations — Individual data points filtered by dimension values.

Common Datasets

  • cpih01 — CPIH (Consumer Prices Index including owner occupiers' housing costs)
  • mid-year-pop-est — Mid-year population estimates
  • wellbeing-quarterly — Personal well-being quarterly estimates
  • regional-gdp-by-year — Regional GDP estimates

Workflow

  1. Search or list datasets to find the one you need.
  2. Get dataset details and its editions.
  3. List versions of an edition, pick the latest.
  4. List dimensions and their options for that version.
  5. Query observations with specific dimension filters.

Gotchas

  • Observations require all dimensions: Every dimension of the dataset must be specified as a query parameter.
  • Dimension option codes: Use the dimension options endpoint to discover valid codes before querying observations.
  • Search is broad: The search endpoint covers all ONS content (articles, bulletins, datasets), use content_type filter to narrow.
  • No auth: Fully public API with generous rate limits.

Tools in this Server (6)

Ons Get Dataset

Get detailed metadata for a specific ONS dataset by its ID. Returns the dataset title, description, contacts, methodologies, related datasets, release...

Ons Get Observations

Get data observations from a specific ONS dataset version. Requires dimension filters as a query string — all dimensions must be specified. Use ons_li...

Ons List Datasets

List available datasets from the UK Office for National Statistics. Returns dataset IDs, titles, descriptions, and links to editions. Use this to disc...

Ons List Editions

List available editions of an ONS dataset. Most datasets have a single 'time-series' edition. Returns edition names and links to their versions.

Ons List Versions

List versions of a specific ONS dataset edition. Each version is a numbered data release. The highest version number is the most recent. Returns versi...

Ons Search

Search the Office for National Statistics for datasets, bulletins, articles, and time series. Returns matching content with titles, descriptions, and ...

Frequently Asked Questions

What is the ONS Statistics MCP server?

UK Office for National Statistics API providing access to official UK statistical datasets including inflation (CPIH/CPI), GDP, labour market, population, housing, trade, and other economic and social indicators. It provides 6 tools that AI agents can use through the Model Context Protocol (MCP).

How do I connect ONS Statistics to my AI agent?

Add the MCPBundles server URL to your MCP client configuration (Claude Desktop, Cursor, VS Code, etc.). The URL format is: https://mcp.mcpbundles.com/bundle/ons-statistics. Authentication is handled automatically.

How many tools does ONS Statistics provide?

ONS Statistics provides 6 tools that can be called by AI agents, along with a SKILL.md that gives your AI agent domain knowledge about when and how to use them.

What authentication does ONS Statistics require?

ONS Statistics uses open data APIs — no authentication required.

Setup Instructions

Connect ONS Statistics to any MCP client in minutes

https://mcp.mcpbundles.com/bundle/ons-statistics

One-click install:

The link prefills the Add custom connector dialog — you still review the values and click Add, then Connect to complete OAuth.

Or add manually

  1. Open claude.ai → Settings → Connectors.
  2. Click the + button and choose Add custom connector.
  3. Set Name to ONS Statistics and paste the MCP URL into Remote MCP server URL.
  4. Click Add. ONS Statistics will appear under Not connected — select it and click Connect to complete OAuth.
Name: ONS Statistics
Remote MCP server URL: https://mcp.mcpbundles.com/bundle/ons-statistics
Authentication: OAuth

Custom connectors at claude.ai require a paid Claude plan (Pro, Max, Team, or Enterprise).

Try ONS Statistics now

No API key or third-party login required. Chat with AI and run tools instantly.