loading…
Search for a command to run...
loading…
MCP server for education statistics of the Canton and City of Zurich (BISTA), providing tools to query pupil numbers, school district trends, secondary school p
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.
🇨🇭 Part of the Swiss Public Data MCP Portfolio
License: MIT
Python 3.11+
MCP
No Auth Required
MCP server for education statistics of the Canton and City of Zurich (BISTA)
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?"
# 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
# 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 →
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:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonFor use via claude.ai in the browser (e.g. on managed workstations without local software):
Render.com (recommended):
python -m zh_education_mcp.server --http --port 8000https://your-app.onrender.com/sse💡 "stdio for the developer laptop, SSE for the browser."
| 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) |
| 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 |
┌─────────────────┐ ┌──────────────────────────────┐ ┌──────────────────────────┐
│ 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 │
└──────────────────────────────┘
| Source | Protocol | Coverage | Auth | Update |
|---|---|---|---|---|
| BISTA Kanton ZH | REST/CSV | Learner statistics 2000–present | None | Annual (15 Sep) |
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
zh_edu_list_schulgemeinden to find valid names).| 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. |
# Unit tests (no API calls)
PYTHONPATH=src pytest tests/ -m "not live"
# Integration tests (live API calls)
pytest tests/ -m "live"
See CHANGELOG.md
See CONTRIBUTING.md
MIT License — see LICENSE
Hayal Oezkan · malkreide
Run in your terminal:
claude mcp add zh-education-mcp -- npx Security
Low riskAutomated heuristic from public metadata — not a security guarantee.