Server data from the Official MCP Registry
Swiss federal geodata: geocoding, height, STAC, WMTS, OEREB and more
Swiss federal geodata: geocoding, height, STAC, WMTS, OEREB and more
Valid MCP server (1 strong, 4 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry.
5 files analyzed Β· 1 issue found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-malkreide-swisstopo-mcp": {
"args": [
"swisstopo-mcp"
],
"command": "uvx"
}
}
}From the project's GitHub README.
π¨π Part of the Swiss Public Data MCP Portfolio
MCP server for Swiss federal geodata -- maps, elevation, geocoding, cadastral extracts, and downloadable datasets via Swisstopo APIs
swisstopo-mcp gives AI assistants access to Switzerland's official geodata infrastructure through 19 tools, all without authentication:
| Source | Data | API |
|---|---|---|
| Swisstopo REST API | 500+ geodata layers (buildings, boundaries, land use) | REST/JSON |
| Geocoding | Official addresses, place names, postal codes | REST/JSON |
| Height Service | Elevation above sea level, elevation profiles | REST/JSON |
| STAC Catalog | Orthophotos, elevation models, 3D buildings | STAC 0.9 |
| WMTS | National maps, aerial images, zoning maps | URL builder |
| OEREB Cadastre | Public-law restrictions, parcels | REST/JSON (cantonal) |
| geodienste.ch | Interkantonale Basisgeodaten (cadastral survey, contaminated sites, hazard maps, β¦) | OGC API Features / WMS / WFS |
| OpenStreetMap | Points of interest (schools, playgrounds, pharmacies, β¦) | Overpass API (ODbL) |
| OpenPLZ API | Administrative address level: postal codes β commune (BFS number) β district β canton | REST/JSON (BFS + swisstopo OGD) |
Anchor demo query: "Which communes are in the Uster district, and what are their BFS numbers for joining with BFS statistics data?"
(The BFS commune number is the official join key to swiss-statistics-mcp and zurich-opendata-mcp β this is what turns a geodata wrapper into a semantic connector at the commune level.)
β More use cases by audience β
# Clone the repository
git clone https://github.com/malkreide/swisstopo-mcp.git
cd swisstopo-mcp
# Install
pip install -e .
# or with uv:
uv pip install -e .
Or with uvx (no permanent installation):
uvx swisstopo-mcp
# stdio (for Claude Desktop)
python -m swisstopo_mcp.server
# Streamable HTTP (port 8000)
python -m swisstopo_mcp.server --http --port 8000
Try it immediately in Claude Desktop:
"Where is Bahnhofstrasse 1, Zurich? Give me the coordinates." "What is the elevation at the Uetliberg summit?" "What buildings are at coordinates 2683500, 1247500 (LV95)?"
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"swisstopo": {
"command": "python",
"args": ["-m", "swisstopo_mcp.server"]
}
}
}
Or with uvx:
{
"mcpServers": {
"swisstopo": {
"command": "uvx",
"args": ["swisstopo-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 swisstopo_mcp.server --http --port 8000https://your-app.onrender.com/sse| Tool | Description |
|---|---|
swisstopo_search_layers | Search the Swisstopo layer catalog (500+ layers) by keyword |
swisstopo_identify_features | Find map features at a specific coordinate (spatial query) |
swisstopo_find_features | Search features by attribute value within a layer (e.g. buildings by EGID) |
swisstopo_get_feature | Retrieve full attributes and geometry for a feature by ID |
| Tool | Description |
|---|---|
swisstopo_geocode | Convert Swiss addresses, place names, or postal codes to coordinates |
swisstopo_reverse_geocode | Find the nearest address for given coordinates |
| Tool | Description |
|---|---|
swisstopo_get_height | Get elevation above sea level (m a.s.l.) at a coordinate |
swisstopo_elevation_profile | Compute an elevation profile along a line |
| Tool | Description |
|---|---|
swisstopo_search_geodata | Search the STAC catalog for downloadable geodatasets |
swisstopo_get_collection | Get details and download links for a STAC collection |
| Tool | Description |
|---|---|
swisstopo_map_url | Generate a map.geo.admin.ch URL for browser display |
| Tool | Description |
|---|---|
swisstopo_get_egrid | Resolve a cadastral property ID (EGRID) from coordinates |
swisstopo_get_oereb_extract | Retrieve public-law land-use restrictions (OEREB) for a parcel |
One faΓ§ade over several map/layer sources, kept under the 18-tool budget (see
docs/geodaten-erweiterung-phase1.md):
| Tool | Description |
|---|---|
list_available_layers | Discover layer keys for query_geodata (strassenverzeichnis, oereb-verfuegbarkeit, geodienste:<topic>:<canton>); filters to contract-free geodienste datasets |
query_geodata | Query a chosen layer by point / bbox / commune β amtliches Strassenverzeichnis, interkantonale geodienste.ch data (OGC API Features), or ΓREB availability |
query_osm_features | OpenStreetMap POIs (schools, playgrounds, pharmacies, β¦) around a point via Overpass β separate source, ODbL (Β© OpenStreetMap contributors) |
The amtliche address hierarchy PLZ β commune β district β canton, served by
the OpenPLZ API (data: BFS municipal directory +
swisstopo street directory, Swiss OGD β a separate source and licence from
the swisstopo geodata above). Every commune-bearing response exposes
bfs_commune_number as a named top-level field: the official join key to
BFS statistics (swiss-statistics-mcp) and zurich-opendata-mcp.
| Tool | Description |
|---|---|
lookup_postal_code | Resolve a Swiss postal code β locality, commune (+BFS number), district, canton |
find_commune | Resolve a commune both directions (name β bfs_number) or list all communes of a canton / district. Accepts canton abbreviation (ZH) or key (1); resolution happens server-side |
search_address | Full-text search over Swiss streets and localities, returning commune + BFS number per hit |
| Query | Tool |
|---|---|
| "Where is Bahnhofstrasse 1, Zurich?" | swisstopo_geocode |
| "What is the elevation at the Uetliberg summit?" | swisstopo_get_height |
| "What buildings are at coordinates 2683500, 1247500?" | swisstopo_identify_features |
| "Find orthophoto datasets for download" | swisstopo_search_geodata |
| "Show me a map of Bern at zoom level 10" | swisstopo_map_url |
| "What restrictions apply to parcel at Musterstrasse 5?" | swisstopo_get_egrid + swisstopo_get_oereb_extract |
| "Which schools are within 500 m of Bederstrasse 109, 8002 ZΓΌrich, and which streets lead there?" | query_osm_features + query_geodata (strassenverzeichnis) |
| "Which contaminated-sites data is free for canton ZH?" | list_available_layers + query_geodata (geodienste:kataster_belasteter_standorte:ZH) |
| "Which communes are in the Uster district and what are their BFS numbers?" | find_commune (district=109) |
| "Which commune and canton does postal code 8001 belong to?" | lookup_postal_code |
| "What is the BFS number of Winterthur (to join with BFS statistics)?" | find_commune (name=Winterthur) |
βββββββββββββββββββ ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ
β Claude / AI ββββββΆβ swisstopo-mcp ββββββΆβ Swisstopo REST API β
β (MCP Host) βββββββ (MCP Server) βββββββ api3.geo.admin.ch β
βββββββββββββββββββ β β ββββββββββββββββββββββββββββ€
β 19 Tools ββββββΆβ Geocoding β
β Stdio | Streamable HTTP βββββββ api3.geo.admin.ch β
β β ββββββββββββββββββββββββββββ€
β No authentication required ββββββΆβ STAC Catalog β
β (all tools; OEREB canton opt) βββββββ data.geo.admin.ch β
β β ββββββββββββββββββββββββββββ€
β ββββββΆβ OEREB Cadastre β
β βββββββ (cantonal endpoints) β
β β ββββββββββββββββββββββββββββ€
β ββββββΆβ geodienste.ch (OGC API) β
β βββββββ overpass.osm.ch (ODbL) β
β β ββββββββββββββββββββββββββββ€
β BFS-Nr = join key to ββββββΆβ OpenPLZ API β
β swiss-statistics-mcp βββββββ openplzapi.org (BFS/OGD)β
ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ
swisstopo-mcp/
βββ src/swisstopo_mcp/
β βββ __init__.py # Package version
β βββ server.py # MCP server wiring (tool registrations)
β βββ api_client.py # Shared HTTP client (httpx + error handling)
β βββ geocoding.py # swisstopo_geocode, swisstopo_reverse_geocode
β βββ rest_api.py # swisstopo_search_layers, identify, find, get_feature
β βββ height.py # swisstopo_get_height, swisstopo_elevation_profile
β βββ stac.py # swisstopo_search_geodata, swisstopo_get_collection
β βββ wmts.py # swisstopo_map_url
β βββ oereb.py # swisstopo_get_egrid, swisstopo_get_oereb_extract
β βββ geodata.py # query_geodata + list_available_layers (faΓ§ade)
β βββ overpass.py # query_osm_features (OpenStreetMap / Overpass)
β βββ openplz.py # lookup_postal_code, find_commune, search_address (OpenPLZ)
βββ tests/
β βββ test_api_client.py
β βββ test_geocoding.py
β βββ test_height.py
β βββ test_oereb.py
β βββ test_rest_api.py
β βββ test_stac.py
β βββ test_wmts.py
β βββ test_geodata.py
β βββ test_overpass.py
β βββ test_openplz.py
β βββ test_retry.py
βββ .github/workflows/ci.yml # GitHub Actions (Python 3.11/3.12/3.13)
βββ pyproject.toml
βββ CHANGELOG.md
βββ CONTRIBUTING.md # Contribution guide (English)
βββ CONTRIBUTING.de.md # Contribution guide (German)
βββ SECURITY.md # Security policy (English)
βββ SECURITY.de.md # Security policy (German)
βββ LICENSE
βββ README.md # This file (English)
βββ README.de.md # German version
The full security policy and posture is documented in SECURITY.md.
This server is in Phase 1 β Read-only wrapper. All 19 tools are
readOnlyHint: true / destructiveHint: false; there are no write or send
capabilities. See docs/roadmap.md for later phases.
| Capability | Status | Rationale |
|---|---|---|
| Access to private data | β No | Public Open Data only (federal/cantonal geodata) |
| Exposure to untrusted content | β οΈ Limited | Reads only from a fixed allow-list of trusted geo.admin / OEREB hosts |
| External communication (write/send) | β No | Read-only; no mail/webhook/write tools |
Trifecta score: at most 1 of 3 β safe by design.
Outbound requests are restricted to an explicit code-layer allow-list and redirects are disabled β see docs/network-egress.md.
For containerised HTTP deployments, a hardened Dockerfile and Kubernetes
manifests (non-root, read-only root filesystem, dropped capabilities, egress
NetworkPolicy) are provided β see docs/deployment.md.
The MCP protocol version is negotiated by the mcp SDK, which is pinned to the
1.x major in pyproject.toml so an update cannot silently change the
negotiated version. SDK bumps are proposed monthly via Dependabot and tracked
in CHANGELOG.md.
The server is unauthenticated by design β it serves only public open data. Over HTTP, session IDs are managed entirely by the FastMCP framework; there is no per-user state, so there is nothing user-specific to bind a session to. If an authenticated deployment is ever introduced, session IDs must be bound to the validated user identity (audit finding SEC-009).
ToolResponse with is_error: true and a user-friendly summary; raw
exception text is never leaked to the client (it is logged to stderr instead).-32602 invalid
params). Input validation happens at the Pydantic boundary (SEC-018).This server intentionally exposes Tools only (no Resources or Prompts): it is a Phase-1 read-only wrapper, and every result is a live, parameterised API query rather than a static addressable document. Resources/Prompts may be added in a later phase if stable URI schemes emerge.
Most tools return a thought-complete result in a single call. Two domains use a short, documented discovery chain (each tool's description states the next step):
swisstopo_search_layers (find layer IDs) β
swisstopo_identify_features / swisstopo_find_features β
swisstopo_get_feature (full detail).swisstopo_geocode β swisstopo_get_egrid β
swisstopo_get_oereb_extract.swisstopo_search_geodata β swisstopo_get_collection.Every tool returns a structured ToolResponse (FastMCP emits it as structured
content with an output schema, plus a JSON text block):
| Field | Meaning |
|---|---|
summary | Human-readable Markdown summary |
results | Machine-readable structured records |
count | Number of results |
match_type | exact / fuzzy / none (search-style tools) |
source / license | Data attribution (OGD-CH, CC/OGD terms) |
provenance / retrieved_at | How and when the data was obtained |
is_error | true for handled errors |
The OpenPLZ endpoints were probed live before implementation. Findings baked into the tools:
| Endpoint / behaviour | Result | Handling |
|---|---|---|
/Cantons | 200, 26 records, key = BFS canton number (ZH = 1) | canton abbreviation resolved from this list |
/Cantons/{key}/Districts|Communes | 200 | path param is the numeric key |
/Cantons/ZH/Districts (abbreviation) | 200 + [] β not an error | ZHβ1 resolved server-side; empty answer gets an explanatory note |
/Localities?postalCode=8001 | 200, commune.key = 261 (BFS ZΓΌrich) | bfs_commune_number surfaced top-level |
/Localities?postalCode=9999 (unknown) | 200 + [] | reported as a note β empty β absent |
| list endpoints pagination | default pageSize=10, hard max 50 (100 β HTTP 400) | tools iterate pages via x-total-count |
raw umlaut in query (?name=ZΓΌrich) | HTTP 400 | httpx URL-encodes params automatically |
historicalCode field | β key for communes (historized-directory id) | not used; the join key is the current key |
| bulk dump | none from OpenPLZ (only /swagger) | Architecture A (live-API-only) β adequate for a lookup connector |
The abbreviation-vs-key trap in one line: an empty OpenPLZ list is almost never proof that something does not exist β it usually means a wrong path parameter (an abbreviation where a numeric key was expected). The tools resolve abbreviations server-side and annotate every empty result.
# Unit tests (no network required)
pytest tests/ -m "not live"
# Integration tests (live API calls)
pytest tests/ -m "live"
See CHANGELOG.md
See CONTRIBUTING.md
MIT License -- see LICENSE
Data provided by swisstopo under Open Government Data terms.
Hayal Oezkan Β· malkreide
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):
{
"mcpServers": {
"swisstopo-mcp": {
"command": "uvx",
"args": [
"swisstopo-mcp"
]
}
}
}
Be the first to review this server!
by Modelcontextprotocol Β· Developer Tools
Web content fetching and conversion for efficient LLM usage
by Toleno Β· Developer Tools
Toleno Network MCP Server β Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace Β· Developer Tools
Create, build, and publish Python MCP servers to PyPI β conversationally.