
Zurich Opendata Mcp
io.github.malkreide由 GitHub 帳號 malkreide 發布v0.8.0更新於 Oct 27, 2026
City of Zurich weather, air quality, parking, geodata, Gemeinderat, tourism
概覽
本機 MCP 伺服器,讓助理以唯讀方式存取蘇黎世市開放資料:900 多個資料集、即時天氣、空氣品質、停車、地理資料、議會與旅遊資訊。
- 可以做什麼
- 搜尋、檢視並查詢蘇黎世開放資料目錄,包含 DataStore 篩選、SQL、分類與標籤
- 讀取即時環境資料:天氣、空氣品質與蘇黎世湖水温水位
- 查看即時交通資料:停車場占用、行人流量與大眾運輸運量
- 列出並取得 GeoJSON 地理圖層,例如學校、市區、遊樂場與氣候資料
- 檢索議會提案與議員,並依部門或編號查詢市議會決議
- 取得旅遊景點、餐飲與住宿資訊,並執行目錄分析與統計工具
- 適用情境
- 適合需要助理回答蘇黎世市政資料、地方統計、城市即時狀況或市政政治問題的情境,不必自行撰寫 API 呼叫。適用於研究、新聞、規劃與公民科技工作。
- 執行需求
- 以本機 Python 套件執行(Python 3.11+、mcp[cli] 2.x),可透過 uvx 或 pip 安裝;不需帳號或 API 金鑰。需要連外網路存取蘇黎世公開資料 API。SPARQL 工具預設關閉,需設定環境變數 ZURICH_OPENDATA_ENABLE_SPARQL=1 才會啟用。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Zurich Opendata Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
🇨🇭 Part of the Swiss Public Data MCP Portfolio
🏙️ Zurich Open Data MCP Server
[PyPI] [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. 23 Tools (+3 deprecated aliases), 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+ datasetszurich_get_dataset– Complete metadata and download URLs for a datasetzurich_datastore_query– Query tabular data directly (filters, sorting)zurich_datastore_sql– SQL queries on the DataStorezurich_list_categories– Browse 19 thematic categorieszurich_list_tags– Tag-based thematic search
Real-Time Environmental Data
zurich_weather_live– 🌤️ Current weather (temperature, humidity, pressure, rain) from 4 UGZ stationszurich_air_quality– 🌬️ Live air quality (NO₂, O₃, PM10, PM2.5) with WHO thresholdszurich_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 layerszurich_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 (endpoint not productive yet — the tool is not registered by default; opt in with the environment variableZURICH_OPENDATA_ENABLE_SPARQL=1)
Stadtratsbeschlüsse (Council Resolutions)
zurich_strb_search– 📜 Full-text search of public council resolutions (title, department, date range)zurich_strb_by_department– 📜 List all resolutions of a department (e.g.SSD,FD,PRD)zurich_strb_detail– 📜 Single resolution byNNNN/YYYYnumber
(The former names search_stadtratsbeschluesse, get_beschluesse_by_departement and get_stadtratsbeschluss_detail remain available as deprecated aliases until the next major release.)
Analysis Tools
zurich_analyze_datasets– Comprehensive analysis: relevance, recency, data structurezurich_catalog_stats– Catalog overview with statisticszurich_find_school_data– Curated search for education-related datasets
MCP Resources
zurich://dataset/{name}– Dataset metadatazurich://category/{group_id}– Category detailszurich://parking– Current parking datazurich://geo/{layer_id}– GeoJSON geodata (14 layers)zurich://tourism/categories– Tourism categories
🚀 Installation
Prerequisites
- Python 3.11+
- pip or uv
mcp[cli]2.x — installed automatically; the server uses the 2.x API (mcp.server.mcpserver) and cannot run onmcp1.x
Use 0.6.0 or newer. Release
0.5.1declaredmcp[cli]>=1.28.1with no upper bound. Oncemcp2.0.0 removedmcp.server.fastmcp, every fresh install of0.5.1resolved to 2.0.0 and failed at import withModuleNotFoundError.0.6.0runs on the 2.x API and pins>=2.0.0,<3. If you are pinned to0.5.1, upgrade — there is no working configuration of that release left.
Install
⚙️ Configuration
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
Alternatively, using the installed command:
Claude Code (CLI)
Cursor / VS Code
Add to .vscode/settings.json:
💬 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" →
zurich_strb_search - "List all SSD resolutions in 2025" →
zurich_strb_by_department - "Show council resolution 1203/2025" →
zurich_strb_detail
Tourism
- "What restaurants does Zurich Tourism recommend?" →
zurich_tourism
🔗 Data Sources
📊 Available Data Categories
📍 Available Geo Layers
Source of truth: GEOPORTAL_LAYERS in src/zurich_opendata_mcp/config.py.
🏗️ Project Structure
🧪 Development
🌐 HTTP transport
By default the server speaks MCP over stdio. --http serves Streamable HTTP
instead:
The loopback default is deliberate. Binding 0.0.0.0 exposes the server on
every interface, to everyone who can reach the machine — there is no
authentication in front of it.
Set MCP_ALLOWED_HOSTS whenever you bind beyond loopback. It guards against
DNS rebinding: a page on your network resolves its own hostname to this
server's address and then talks to it from the browser. From the browser's point
of view that request is same-origin, so no origin rule stops it — only the
Host check does.
Left unset on a non-loopback bind, the check stays off and a warning is
logged. That is the right default only when something in front of the server
validates Host. It is deliberately not guessed: on 0.0.0.0 the reachable
name is unknowable inside the process, and a wrong guess would answer the very
deployment it is meant to protect with 421 on every request.
MCP Protocol Version
This server speaks two protocol eras over the same endpoint. The client's first request on a connection decides which one applies; a later claim from the other era is refused.
Both revisions are pinned in
tests/test_protocol_version.py, and the
gate checks them twice over: it measures the revision an in-process
mcp.Client actually negotiates against this server (both eras, over a memory
transport — no ASGI, no network), and it reads the SDK constants so a
Dependabot bump of mcp cannot move either one silently. The measured half is
the load-bearing one: it fails even when an era stops being served while its
constant stays put.
Note that the SDK's LATEST_PROTOCOL_VERSION is an alias for the modern
era, not for the handshake era — pinning against it alone would leave the era
that current clients actually negotiate free to drift.
What this server does natively on 2026-07-28
The revision is not just a number the SDK reaches. Three of its changes ask something of the server itself, and this one answers all three:
Minor change #3 (tools/list SHOULD be deterministically ordered) is met
by the tool manager's insertion order, which follows the import order fixed in
server.py; a test compares the wire order against it.
One property is the SDK's, not this server's: because subscriptions/listen
is served, the capability block advertises listChanged and
resources.subscribe. This server's directories are fixed at import and it
never emits a change notification. That is measured and left as is — the
capability says the method is served, which is true.
Update policy. When the gate fails, do not edit the constant blindly: read
the spec changelog between the two revisions, verify the server still behaves,
then move the constant, this section, README.de.md and
CHANGELOG.md together.
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
rowsandlimitparameters conservatively. The server enforces a 30s timeout per request; transient upstream errors (connect failures, HTTP 502/503/504) are retried once with a short backoff. - Data freshness: Real-time tools (parking, weather, air quality) reflect the upstream source at query time. Measurement data is never cached; only the lookup of the current per-year UGZ resource ID (weather/air quality) is cached in-process for 24h.
- 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.
🤝 Contributing
Contributions are welcome — see CONTRIBUTING.md (Deutsch).
🔒 Security
Read-only, no PII, no authentication, a fixed set of public-data endpoints. See SECURITY.md (Deutsch) for the full security posture and accepted-risk decisions.
📜 License
MIT License — see LICENSE. All data used is published under open licenses (CC0 / Open by Default since 2021).
👤 Author
Hayal Oezkan · malkreide
Powered by Model Context Protocol • 6 APIs • 23 Tools • 5 Resources
Installation
Run via uv's uvx — no clone or manual install needed. Add to your MCP client config (mcpServers for Claude Desktop, Cursor and Windsurf; use a top-level servers key for VS Code in .vscode/mcp.json):
來源:README.md,提交 c2e3b2d
工具
0版本歷史
2- v0.8.0最新Sep 20, 2026
- v0.7.0Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分