UK ONS MCP Server
A Model Context Protocol (MCP) server for accessing the UK Office for National Statistics (ONS) Beta API.
Fetch official UK government statistics—demographics, economics, social data—straight from your MCP‑compatible assistant, no API key required.
Features
Direct ONS access – no authentication, no tokens
Browse & search every published dataset
Flexible queries – filter observations by geography, time, etc.
Popular dataset shortcuts for CPIH, regional GDP, wellbeing & more
Time‑series & regional comparisons built in
100 % MCP‑SDK TypeScript with robust error handling
Installation
Usage (Claude Desktop)
Available Tools
Tool | Purpose |
| Paginated list of all datasets |
| Metadata for a single dataset |
| Search by keyword |
| Pull observations with dimension filters |
| Convenience wrapper for the newest figures |
Popular Dataset IDs
ID | What it is |
| CPIH (UK inflation) |
| Regional GDP |
| Personal wellbeing |
| UK trade stats |
| Weekly deaths |
Development
Tests and linting:
Contributing
Fork → branch → commit
git pushand open a PRKindly follow the coding style in src/
License
MIT – see LICENSE.
Disclaimer
This project is unofficial and not endorsed by the UK Office for National Statistics. Data usage remains subject to ONS terms.