Zurich Open Data MCP Server

Zurich Open Data MCP Server

An MCP server providing AI-powered access to Open Data from the City of Zurich, enabling queries to 900+ datasets, real-time environmental and mobility data, geodata, parliamentary proceedings, and more.

Category
Visit Server

README

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

πŸ™οΈ Zurich Open Data MCP Server

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

🌐 English | Deutsch

An MCP (Model Context Protocol) server providing AI-powered access to Open Data from the City of Zurich, Switzerland.

Enables Claude, ChatGPT, and other MCP-compatible AI assistants to directly query 900+ datasets, geodata, parliamentary proceedings, council resolutions, tourism data, linked data, and real-time environmental and mobility information from the City of Zurich. 24 Tools, 5 Resources, 6 APIs.

Demo

Demo: Claude using zurich_parking_live and zurich_air_quality

✨ Features

CKAN Open Data (data.stadt-zuerich.ch)

  • zurich_search_datasets – Full-text search with Solr syntax across 900+ datasets
  • zurich_get_dataset – Complete metadata and download URLs for a dataset
  • zurich_datastore_query – Query tabular data directly (filters, sorting)
  • zurich_datastore_sql – SQL queries on the DataStore
  • zurich_list_categories – Browse 19 thematic categories
  • zurich_list_tags – Tag-based thematic search

Real-Time Environmental Data

  • zurich_weather_live – 🌀️ Current weather (temperature, humidity, pressure, rain) from 5 UGZ stations
  • zurich_air_quality – 🌬️ Live air quality (NOβ‚‚, O₃, PM10, PM2.5) with WHO thresholds
  • zurich_water_weather – 🌊 Lake Zurich data (water temperature, level, wind) every 10 min

Real-Time Mobility Data

  • zurich_pedestrian_traffic – 🚢 Pedestrian counts on Bahnhofstrasse (3 locations, hourly)
  • zurich_vbz_passengers – 🚊 VBZ public transit ridership (800,000+ records, all lines/stops)
  • zurich_parking_live – πŸ…ΏοΈ Real-time occupancy of 36 parking garages (ParkenDD)

Geoportal (WFS Geodata)

  • zurich_geo_layers – πŸ“ List 14 available geodata layers
  • zurich_geo_features – πŸ“ Fetch GeoJSON features (schools, districts, playgrounds, climate data, etc.)

City Parliament (Paris API)

  • zurich_parliament_search – πŸ›οΈ Search parliamentary proceedings (interpellations, motions, postulates)
  • zurich_parliament_members – πŸ›οΈ Search council members (party, commissions, mandates)

Zurich Tourism

  • zurich_tourism – 🏨 Attractions, restaurants, hotels, events (Schema.org data, 4 languages)

Linked Data (SPARQL)

  • zurich_sparql – πŸ“Š SPARQL queries on the statistical linked data endpoint (currently disabled β€” endpoint not productive yet)

StadtratsbeschlΓΌsse (Council Resolutions)

  • search_stadtratsbeschluesse – πŸ“œ Full-text search of public council resolutions (title, department, date range)
  • get_beschluesse_by_departement – πŸ“œ List all resolutions of a department (e.g. SSD, FD, PRD)
  • get_stadtratsbeschluss_detail – πŸ“œ Single resolution by NNNN/YYYY number

Analysis Tools

  • zurich_analyze_datasets – Comprehensive analysis: relevance, recency, data structure
  • zurich_catalog_stats – Catalog overview with statistics
  • zurich_find_school_data – Curated search for education-related datasets

MCP Resources

  • zurich://dataset/{name} – Dataset metadata
  • zurich://category/{group_id} – Category details
  • zurich://parking – Current parking data
  • zurich://geo/{layer_id} – GeoJSON geodata (14 layers)
  • zurich://tourism/categories – Tourism categories

πŸš€ Installation

Prerequisites

  • Python 3.11+
  • pip or uv

Install

# Clone
git clone https://github.com/malkreide/zurich-opendata-mcp.git
cd zurich-opendata-mcp

# Install
pip install -e .

# Or with uv
uv pip install -e .

βš™οΈ Configuration

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

{
  "mcpServers": {
    "zurich-opendata": {
      "command": "python",
      "args": ["-m", "zurich_opendata_mcp.server"],
      "env": {}
    }
  }
}

Alternatively, using the installed command:

{
  "mcpServers": {
    "zurich-opendata": {
      "command": "zurich-opendata-mcp"
    }
  }
}

Claude Code (CLI)

claude mcp add zurich-opendata -- python -m zurich_opendata_mcp.server

Cursor / VS Code

Add to .vscode/settings.json:

{
  "mcpServers": {
    "zurich-opendata": {
      "command": "python",
      "args": ["-m", "zurich_opendata_mcp.server"]
    }
  }
}

πŸ’¬ Example Queries

Once configured, you can ask Claude:

Open Data

  • "What datasets are available about schools in Zurich?"
  • "Show me school holidays for public schools"
  • "Analyze the available geodata"

Real-Time Data

  • "What's the current temperature in Zurich?" β†’ zurich_weather_live
  • "How is the air quality today?" β†’ zurich_air_quality
  • "What's the water temperature in Lake Zurich?" β†’ zurich_water_weather
  • "How many parking spaces are free right now?" β†’ zurich_parking_live
  • "How many people are on Bahnhofstrasse right now?" β†’ zurich_pedestrian_traffic

Geodata

  • "Show me all school facilities in Zurich as GeoJSON" β†’ zurich_geo_features
  • "What geodata layers are available?" β†’ zurich_geo_layers
  • "Where are the playgrounds in Zurich?"

