ONS Trade Data API MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ONS Trade Data API MCP ServerWhat were UK exports to Germany in January 2023?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 |
| Check MCP server and upstream API connectivity |
| Dataset metadata (version, last_updated, total_records) |
| List available dates |
| Country code lookup |
| Commodity metadata lookup |
| Available commodities and periods for a country |
| Direct raw JSON fetch from |
| Fetch one static trade file with optional filtering |
| Generic grouped aggregation query over a trade file |
Related MCP server: mcp-comtrade
MCP endpoint
After deployment, connect an MCP client to:
https://ons-trade-data-api-mcp.vercel.app/mcpEnvironment variable
Variable | Default | Description |
|
| Upstream trade API base URL |
Deploy to Vercel
Push this repo to GitHub
Import it in Vercel
Deploy (no custom build needed)
Local development
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python app.pyServer runs locally at:
http://localhost:8000/mcpThis server cannot be deployed
Maintenance
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…
MCP server for the Seline Analytics API
Related MCP Servers
- AlicenseDqualityCmaintenanceServidor MCP para a API do ComexStat, ferramenta de acesso às estatísticas de comércio exterior do Brasil.203 npm2MIT
- AlicenseNot gradedqualityCmaintenanceProvides access to UN Comtrade international bilateral trade data via an MCP server, enabling AI agents to query trade statistics through natural language.2 npmMIT
- AlicenseCqualityCmaintenanceMCP server for the UK Bus Open Data Service, enabling timetable queries, stop search, route discovery, journey planning, and real-time bus tracking.1641 PyPIMIT
- AlicenseNot gradedqualityCmaintenanceA research MCP server for UK geospatial and statistical data, enabling AI assistants to query Ordnance Survey and ONS datasets.3MIT