ELS MCP server
OfficialClick 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., "@ELS MCP serverWhat is the employment rate in Leeds?"
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.
ELS MCP server
An MCP (Model Context Protocol) server that lets LLM agents (e.g. chatbots like Claude) make meaningful use of the data provided by the Explore Local Statistics API.
TypeScript/Node, served over Streamable HTTP. See CLAUDE.md and docs/ for the design
reasoning behind the tool set. A previous Python/FastMCP proof-of-concept lives earlier in this
repo's git history if old behaviour ever needs cross-checking.
Note: It is not possible to add custom MCP servers to some LLM chatbots, like M365 Copilot.
Run the server locally
Requires Node.js 20+.
npm install
cp .env.example .env # then edit ELS_API_BASE_URL if needed
npm run devThis starts the server at http://localhost:8001/mcp.
Connect it to your LLM
The example below is specific to Claude Desktop, but should be similar for other MCP-capable clients.
Open the Settings dialog, then the Developer tab, then Edit config. This opens a JSON
configuration file — add:
{
// ...EXISTING CONFIG ABOVE...
"mcpServers": {
"els-mcp-server": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://localhost:8001/mcp"]
}
}
}Save the file, make sure npm run dev is running, and restart Claude Desktop.
Start using it
Check that your chatbot is connected by asking:
Are you able to connect to els-mcp-server?Once connected, if you ask questions that can be answered with data on Explore Local Statistics, your chatbot should automatically call this server to give you an answer, e.g.:
Which local authority in Wales has the highest employment rate?Related MCP server: UK ONS MCP Server
Other commands
npm run build # production build (tsc -> dist/)
npm run lint # eslint
npm run format # prettier --write
npm run format:check # prettier --checkDeploy to Vercel
Fork this repo to your own GitHub account.
In Vercel, create a new project from that repo. Vercel auto-detects the Node function in
api/.Set the
ELS_API_BASE_URLenvironment variable in the Vercel project settings (see.env.example) — the app fails to start without it.Deploy.
Use it with your LLM
Once deployed, add the MCP server to your favourite LLM chatbot. For Claude (web or desktop):
Go to Settings (Customize) → Connectors
Click +, then Add custom connector
Paste in the URL:
https://<your-app>.vercel.app/mcpClick Add, then Connect
This server cannot be deployed
Maintenance
Related MCP Connectors
Query UK Parliament, elections, crime stats, ONS census data, and national archives
Query US Census Bureau data: demographics, economics, and housing statistics.
UK area & property intelligence for AI agents: reports, EPC, comparables, with source provenance.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI agents to query and retrieve public statistical data from Data Commons through search and observation tools. Provides access to demographic, economic, and other statistical indicators for analysis and research.Apache 2.0
- AlicenseAqualityDmaintenanceEnables access to official UK Office for National Statistics data including demographics, economics, and social statistics through the ONS Beta API. Supports browsing, searching, and querying datasets with built-in shortcuts for popular statistics like inflation, regional GDP, and wellbeing data.515 npmMIT
- FlicenseNot gradedqualityDmaintenanceProvides access to the US Census Bureau API, allowing AI agents to retrieve demographic data and population statistics across thousands of datasets. It enables users to search for datasets, discover variable codes, and query specific geographic data like states and counties.-
- FlicenseNot gradedqualityDmaintenanceExposes the Eurostat Statistics API, enabling LLMs to discover, explore, and retrieve official EU statistical data through search, dimension inspection, and data retrieval tools.3-