zh-education-mcp

zh-education-mcp

MCP server for education statistics of the Canton and City of Zurich (BISTA), providing tools to query pupil numbers, school district trends, secondary school profiles, nationality breakdowns, and gymnasium graduation rates.

Category
Visit Server

README

πŸ‡¨πŸ‡­ Part of the Swiss Public Data MCP Portfolio

πŸ“Š zh-education-mcp

Version License: MIT Python 3.11+ MCP No Auth Required CI

MCP server for education statistics of the Canton and City of Zurich (BISTA)

πŸ‡©πŸ‡ͺ Deutsche Version


Overview

zh-education-mcp connects AI assistants to the Bildungsstatistik Kanton ZΓΌrich (BISTA) β€” the official education statistics of the Canton of Zurich. It provides structured access to pupil numbers, school district trends, secondary school profiles, nationality breakdowns, and gymnasium graduation rates.

Source Data API
BISTA Kanton ZΓΌrich Learner statistics (Volksschule, Mittelschulen, MaturitΓ€t) REST/CSV

All data is fetched from the BISTA public API (bista.zh.ch/basicapi/ogd/) β€” no API key required. Data is updated annually on 15 September (reference date).

Anchor demo query: "How has the number of pupils in school district Letzi developed over the last 5 years?"


Demo

<p align="center"> <img src="assets/demo.png" alt="zh-education-mcp demo: Claude queries BISTA data" width="720"> </p>


Features

  • πŸ“Š 8 tools for education data across all school levels
  • πŸ” School district trends β€” pupil numbers for all Schulkreise (Letzi, Glattal, Schwamendingen, Oerlikon, Uto, Waidberg, ZΓΌrichberg) from 2000 to present
  • 🏫 Secondary school profiles β€” breakdown by requirement type (Sek A/B/C, Mittelschule, special classes)
  • 🌐 Nationality structure β€” top nationalities of pupils per school community
  • πŸŽ“ Gymnasium graduation rates β€” MaturitΓ€tsquote by municipality, district, and canton
  • πŸ“ˆ Canton-wide overview β€” all learners by school level, type, gender, and nationality
  • 🏠 Residence-based trends β€” pupil counts by place of residence (Bezirk / Gemeinde)
  • πŸ›οΈ Mittelschulen β€” Gymnasium, FMS, HMS statistics
  • πŸ”“ No API key required β€” all data under CC BY 4.0
  • ☁️ Dual transport β€” stdio (Claude Desktop) + Streamable HTTP (cloud)

Prerequisites

  • Python 3.11+
  • uv (recommended) or pip

Installation

# Clone the repository
git clone https://github.com/malkreide/zh-education-mcp.git
cd zh-education-mcp

# Install
pip install -e .
# or with uv:
uv pip install -e .

Or with uvx (no permanent installation):

uvx zh-education-mcp

Quickstart

# stdio (for Claude Desktop)
python -m zh_education_mcp.server

# Streamable HTTP (port 8000)
python -m zh_education_mcp.server --http --port 8000

Try it immediately in Claude Desktop:

"Wie hat sich die Lernendenzahl im Schulkreis Letzi entwickelt?" "Zeige die MaturitΓ€tsquote der Stadt ZΓΌrich" "Welche NationalitΓ€ten sind in Adliswil am hΓ€ufigsten?"

β†’ More use cases by audience β†’


Configuration

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "zh-education": {
      "command": "python",
      "args": ["-m", "zh_education_mcp.server"]
    }
  }
}

Or with uvx:

{
  "mcpServers": {
    "zh-education": {
      "command": "uvx",
      "args": ["zh-education-mcp"]
    }
  }
}

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Cloud Deployment (SSE for browser access)

For use via claude.ai in the browser (e.g. on managed workstations without local software):

Render.com (recommended):

  1. Push/fork the repository to GitHub
  2. On render.com: New Web Service β†’ connect GitHub repo
  3. Set start command: python -m zh_education_mcp.server --http --port 8000
  4. In claude.ai under Settings β†’ MCP Servers, add: https://your-app.onrender.com/sse

πŸ’‘ "stdio for the developer laptop, SSE for the browser."


