Skip to main content
Glama
henryjameslau

ONS Trade Data API MCP Server

ONS Trade Data API — MCP Server

An MCP (Model Context Protocol) server that exposes UK trade data from:

Modeled on your previous ons-baby-names-api-mcp server: Python + FastMCP, deployable to Vercel, with a streamable HTTP MCP endpoint at /mcp.

Tools

Tool

Description

health

Check MCP server and upstream API connectivity

get_schema

Dataset metadata (version, last_updated, total_records)

get_time_periods

List available dates

get_countries

Country code lookup

get_commodities

Commodity metadata lookup

get_country_index

Available commodities and periods for a country

fetch_raw

Direct raw JSON fetch from /data/... path

get_trade_file

Fetch one static trade file with optional filtering

query_trade

Generic grouped aggregation query over a trade file

Related MCP server: supply-chain-mcp-server

MCP endpoint

After deployment, connect an MCP client to:

https://ons-trade-data-api-mcp.vercel.app/mcp

Environment variable

Variable

Default

Description

TRADE_API_BASE_URL

https://ons-trade-data-api.netlify.app

Upstream trade API base URL

Deploy to Vercel

  1. Push this repo to GitHub

  2. Import it in Vercel

  3. Deploy (no custom build needed)

Local development

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python app.py

Server runs locally at:

http://localhost:8000/mcp
F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides access to UN Comtrade international bilateral trade data via an MCP server, enabling AI agents to query trade statistics through natural language.
    9
    MIT
  • A
    license
    C
    quality
    B
    maintenance
    MCP server for the UK Bus Open Data Service, enabling timetable queries, stop search, route discovery, journey planning, and real-time bus tracking.
    16
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    A research MCP server for UK geospatial and statistical data, enabling AI assistants to query Ordnance Survey and ONS datasets.
    3
    MIT

View all related MCP servers

Related MCP Connectors

  • Comtrade MCP — UN Comtrade API for international bilateral trade data

  • This MCP server provides seamless access to Malaysia's government open data, including datasets, w…

  • data.gov.uk MCP — UK national open-data portal (CKAN API).

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/henryjameslau/ons-trade-data-api-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server