ONS Discovery MCP. Query 337+ UK Stats Datasets by ID and Filter.
Works with every AI agent you already use
…and any MCP-compatible client
Just plug in your AI agents and start using Vinkius.
UK ONS Discovery — Search 337+ Statistical Datasets gives your AI agent direct access to the full Office for National Statistics catalog.
You search by keyword, browse metadata, validate filter variables using `get_dimension_options`, and execute flexible queries against any dataset ID. This handles all aspects of UK statistics—from housing prices to employment rates—in one place.
What your AI agents can do
Get dataset info
Retrieves the detailed metadata for a dataset ID, including its dimensions and editions.
Get dimension options
Pulls all valid filter values (codes) for a specific dimension within an ONS dataset.
Get dimensions
Lists every available filter variable and its options that can be used to narrow down data results.
Search 337+ datasets by keywords (e.g., 'economy', 'population') to find relevant dataset IDs.
Retrieve the full details, methodology, and available versions for a specific ONS dataset ID using get_dataset_info.
Determine all possible dimension variables (like 'geography' or 'property-type') that can be used to filter the data.
Pull a list of valid options for any given filter variable, ensuring your query uses correct codes and ranges.
Execute the final data request using the dataset ID and all necessary dimension filters to retrieve structured data points.
Ask AI about this MCP
Supported MCP Clients
Waiting for input…
ONS Discovery: 6 Tools for Data Cataloging & Querying
Use this set of tools to move through the data lifecycle: find a dataset, validate its filters, and execute queries against structured ONS statistics.
019d75e6get dataset info
Retrieves the detailed metadata for a dataset ID, including its dimensions and editions.
019d75e6get dimension options
Pulls all valid filter values (codes) for a specific dimension within an ONS dataset.
019d75e6get dimensions
Lists every available filter variable and its options that can be used to narrow down data results.
019d75e6get observations
Executes the final query, returning structured observations based on a dataset ID and specified filters.
019d75e6list datasets
Browses the complete catalog of 337+ ONS datasets using paginated access.
019d75e6search datasets
Finds relevant dataset IDs, titles, and descriptions by running a keyword search across the entire ONS catalog.
Choose How to Get Started
Build a custom MCP for your own tools, or connect a ready-made integration from our catalog.
Build Your Own
Turn any API into an MCP. Import a spec, define Agent Skills, or deploy with MCPFusion.
- Import from OpenAPI, Swagger, or YAML specs
- Create Agent Skills with progressive disclosure
- Deploy to edge with MCPFusion framework
- Built in DLP, auth, and compliance on every call
- Real time usage dashboard and cost metering
- Publish to catalog or keep private
Make Your AI Do More
Start with UK ONS Discovery — Search 337+ Statistical Datasets, then connect any of our 4,700+ other servers whenever your AI needs more. One click, no limits.
- Use this MCP plus 4,700+ others, all in one place
- Add new capabilities to your AI anytime you want
- Every connection is secured and compliant automatically
- Track usage and costs across all your servers
- Works with Claude, ChatGPT, Cursor, and more
- New servers added to the catalog every week
What you can do with this MCP connector
You're connecting your agent straight into the full Office for National Statistics catalog. Forget bouncing between different government sites or wading through dense PDF manuals; you handle every step—finding the data, validating the filters, and pulling the final numbers—all in one place.
Discovering the Right Dataset: You don't know what you need off the top of your head? Use search_datasets to run a quick search across 337+ datasets. Just drop keywords like 'housing' or 'population,' and it spits out relevant dataset IDs, titles, and descriptions. If you want to browse everything available without searching, list_datasets gives you paginated access to the whole catalog.
Getting Full Details: Once you have a promising ID, you gotta know exactly what that data is. You run get_dataset_info on the specific dataset ID; this retrieves all the detailed metadata for you, including methodology notes and every available edition of the data. This tool also shows you all the dimensions included in the set.
Setting Up Filters: Before you can pull anything, you gotta define your variables. You use get_dimensions to list every possible filter variable that dataset accepts—think 'geography' or 'property-type.' That tells you what you can filter by. But listing a dimension name isn't enough; you need the actual codes. For any specific dimension, run get_dimension_options.
This pulls all the valid codes and ranges for that variable, guaranteeing your query uses correct inputs.
Executing the Query: You've got the Dataset ID, and you’ve validated every filter code with get_dimensions and get_dimension_options. Now it's time to get the numbers. Execute get_observations. This tool runs the final query against ONS using your dataset ID and all the necessary filters you defined. It returns structured data points, ready for analysis.
This process keeps everything contained: search_datasets finds IDs based on keywords; list_datasets lets you browse the entire available catalog; get_dataset_info gives you methodology and dimensional details for an ID; get_dimensions maps out all potential filter variables; get_dimension_options validates specific codes for any variable; and finally, get_observations executes the query to return structured data points.
It's a complete workflow from zero knowledge to final numbers.
How ONS Discovery MCP Works
- 1 Start by calling
search_datasetswith a keyword (e.g., 'housing') to get potential Dataset IDs. - 2 Next, call
get_dimensionsorget_dataset_infousing the ID to discover all available filter variables and their structure. - 3
get_dimension_optionsvalidates the specific values for those filters. Finally, pass everything intoget_observationsto execute the query.
The bottom line is: you move from a broad topic (search) to validating parameters (dimensions/options), and finally executing a precise data pull (observations).
Who Is ONS Discovery MCP For?
Data Analysts, BI Developers, and Research Scientists. You're the person who wakes up frustrated because pulling statistics requires cross-referencing PDFs, manually checking API docs for dimension codes, and spending half a day just figuring out which dataset ID to query.
Uses search_datasets first. Then they run get_dimensions followed by multiple calls to get_dimension_options until the agent has all the correct filtering parameters before calling get_observations.
Needs deep metadata validation. They use get_dataset_info constantly to verify methodology and version changes, ensuring their derived insights are based on current standards.
What Changes When You Connect
- Stop guessing codes. Use
get_dimension_optionsto pull a list of valid filter values for any variable, eliminating guesswork when querying data. - Get full context on the dataset itself using
get_dataset_info. You can check methodology and versions before you even run your query. - Skip manual browsing. Call
search_datasetsfirst. It immediately returns matching IDs and titles, letting your agent jump straight to the right source data. - Reduce steps significantly by chaining tools. Your agent flows:
search_datasets->get_dimensions->get_observations. All in one prompt. - Handle massive catalogs without limits. The system manages 337+ datasets, covering everything from health and trade to local authority housing statistics.
Real-World Use Cases
Checking Housing Market Trends
A user asks: 'What was the average house price in London vs. Manchester for detached homes over the last 5 years?' The agent runs search_datasets for housing, uses get_dimensions to find 'property-type' and 'geography', validates those with options calls, then executes a time series query using get_observations.
Comparing Employment Data
A user needs the latest employment rate data. The agent uses search_datasets for 'employment'. It runs get_dataset_info to confirm the correct dataset ID and then uses get_observations with a time filter to pull the most current quarterly figures.
Auditing Data Variables
A data team needs to know if 'age' or 'gender' are available variables for a specific dataset. They call get_dimensions using the ID, and the server returns all filter options immediately, saving hours of documentation review.
Broad Topic Exploration
A researcher needs to know what data exists on 'trade' in general. They use search_datasets, which instantly returns several IDs (e.g., trade-goods, import-export) allowing them to pick the right starting point without browsing a massive list.
The Tradeoffs
Querying blind
Asking 'Give me the data for housing' and expecting results. This fails because you haven't provided the necessary filters (like year or geography) to narrow down 337+ datasets.
→
First, use search_datasets to get the ID. Then, run get_dimensions, find the variable names, validate them with get_dimension_options, and finally pass all three pieces of information into get_observations.
Confusing list/search
Trying to use list_datasets when you only know the topic (e.g., 'population'). The catalog is too big, and manual browsing fails.
→
Always start with search_datasets. It's designed for keywords and quickly narrows 337+ datasets down to a manageable list of IDs.
Using the wrong filter type
Attempting to query a time series without specifying a date range. The system rejects it because the observation needs context.
→
Check get_dataset_info for the data's version and then use get_dimension_options with the 'time' dimension to ensure your filters match the required format.
When It Fits, When It Doesn't
Use this MCP Server if your problem involves retrieving structured, quantifiable statistics from a known domain (like government census data). You need to move from a broad topic (e.g., 'UK economy') to specific variables and time periods.
Don't use it if you are analyzing unstructured text (legal documents, news articles) or performing general sentiment analysis. For those tasks, you need document indexing tools, not structured query engines. If your goal is simply discovery—you don't know what data exists yet—start with list_datasets. But the moment you want numbers, follow the full sequence: search_datasets -> get_dimensions -> get_observations.
Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by UK ONS. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
VINKIUS INFRASTRUCTURE
Cloud Hosted
Managed infra
V8 Isolated
Sandboxed per request
Zero-Trust Proxy
No stored credentials
DLP Enforced
Policy on every call
GDPR Compliant
EU data residency
Token Compression
~60% cost reduction
Works with Claude, ChatGPT, Cursor, and more
The Model Context Protocol standardizes how applications expose capabilities to LLMs. Instead of operating in isolation, your AI gains direct access to external platforms, live data, and real-world actions through secure, standardized connections.
This server provides 6 capabilities that interface natively with Claude, ChatGPT, Cursor, and any MCP client. No middleware. No custom integration required.
Available Capabilities
Finding UK statistics shouldn't require a PhD in API Documentation.
Today, pulling a simple data comparison means navigating the ONS website. You click through dozens of departments (population, housing, employment). Then you find the right dataset PDF or download portal. Finally, you open an Excel sheet and spend hours cross-referencing dimension codes—like figuring out if 'Greater London' needs to be coded as GL or LND. It’s a massive amount of clicking and manual data cleaning.
With this MCP Server, your agent handles the whole mess. You just ask: 'What were house prices in X area?' The system uses `search_datasets` to find the ID, `get_dimensions` to validate the required filters, and finally runs `get_observations`. The result is clean, structured data, period.
Get Observations: Pulling actual data points with get_observations
The old way meant downloading a massive CSV file and then filtering it in Excel. If you needed to check a different time period or a slightly different region, you had to start the entire download process over again, wasting bandwidth and time.
Now, `get_observations` does the math for you. You provide the ID and filters; the server runs the query and gives back only what you asked for—a clean JSON data payload. It’s precise, fast, and repeatable.
Common Questions About ONS Discovery MCP
How do I find a specific dataset using search_datasets? +
You give search_datasets the keywords (e.g., 'pension'). It returns matching IDs, titles, and descriptions from the 337+ catalog instantly.
What is the difference between get_dimensions and get_dimension_options? +
get_dimensions tells you what variables exist (like 'property-type'). get_dimension_options tells you the specific, valid values for that variable (e.g., 'detached', 'flat', 'semi-detached').
Can I query data without knowing the dataset ID? Use search_datasets. +
No. While search_datasets helps you find the ID, you must still use that specific ID when calling get_observations to run a valid query.
What do I use if I want to see all available datasets? Use list_datasets. +
list_datasets provides paginated access to the entire catalog. This is best used when you need an overview or suspect the dataset might be in a category you haven't guessed yet.
How does the get_dataset_info tool provide details about an ONS dataset's structure? +
It returns deep metadata for a dataset, showing its available dimensions, editions, and versions. You use this to understand the full scope of the data before you even try to query it.
When using get_observations, what is the best practice for querying time series data? +
You must specify the dimension filters along with the dataset ID. For a complete historical view, set the time filter parameter to =. This tells the system to pull the full available time range.
Before running a query, how should I use get_dimensions to understand necessary filter parameters? +
It lists every available dimension and shows what kind of filters you can apply. Check this tool first; it tells you what variables exist for filtering observations.
If I know the dimension but not its allowed values, what does get_dimension_options do? +
It retrieves every valid option value—like all geography codes or time periods—for a specific dimension. This prevents you from sending an invalid filter that would fail during observation querying.
How many datasets does the ONS have? +
The ONS API currently exposes 337+ datasets covering economy, population, health, trade, business, census, well-being, and more. New datasets are added regularly as part of the ONS Beta programme.
What format does the data come in? +
The API provides programmatic access to statistical observations in JSON format. It uses a hypermedia-driven architecture, nesting dimension links, options, and hierarchy information within the responses.
Is the API free to use? +
Yes, the ONS Developer API is completely free and open, requiring no authentication or API keys, allowing developers unrestricted access to UK national statistics.
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
More in this category
Apex Legends
Track Apex Legends player stats, match history, leaderboards, and server status directly from your AI agent.
IBGE Agregados (SIDRA)
Access official Brazilian statistical data from IBGE SIDRA — query surveys, metadata, variables, and geographic levels directly.
AssemblyAI
Transcribe audio and video files with industry-leading accuracy, detect speakers, and extract insights from spoken content.
You might also like
FCC Telecom
Search the official USA telecommunications database to audit corporate Internet Providers and Interconnected VoIP carriers.
Amazing Marvin
Manage your Amazing Marvin tasks, projects, and time tracking using AI Agents.
Anaplan
Manage Anaplan workspaces, models, and data actions (imports, exports, processes) directly via AI.