Available Tools

Tool Description
zh_edu_list_schulgemeinden List all school communities / Schulkreise in Canton Zurich
zh_edu_schulkreis_trend Pupil trend by Schulkreis (2000–present)
zh_edu_overview Canton-wide learner overview by school level
zh_edu_sek1_profil Secondary I profile (Sek A/B/C breakdown)
zh_edu_staatsangehoerigkeiten Nationality structure of pupils per school community
zh_edu_maturitaetsquote Gymnasium graduation rates by municipality / district
zh_edu_wohnort_trend Residence-based learner trend (Bezirk / Gemeinde)
zh_edu_mittelschulen Secondary school statistics (Gymnasium, FMS, HMS)

Example Use Cases

Query Tool
"List all Schulkreise in Zurich" zh_edu_list_schulgemeinden
"Pupil trend in Letzi over 5 years" zh_edu_schulkreis_trend
"How many Sek A vs Sek B in Winterthur?" zh_edu_sek1_profil
"Top nationalities in ZΓΌrich-Letzi" zh_edu_staatsangehoerigkeiten
"MaturitΓ€tsquote of Stadt ZΓΌrich" zh_edu_maturitaetsquote

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Claude / AI   │────▢│  zh-education-mcp            │────▢│  BISTA Kanton ZΓΌrich     β”‚
β”‚   (MCP Host)    │◀────│  (MCP Server)                │◀────│  REST/CSV (Public API)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚                              β”‚     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        β”‚  8 Tools                     β”‚
                        β”‚  Stdio | Streamable HTTP     β”‚
                        β”‚  24h Cache                   β”‚
                        β”‚  No authentication required  β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Source Characteristics

Source Protocol Coverage Auth Update
BISTA Kanton ZH REST/CSV Learner statistics 2000–present None Annual (15 Sep)

Project Structure

zh-education-mcp/
β”œβ”€β”€ src/zh_education_mcp/
β”‚   β”œβ”€β”€ __init__.py              # Package
β”‚   └── server.py                # 8 tools, cache, dual transport
β”œβ”€β”€ tests/
β”‚   └── test_server.py           # Unit tests (mocked HTTP with respx)
β”œβ”€β”€ .github/workflows/ci.yml     # GitHub Actions (Python 3.11/3.12/3.13)
β”œβ”€β”€ pyproject.toml
β”œβ”€β”€ CHANGELOG.md
β”œβ”€β”€ CONTRIBUTING.md
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md                    # This file (English)
└── README.de.md                 # German version

Known Limitations

  • Annual updates only: BISTA data is updated once per year (reference date: 15 September). The 24h in-memory cache matches this cycle.
  • CSV-based API: The BISTA API returns CSV data; large datasets may take a moment to parse.
  • School community names: Names must match exactly (use zh_edu_list_schulgemeinden to find valid names).

Safety & Limits

Topic Details
No personal data BISTA statistics are aggregated β€” no individual pupil data is exposed or accessible. All figures are anonymized at the school community level.
Read-only All tools are read-only (readOnlyHint: true). The server cannot modify, delete, or write any data.
No authentication The BISTA API is fully public. No API keys, tokens, or credentials are stored or transmitted.
Rate limits The BISTA API has no documented rate limit, but the server uses a 24h in-memory cache to minimize requests. Please use responsibly.
Data license All data is published under CC BY 4.0 by the Canton of Zurich. Attribution: Bildungsstatistik Kanton ZΓΌrich (BISTA).
Terms of Service Usage is subject to the BISTA terms of use. The MCP server is an independent open-source project and is not affiliated with the Canton of Zurich.
AI output disclaimer Statistics are passed through as-is from the BISTA API. AI-generated interpretations or summaries should be verified against the official BISTA portal.

Testing

# Unit tests (no API calls)
PYTHONPATH=src pytest tests/ -m "not live"

# Integration tests (live API calls)
pytest tests/ -m "live"

Changelog

See CHANGELOG.md


Contributing

See CONTRIBUTING.md


License

MIT License β€” see LICENSE


Author

Hayal Oezkan Β· malkreide


Credits & Related Projects

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured