What you can do with StatsWales

Built for

Policy analysts, journalists, researchers, and local government staff working with Welsh official statistics

Example workflows

Housing catalog

Topic + dataset discovery across homelessness, stock, and affordability.

Try this

Using StatsWales, what housing statistics does the Welsh Government publish?

NHS waiting times

Health topic search leading to A&E and RTT datasets.

Try this

Using StatsWales, what NHS health and A&E waiting time statistics are available for Wales?

School pupils

Metadata + filtered view on PLASC-style pupil counts.

Try this

Using StatsWales, how many secondary school pupils are there in Wales?

Local authority unemployment

Terse keyword search; tests title matching and LA breakdowns.

Try this

welsh unemployment by local authority

AI Skill
SKILL.md

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

StatsWales

StatsWales is the Welsh Government's official statistics portal. The v1 API provides structured access to 700+ published datasets across 11 topics.

Recommended tool order (do not page the full catalog in code)

  1. stats_wales_topics — drill from a topic_id (Housing 56, Health 6, Education 3, Crime 8, Environment 23, Economy 1) to find dataset UUIDs in that subject area.
  2. stats_wales_datasets with query — title search when you know keywords (e.g. query="A&E waiting", query="pupils maintained"). Avoid listing all pages without query.
  3. stats_wales_dataset_metadata — dimensions and column labels for the chosen UUID.
  4. stats_wales_dataset_view — pull rows with filter / sort_by server-side. Do not download huge unfiltered pages into code_execution.

Call these MCP tools directly. Use code_execution only when you need derived analysis on rows already returned.

Topics (top-level)

  1. Business, economy and labour market (topic_id 1)
  2. Crime, fire and rescue (8)
  3. Education and training (3)
  4. Environment, energy and agriculture (23)
  5. Finance and tax
  6. Health and social care (6)
  7. Housing (56)
  8. People, identity and equality
  9. Poverty
  10. Transport
  11. Welsh language

Normalized response shapes

  • stats_wales_datasets — list: {items, total, page, page_size, has_more}; search adds {query, total_catalog, scanned_pages, scan_truncated} (max 50 matches).
  • stats_wales_topics{items, total, topic_id, selected_topic?, parents?}
  • stats_wales_dataset_metadata{dataset_id, dataset, dimensions}
  • stats_wales_dataset_view{items: [{column: value}], columns, total, page, page_size, has_more, filter_applied?, sort_applied?}

View filters (server-side)

Pass filter as an array of {columnName, values[]}. Column names must match view column labels exactly (from metadata or a small unfiltered view sample) — e.g. Local authority, Year group, Year. Values must match display strings in the data (Year Group 7, not Year 7).

Example:

[ {"columnName": "Local authority", "values": ["Cardiff"]}, {"columnName": "Year", "values": ["2024/25"]} ]

Optional sort_by: [{"columnName": "Data values", "direction": "DESC"}].

Pagination

  • List/view: page_number, page_size (view default 25, min 5, max 500 on view).
  • Invalid page_size returns a tool error (upstream validation surfaced).

Intent disambiguation

  • Unemployment — distinguish claimant-count series vs WIMD employment-deprivation indicators; read dataset titles before answering.
  • Renewable energy — installation/project counts vs generation (MWh); check measure column.
  • Crime — StatsWales Crime topic may list fire/rescue datasets; police-recorded crime may be absent. Say so when search and topics return nothing relevant.

Tools in this Server (4)

Stats Wales Dataset Metadata

Get metadata for one StatsWales dataset by UUID. Returns ``{dataset_id, dataset, dimensions}`` including dimension definitions and column labels. Call...

Stats Wales Datasets

List or search StatsWales datasets. Without query: paginated catalog ``{items, total, page, page_size, has_more}``. With query: title search ``{items,...

Stats Wales Dataset View

Query tabular rows for a StatsWales dataset. Supports server-side ``filter`` (columnName + values[]) and optional ``sort_by``. Returns ``{items: [{col...

Stats Wales Topics

Browse StatsWales by topic — use before paging the full dataset catalog. Without topic_id: ``{items: [{id, path, name, ...}], total, topic_id: null}``...

Frequently Asked Questions

What is the StatsWales MCP server?

Welsh Government official statistics API. Search datasets, browse by topic, retrieve metadata, and query filtered paginated views. Covers health, education, housing, crime, economy, transport, environment, and Welsh language statistics. It provides 4 tools that AI agents can use through the Model Context Protocol (MCP).

How do I connect StatsWales 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/stats-wales. Authentication is handled automatically.

How many tools does StatsWales provide?

StatsWales provides 4 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 StatsWales require?

StatsWales uses open data APIs — no authentication required.

Setup Instructions

Connect StatsWales to any MCP client in minutes

MCP URL
https://mcp.mcpbundles.com/bundle/stats-wales

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 StatsWales and paste the MCP URL into Remote MCP server URL.
  4. Click Add. StatsWales will appear under Not connected — select it and click Connect to complete OAuth.
Name: StatsWales
Remote MCP server URL: https://mcp.mcpbundles.com/bundle/stats-wales
Authentication: OAuth

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

Try StatsWales now

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

StatsWales MCP Server & Skill — 4 Tools