Zurich Open Data MCP Server

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

๐Ÿ‡จ๐Ÿ‡ญ 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, tourism data, linked data, and real-time environmental and mobility information from the City of Zurich. 20 Tools, 6 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

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

Tourism & Statistics

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

๐Ÿ”— Data Sources

APIEndpointData
CKANdata.stadt-zuerich.ch/api/3/900+ open datasets
Geoportal WFSogd.stadt-zuerich.ch/wfs/geoportal14 geodata layers (GeoJSON)
Paris APIgemeinderat-zuerich.ch/apiParliamentary proceedings & members
Zurich Tourismzuerich.com/en/api/v2/dataAttractions, restaurants, hotels
SPARQLld.stadt-zuerich.ch/queryLinked Open Data / statistics
ParkenDDapi.parkendd.de/ZuerichReal-time parking occupancy

๐Ÿ“Š Available Data Categories

CategoryID
Employmentarbeit-und-erwerb
Base Mapsbasiskarten
Construction & Housingbauen-und-wohnen
Populationbevolkerung
Educationbildung
Energyenergie
Financefinanzen
Leisurefreizeit
Healthgesundheit
Crimekriminalitat
Culturekultur
Mobilitymobilitat
Politicspolitik
Pricespreise
Social Affairssoziales
Tourismtourismus
Environmentumwelt
Administrationverwaltung
Economyvolkswirtschaft

๐Ÿ“ Available Geo Layers

Layer IDDescription
schulanlagenSchool facilities (kindergartens, schools, after-school care)
schulkreiseSchool district boundaries
schulwegeSchool routes and safe paths
stadtkreiseCity district boundaries
quartiereStatistical quarters
spielplaetzePlaygrounds
sportanlagenSports facilities and swimming pools
klimadatenClimate data (temperatures, heat islands)
veloparkierungBicycle parking facilities
lehrpfadeEducational trails
familienberatungFamily counseling meeting points
kreisbueroCity district offices
sammelstelleWaste collection points
zweiradparkierungTwo-wheeler parking

๐Ÿ—๏ธ Project Structure

zurich-opendata-mcp/
โ”œโ”€โ”€ src/zurich_opendata_mcp/
โ”‚   โ”œโ”€โ”€ __init__.py          # Package
โ”‚   โ”œโ”€โ”€ server.py            # MCP Server with 20 tools & 6 resources
โ”‚   โ””โ”€โ”€ api_client.py        # HTTP client for 6 APIs
โ”œโ”€โ”€ tests/
โ”‚   โ””โ”€โ”€ test_integration.py  # 20 integration tests
โ”œโ”€โ”€ .github/workflows/ci.yml # GitHub Actions CI
โ”œโ”€โ”€ pyproject.toml           # Project configuration
โ”œโ”€โ”€ README.md / README.de.md # Documentation (EN/DE)
โ”œโ”€โ”€ CONTRIBUTING.md / .de.md # Contribution guide (EN/DE)
โ”œโ”€โ”€ CHANGELOG.md             # Changelog
โ”œโ”€โ”€ LICENSE                  # MIT
โ””โ”€โ”€ claude_desktop_config.json

๐Ÿงช Development

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

# Integration tests (against live APIs)
python tests/test_integration.py

# Linting
ruff check src/

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 โ€ข 20 Tools โ€ข 6 Resources

Related Servers

NotebookLM Web Importer

Import web pages and YouTube videos to NotebookLM with one click. Trusted by 200,000+ users.

Install Chrome Extension