UK ONS

Provides access to UK ONS Beta API data via MCP with dataset browse, search, and observations retrieval.
  • typescript

0

GitHub Stars

typescript

Language

6 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "dwain-barnes-uk-ons-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "uk_ons_mcp_server"
      ]
    }
  }
}

You can access UK government statistics directly through an MCP server that connects to the UK ONS Beta API. It lets you browse datasets, filter observations by geography or time, compare regions or time periods, and retrieve up-to-date figures without needing an API key. This makes it easy to power a conversational assistant with reliable official data.

How to use

To use this MCP server, run it locally or in your MCP client setup and connect to the provided server endpoint. You can then browse datasets, search for topics like CPIH or regional GDP, and fetch observations with specific geography and time filters. Use the built‑in time‑series and regional comparison features to compare trends across regions or over multiple years. No authentication is required, so you can query official UK statistics directly through your MCP workflow.

How to install

Prerequisites: you need Node.js and npm installed on your system. You can verify with node -v and npm -v. If you don’t have them, install Node.js from the official website which will also install npm.

npm install -g uk_ons_mcp_server

# Or run without installing globally
npx uk_ons_mcp_server

Additional notes

The server can be started and used via an MCP client configuration. A typical setup demonstrates using a stdio connection with the MCP client, pointing to the local npx execution of the server. You can embed this in your client’s MCP configuration to access the available endpoints for datasets, metadata, and observations.

Available tools

list_datasets

Return a paginated list of all datasets available from the UK ONS MCP server.

get_dataset

Retrieve metadata for a single dataset by its ID.

search_datasets

Search datasets by keywords and filters to find relevant statistics.

get_observation

Fetch observations with specific dimension filters such as geography and time.

get_latest_data

Obtain the newest figures for a dataset in a convenient wrapper.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational