uk-schools-mcp
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., "@uk-schools-mcp Find primary schools near MK9 3BZ"
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.
UK Schools MCP Server
A Model Context Protocol server that provides AI assistants with access to comprehensive UK school data from official government sources.
Features
Search schools by name, postcode, or local authority (GIAS bulk data)
Get detailed school information (type, phase, age range, capacity, contact details)
Find schools near a postcode with distance sorting (Postcodes.io geocoding)
Compare schools side-by-side
Browse and query 23+ DfE education datasets (absence, exclusions, performance, SEND, admissions, workforce, funding, destinations, and more)
One-step dataset discovery: find the right dataset for any education topic
Get Ofsted inspection grades and judgements from Management Information data
Links to Ofsted inspection reports
Related MCP server: teadata-mcp
Data Sources
Source | Type | Auth | What it provides |
Bulk CSV (daily) | None | All ~65k schools: name, URN, type, phase, address, capacity, pupils, head teacher, SEN, etc. | |
REST JSON API | None | UK postcode geocoding (lat/lng) for catchment area searches | |
REST JSON API | None | DfE publications: performance tables, absence, exclusions, applications & offers, workforce | |
Monthly Excel + report links | None | Inspection grades, judgement areas, dates, and report URLs |
Installation
Using uv (recommended)
git clone https://github.com/yourusername/uk-schools-mcp.git
cd uk-schools-mcp
uv sync --all-extras
uv run python -m uk_schools_mcp.serverUsing pip
pip install mcp httpx polars pydantic openpyxlUsage with Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"uk-schools": {
"command": "uv",
"args": [
"--directory",
"/path/to/uk-schools-mcp",
"run",
"python",
"-m",
"uk_schools_mcp.server"
]
}
}
}Available Tools
search_schools
Search for UK schools by name, postcode, or local authority using GIAS data.
Example: "Find primary schools in Milton Keynes"
get_school_details
Get comprehensive details for a specific school by URN, including links to Ofsted reports and the GIAS page.
Example: "Show me details for URN 109825"
find_schools_near_postcode
Find schools within a radius of a UK postcode, sorted by distance. Uses Postcodes.io for geocoding and GIAS data for school locations.
Example: "Find all primary schools within 2km of MK9 3BZ"
compare_schools
Compare multiple schools side-by-side by URN.
Example: "Compare schools with URNs 109825, 110234, and 110567"
search_education_statistics
Search the DfE Explore Education Statistics catalogue for publications on school performance, absence, exclusions, applications & offers, workforce, etc.
Example: "Search for publications about school absence"
get_publication_datasets
List available datasets for a DfE publication (use after search_education_statistics).
get_dataset_metadata
Get available filters, indicators, geographic levels, and time periods for a DfE dataset. Essential before querying to discover what data is available and what IDs to use.
Example: "What filters and indicators are available for dataset ds-123?"
query_dataset
Query a DfE Explore Education Statistics dataset with specific indicators, filters, time periods, and geographic levels. Enables access to school-level data on absence, exclusions, performance, admissions, workforce, and more.
Example: "Query the absence dataset for 2023 academic year at national level"
get_ofsted_ratings
Get Ofsted inspection ratings and grades for a school by URN. Returns overall effectiveness grade and grades for each inspection area (Quality of Education, Behaviour and Attitudes, Personal Development, Leadership and Management), plus inspection dates, type, and previous grades.
Example: "Get Ofsted ratings for URN 109825"
list_ees_topics
List all 23 available education data topics from the DfE Explore Education Statistics API, organized by category (performance, welfare, demographics, admissions, workforce, finance, destinations, early years).
discover_dataset
Automatically find the publications and datasets for a given education topic. Replaces the manual 4-step workflow with a single call. Returns dataset IDs ready for use with get_dataset_metadata and query_dataset.
Example: "Discover datasets for topic 'absence'" or "Find SEND data"
Available topics: absence, exclusions, ks2_performance, gcse_performance, a_level_performance, applications_offers, workforce, sen, school_pupils_characteristics, free_school_meals, school_capacity, admission_appeals, destinations, children_looked_after, children_in_need, mat_performance, school_funding, la_school_expenditure, further_education, early_years, early_years_foundation, neet, elective_home_education
Development
Setup
git clone https://github.com/yourusername/uk-schools-mcp.git
cd uk-schools-mcp
uv sync --all-extras
uv run pytest
uv run ruff check src/ tests/Project Structure
uk-schools-mcp/
├── src/
│ └── uk_schools_mcp/
│ ├── server.py # MCP server + tool handlers
│ └── clients/
│ ├── gias.py # GIAS bulk CSV client
│ ├── postcodes.py # Postcodes.io geocoding client
│ ├── ees.py # Explore Education Statistics API client
│ └── ofsted.py # Ofsted report URL helper
├── tests/
│ └── test_server.py
├── NEXT_STEPS.md # Roadmap for additional data sources
└── pyproject.tomlHow GIAS Data Works
On first use, the server downloads the daily GIAS bulk CSV (~65k schools, ~30MB) from:
https://ea-edubase-api-prod.azurewebsites.net/edubase/downloads/public/edubasealldata{YYYYMMDD}.csvThe CSV is cached locally at ~/.cache/uk-schools-mcp/ and refreshed daily. All search and lookup operations run against this cached data using polars for fast filtering.
Contributing
Contributions welcome! See NEXT_STEPS.md for planned enhancements.
License
MIT License - See LICENSE file for details.
Acknowledgments
Built with data from:
Department for Education (DfE) - GIAS and Explore Education Statistics
Office for Standards in Education (Ofsted) - Inspection reports
Postcodes.io - Open-source UK postcode geocoding
Available Tools
11 toolscompare_schoolsA
Compare multiple schools side-by-side by their URNs. Shows key facts for each school including type, phase, pupil numbers, capacity, admissions policy, and Ofsted info.
Inputs: urns (required).
discover_datasetA
Discover the publications and datasets available for a specific education data topic. This replaces the manual 4-step workflow (search_education_statistics -> get_publication_datasets -> get_dataset_metadata -> query_dataset) by automatically finding the right publication and listing its datasets with IDs. Use list_ees_topics first to see available topic keys, then use the dataset ID from the results with get_dataset_metadata and query_dataset.
Inputs: topic (required).
find_schools_near_postcodeA
Find schools within a specified distance of a UK postcode. Geocodes the postcode using Postcodes.io, then searches GIAS data for nearby schools sorted by distance. Useful for finding schools in a catchment area.
Inputs: postcode (required), limit, phase, radius_km.
get_dataset_metadataA
Get the available filters, indicators, geographic levels, locations, and time periods for a DfE dataset. Use this to discover what data is available and what filter/indicator IDs to use with query_dataset. This is essential before querying - it tells you what indicators (e.g. absence rate, number of exclusions) and filters (e.g. school type, gender) are available, along with their IDs.
Inputs: dataset_id (required).
get_ofsted_ratingsA
Get Ofsted inspection ratings and grades for a school by URN. Returns the overall effectiveness grade (Outstanding/Good/Requires Improvement/Inadequate) along with grades for each inspection area: Quality of Education, Behaviour and Attitudes, Personal Development, Leadership and Management, and where applicable Early Years and Sixth Form provision. Also includes inspection dates, type, and previous grades. Data comes from Ofsted Management Information files published monthly.
Inputs: urn (required).
get_publication_datasetsA
List the available datasets for a DfE Explore Education Statistics publication. Use after search_education_statistics to find specific data sets, then use get_dataset_metadata to explore available filters and indicators before querying.
Inputs: publication_id (required).
get_school_detailsA
Get comprehensive details for a specific school by its URN (Unique Reference Number). Returns all GIAS data including type, phase, address, capacity, pupil numbers, head teacher, religious character, admissions policy, SEN provision, and more. Also provides links to the school's GIAS page and Ofsted reports.
Inputs: urn (required).
list_ees_topicsA
List all available education data topics from the DfE Explore Education Statistics API. Shows topic keys, titles, and descriptions for 23 datasets covering absence, exclusions, performance, SEND, admissions, workforce, funding, destinations, and more. Use the topic key with discover_dataset to find the actual dataset IDs needed for querying.
Inputs: no named parameters.
query_datasetA
Query a DfE Explore Education Statistics dataset with specific indicators and filters. Use get_dataset_metadata first to discover available indicator and filter IDs. This tool enables access to school-level data on absence, exclusions, performance, admissions, workforce, and more. Time periods use format 'YYYY|CODE' where CODE is: AY (academic year), CY (calendar year), FY (financial year), etc. Geographic levels include: NAT (national), REG (regional), LA (local authority), SCH (school). Locations use format 'LEVEL|id_type|id_value' e.g. 'LA|code|823'.
Inputs: dataset_id (required), indicators (required), page, filters, +4 more.
search_education_statisticsA
Search the DfE Explore Education Statistics catalogue for publications on topics like school performance, absence, exclusions, applications and offers, workforce, and more. Returns publication IDs that can be used with get_publication_datasets and then get_dataset_metadata/query_dataset to access the actual data.
Inputs: topic (required).
search_schoolsA
Search for UK schools by name, postcode, or local authority. Uses live data from GIAS (Get Information About Schools). Returns a list of matching schools with name, URN, type, phase, address, and contact details.
Inputs: limit, phase, query, local_authority.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
The tools are clearly divided into school lookup (search, details, compare, near, Ofsted) and education statistics (topics, discovery, metadata, query). Each tool has a distinct purpose, and even the overlapping statistical tools (list_ees_topics, search_education_statistics, discover_dataset) are clearly differentiated by their descriptions.
All tool names follow a consistent lowercase snake_case convention with a verb prefix: compare_, get_, search_, find_, query_, list_, discover_. There are no stylistic deviations or mixed conventions.
11 tools is well within the ideal 3-15 range and appropriately scoped for a UK schools data server covering both school information and education statistics. Each tool contributes to the overall functionality without unnecessary bloat.
The tool set provides comprehensive coverage for its domain: school search, details, comparison, geolocation, Ofsted ratings, and a full pipeline for exploring and querying education statistics. No critical operations are missing for a read-only data retrieval server.
Maintenance
Related MCP Connectors
This MCP server provides seamless access to Malaysia's government open data, including datasets, w…
Hosted MCP server for finding authoritative primary data sources and official portals.
Hosted MCP server for live public-data APIs and Skills for AI agents.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server that wraps UDIR's open registries for Norwegian schools (NSR) and kindergartens (NBR), enabling search by municipality and retrieval of full details including coordinates and enrollment.450 npmMIT
- AlicenseAqualityCmaintenanceMCP server for exploring Texas public school data through conversational interfaces, enabling campus search, district details, geospatial lookup, comparisons, and transfer insights using TEA data.161Apache 2.0
- FlicenseNot gradedqualityCmaintenanceUnifies school information, real estate transaction data, and school zone lookup into a single MCP server, allowing users to query school details, property prices, and attendance boundaries.-
- AlicenseAqualityDmaintenanceMCP server to query UK higher-education open data including National Student Survey results, student outcomes, and graduate earnings. Data is downloaded locally from official sources and compared against benchmarks.5MIT