uk-schools-mcp

uk-schools-mcp

MCP server providing access to comprehensive UK school data from official government sources, including search, details, near-postcode, comparisons, Ofsted ratings, and DfE education datasets.

Category
访问服务器

README

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

Data Sources

Source Type Auth What it provides
GIAS Bulk CSV (daily) None All ~65k schools: name, URN, type, phase, address, capacity, pupils, head teacher, SEN, etc.
Postcodes.io REST JSON API None UK postcode geocoding (lat/lng) for catchment area searches
Explore Education Statistics REST JSON API None DfE publications: performance tables, absence, exclusions, applications & offers, workforce
Ofsted 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.server

Using pip

pip install mcp httpx polars pydantic openpyxl

Usage 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.toml

How 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}.csv

The 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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选