City Parliament

  • "What parliamentary motions about schools were filed?" β†’ zurich_parliament_search
  • "Which council members belong to the SP party?" β†’ zurich_parliament_members

Council Resolutions (StadtratsbeschlΓΌsse)

  • "Find council resolutions about Volksschule from 2025" β†’ search_stadtratsbeschluesse
  • "List all SSD resolutions in 2025" β†’ get_beschluesse_by_departement
  • "Show council resolution 1203/2025" β†’ get_stadtratsbeschluss_detail

Tourism & Statistics

  • "What restaurants does Zurich Tourism recommend?" β†’ zurich_tourism
  • "How has Zurich's population evolved?" β†’ zurich_sparql

πŸ”— Data Sources

API Endpoint Data
CKAN data.stadt-zuerich.ch/api/3/ 900+ open datasets
Geoportal WFS ogd.stadt-zuerich.ch/wfs/geoportal 14 geodata layers (GeoJSON)
Paris API gemeinderat-zuerich.ch/api Parliamentary proceedings & members
Zurich Tourism zuerich.com/en/api/v2/data Attractions, restaurants, hotels
SPARQL ld.stadt-zuerich.ch/query Linked Open Data / statistics
ParkenDD api.parkendd.de/Zuerich Real-time parking occupancy

πŸ“Š Available Data Categories

Category ID
Employment arbeit-und-erwerb
Base Maps basiskarten
Construction & Housing bauen-und-wohnen
Population bevolkerung
Education bildung
Energy energie
Finance finanzen
Leisure freizeit
Health gesundheit
Crime kriminalitat
Culture kultur
Mobility mobilitat
Politics politik
Prices preise
Social Affairs soziales
Tourism tourismus
Environment umwelt
Administration verwaltung
Economy volkswirtschaft

πŸ“ Available Geo Layers

Source of truth: GEOPORTAL_LAYERS in src/zurich_opendata_mcp/config.py.

Layer ID Description
schulanlagen School facilities (kindergartens, schools, after-school care)
schulkreise School district boundaries (polygons)
schulwege School-route crossings and hazard points
stadtkreise City district boundaries (polygons)
spielplaetze Public playgrounds
kreisbuero City district offices
sammelstelle Waste collection points
sport Sports facilities
klimadaten Climate data (raster, temperatures, heat islands)
lehrpfade Educational trails
stimmlokale Polling stations
sozialzentrum Social centres
velopruefstrecken Bicycle exam routes for schools
familienberatung Family-counselling meeting points

πŸ—οΈ Project Structure

zurich-opendata-mcp/
β”œβ”€β”€ src/zurich_opendata_mcp/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ app.py               # Shared FastMCP instance
β”‚   β”œβ”€β”€ server.py            # Console entry + back-compat re-exports
β”‚   β”œβ”€β”€ config.py            # Endpoints, layer maps, resource IDs
β”‚   β”œβ”€β”€ http_client.py       # Shared httpx client + CKAN wrapper
β”‚   β”œβ”€β”€ formatters.py        # Markdown + error formatting
β”‚   β”œβ”€β”€ clients/             # API clients: paris, sparql, tourism, wfs
β”‚   └── tools/               # @mcp.tool implementations:
β”‚                            #   catalog, datastore, geo, parliament,
β”‚                            #   realtime, sparql, strb, tourism,
β”‚                            #   resources (zurich:// URIs)
β”œβ”€β”€ tests/
β”‚   └── test_server.py       # Pydantic + integration tests (live-marked)
β”œβ”€β”€ audits/                  # Code-audit reports
β”œβ”€β”€ .github/workflows/       # ci.yml + publish.yml (Trusted Publisher)
β”œβ”€β”€ pyproject.toml
β”œβ”€β”€ README.md / README.de.md
β”œβ”€β”€ CONTRIBUTING.md / .de.md
β”œβ”€β”€ CHANGELOG.md
β”œβ”€β”€ CLAUDE.md                # Project conventions for Claude
β”œβ”€β”€ LICENSE
└── claude_desktop_config.json

πŸ§ͺ Development

# Install dev dependencies
pip install -e ".[dev]"

# Unit + validation tests (no network)
pytest tests/ -m "not live"

# Live integration tests (against live APIs β€” opt-in)
pytest tests/ -m live

# Linting
ruff check src/ tests/

Safety & Limits

  • Read-only: All tools perform HTTP GET requests only β€” no data is written, modified, or deleted.
  • No personal data: The APIs return open civic datasets (parking occupancy, weather readings, parliamentary proceedings). No personally identifiable information (PII) is processed or stored by this server.
  • Rate limits: CKAN Solr search and ParkenDD are public APIs without documented rate limits; use rows and limit parameters conservatively. The server enforces a 30s timeout per request.
  • Data freshness: Real-time tools (parking, weather, air quality) reflect the upstream source at query time. No caching is performed by this server.
  • Terms of service: Data is subject to the ToS of each source β€” data.stadt-zuerich.ch, ParkenDD, gemeinderat-zuerich.ch. All City of Zurich data is published under CC0 (Open by Default since 2021).
  • No guarantees: This server is a community project, not affiliated with the City of Zurich or any of the API providers. Availability depends on upstream APIs.

πŸ“œ License

MIT License

🀝 Context

All data used is published under open licenses (CC0 / Open by Default since 2021).


Powered by Model Context Protocol β€’ 6 APIs β€’ 24 Tools β€’ 5 Resources

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