ONS + Nomis MCP server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ONS_API_BASE | No | API root for ONS beta | https://api.beta.ons.gov.uk/v1 |
| ONS_MCP_HTTP | No | Set to 1 for HTTP transport | |
| ONS_MCP_PORT | No | HTTP port | 8095 |
| CF_ACCESS_AUD | No | Access application AUD | |
| NOMIS_API_KEY | No | Optional Nomis uid for larger queries | |
| NOMIS_API_BASE | No | Nomis API root | https://www.nomisweb.co.uk/api/v01 |
| ONS_API_TIMEOUT | No | Per-request timeout (s) | 30 |
| NOMIS_API_TIMEOUT | No | Nomis per-request timeout (s) | 60 |
| CF_ACCESS_TEAM_DOMAIN | No | Cloudflare Access team domain | |
| ONS_MCP_ALLOWED_HOSTS | No | DNS-rebinding Host allowlist | ons-mcp.library-apps.dev,127.0.0.1,localhost |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_datasetsA | List available ONS datasets (paginated). Returns id, title, description, release_frequency and the latest
edition/version links for each dataset. Use |
| search_datasetsA | Find datasets whose title, description or keywords match The beta API has no server-side search, so this pages through the catalogue and filters client-side on a case-insensitive substring. Good for turning a topic ("inflation", "life expectancy") into a dataset id. |
| get_datasetB | Get a single dataset's metadata and its latest edition/version. Follows the dataset's latest_version link so you get the concrete edition and version numbers needed by the downstream tools, plus the available download formats (csv, xlsx) for the whole dataset. |
| get_dimensionsA | List the dimensions (variables) of a dataset version. Every dataset has |
| get_optionsA | List valid option codes for one dimension of a dataset version. Each option has an |
| get_observationsA | Retrieve observation(s) for a dataset version. Supply exactly one option code per dimension in Returns the observations plus the unit of measure. |
| get_timeseriesA | Get a PUBLISHED ONS time series by its website URI. PREFER THIS for headline indicators (inflation rates, unemployment rate, GDP growth). This hits /v1/data, which serves the same figures as the ONS website — the published headline value, not something derived from an index. It returns months/quarters/years already in chronological order, so the last element is the latest period.
Prefer this over get_observations for "what is the latest X rate" questions: the CMD datasets behind get_observations are curated separately and some lag the published series by months or years. CAVEAT on |
| get_metadataA | Get full metadata for a dataset version (provenance, downloads). Includes the CSV/XLSX/CSVW download hrefs for the complete version, dimension descriptions, release date and usage notes. Use this when bulk download is more sensible than per-observation queries. |
| list_releasesA | Browse the ONS release calendar — the AUTHORITATIVE schedule of
statistical publications. USE THIS to answer "when is the next X
released", not the
Each item carries the release |
| get_releaseA | Full detail for one release-calendar entry by its
|
| list_topicsA | Browse the ONS topic hierarchy (a taxonomy over the whole catalogue). Call with no argument for the top-level topics (Economy, Employment and
labour market, Business industry and trade, People population and
community, Census ...). Pass a topic |
| get_topic_contentB | List the content published under a topic (bulletins, articles, key time series, dataset pages).
|
| nomis_search_datasetsA | Search Nomis census / labour-market datasets by keyword. Matches |
| nomis_get_datasetA | Get one Nomis dataset's overview and its dimensions.
|
| nomis_dimension_optionsA | List valid codes for one dimension of a Nomis dataset.
For geography specifically, prefer nomis_geography_search, which also lets you restrict by area type. |
| nomis_geography_searchA | Resolve a place name to Nomis geography code(s) for a dataset. Nomis geography codes are internal integers, not ONS mnemonics,
and differ per dataset. Pass a place name (e.g. "Birmingham",
"Wales") and get back matching {value, name} pairs to use as the
|
| nomis_get_dataA | Retrieve observations from a Nomis dataset (simple JSON).
Returns flat records with named dimension values and the numeric obs_value, plus the record count. Use nomis_get_dataset and nomis_dimension_options / nomis_geography_search first to find the right codes. |
| nomis_data_urlA | Build a direct Nomis download URL for bulk retrieval. For large pulls it's often better to hand back a URL than to
stream every observation through the model. Returns a ready-to-use
link in the requested format (csv, xls, data.json). Nomis time and
list syntax is supported in |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 18 tools
Tools are clearly segmented into ONS and Nomis groups by prefix, and within each group the purposes are distinct: metadata retrieval, dimension listing, data fetching, etc. The only slight overlap is between get_timeseries and get_observations, but they are explicitly documented for different use cases.
ONS tools follow a consistent verb_noun pattern (get_, list_, search_), while Nomis tools use a consistent nomis_verb pattern. However, 'nomis_data_url' breaks the verb pattern, and mixed verb initiatives (get vs list) across the server are minor inconsistencies.
18 tools is a reasonable count for covering two distinct APIs (ONS and Nomis) without being overwhelming. Each tool serves a clear purpose, and the number aligns well with the server's scope of data query and exploration.
The tool surface covers core operations for both APIs: browse, search, metadata, dimension options, data retrieval, and even a download URL builder. Minor gaps exist, such as lacking a tool to list all Nomis datasets without a search query, but this does not critically hinder functionality.