MCP server for Swiss federal geodata (Swisstopo APIs)
Project description
swisstopo-mcp
MCP server for Swiss federal geodata (Swisstopo APIs)
Gives AI assistants (Claude, etc.) access to Switzerland's official geodata infrastructure — maps, elevation, geocoding, cadastral extracts, and downloadable datasets — through 13 tools across 6 API families.
Features
- 13 tools across 6 API families (REST, Geocoding, Height, STAC, WMTS, ÖREB)
- Geocode Swiss addresses and reverse-geocode coordinates
- Query elevation and compute elevation profiles
- Discover and download geodatasets (orthophotos, 3D buildings, historical maps)
- Identify map features at coordinates across 500+ Swisstopo layers
- Generate shareable map.geo.admin.ch links
- Look up cadastral property IDs (EGRID) and retrieve ÖREB land-use restriction extracts
Quick Start
Installation
pip install swisstopo-mcp
Claude Desktop Configuration
Add the following to your Claude Desktop claude_desktop_config.json:
{
"mcpServers": {
"swisstopo": {
"command": "swisstopo-mcp",
"env": {
"SWISSTOPO_OEREB_CANTONS": "ZH"
}
}
}
}
On macOS the config file is at ~/Library/Application Support/Claude/claude_desktop_config.json.
On Windows it is at %APPDATA%\Claude\claude_desktop_config.json.
Tool Overview
| Tool | Title (DE) | Description |
|---|---|---|
swisstopo_geocode |
Adresse geocodieren | Convert Swiss addresses, place names, or postal codes to coordinates |
swisstopo_reverse_geocode |
Koordinaten zu Adresse | Find the nearest address for given coordinates |
swisstopo_search_layers |
Swisstopo Layer suchen | Search the Swisstopo layer catalog (500+ layers) by keyword |
swisstopo_identify_features |
Features an Koordinate identifizieren | Find map features at a specific coordinate (spatial query) |
swisstopo_find_features |
Features nach Attribut suchen | Search features by attribute value within a layer (e.g., buildings by EGID) |
swisstopo_get_feature |
Feature-Details abrufen | Retrieve full attributes and geometry for a feature by ID |
swisstopo_search_geodata |
Geodaten suchen | Search the STAC catalog for downloadable geodatasets |
swisstopo_get_collection |
Geodaten-Details abrufen | Get details and download links for a STAC collection |
swisstopo_map_url |
Karten-URL generieren | Generate a map.geo.admin.ch URL for browser display |
swisstopo_get_height |
Höhe abfragen | Get elevation above sea level (m a.s.l.) at a coordinate |
swisstopo_elevation_profile |
Höhenprofil berechnen | Compute an elevation profile along a line |
swisstopo_get_egrid |
Grundstück-ID (EGRID) ermitteln | Resolve a cadastral property ID (EGRID) from coordinates |
swisstopo_get_oereb_extract |
ÖREB-Auszug abrufen | Retrieve public-law land-use restrictions (ÖREB) for a parcel |
Environment Variables
| Variable | Default | Description |
|---|---|---|
SWISSTOPO_OEREB_CANTONS |
(none) | Comma-separated list of cantons to use for ÖREB queries (e.g. ZH,BE,LU). Required for swisstopo_get_egrid and swisstopo_get_oereb_extract. |
MCP_TRANSPORT |
stdio |
Transport protocol: stdio (default), sse, or streamable-http |
MCP_PORT |
8000 |
Port for SSE or HTTP transport modes |
Usage Examples
Geocode an address
Ask Claude:
"Where is Bahnhofstrasse 1, Zürich? Give me the coordinates."
Claude will call swisstopo_geocode with the address and return WGS84 coordinates.
Get elevation at a point
Ask Claude:
"What is the elevation at the Uetliberg summit in Zurich?"
Claude will geocode the location and then call swisstopo_get_height.
Identify features on a map layer
Ask Claude:
"What buildings are at coordinates 2683500, 1247500 (LV95)?"
Claude will use swisstopo_identify_features on the buildings layer.
Look up property restrictions
Ask Claude:
"What land-use restrictions apply to the parcel at Musterstrasse 5, Zürich?"
Claude will call swisstopo_get_egrid to find the EGRID, then swisstopo_get_oereb_extract for the full cadastral extract.
Running as HTTP Server
For use in web applications or multi-client scenarios:
MCP_TRANSPORT=sse MCP_PORT=8080 swisstopo-mcp
Development
Setup
git clone https://github.com/schulamt-zh/swisstopo-mcp.git
cd swisstopo-mcp
pip install -e ".[dev]"
Running Tests
# Unit tests only (no network required)
pytest tests/ -m "not live" -v
# All tests including live API calls
pytest tests/ -v
Code Style
This project uses ruff for linting and formatting:
ruff check src/ tests/
ruff format src/ tests/
License
MIT — see LICENSE for details.
Data provided by swisstopo under the Open Government Data terms.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swisstopo_mcp-0.1.0.tar.gz.
File metadata
- Download URL: swisstopo_mcp-0.1.0.tar.gz
- Upload date:
- Size: 31.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a8294f4eebfbe64c5f1f582243d03eb55c01d796d2349e0e32a7e5804a0d266
|
|
| MD5 |
1acb4f70c400561b3cb7a215bc4ad0e9
|
|
| BLAKE2b-256 |
2b9bbe1650ca9c5fb83bb646913d1e96f4e6dac15b79e6a9fe57d5ffc3c79336
|
Provenance
The following attestation bundles were made for swisstopo_mcp-0.1.0.tar.gz:
Publisher:
publish.yml on malkreide/swisstopo-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swisstopo_mcp-0.1.0.tar.gz -
Subject digest:
8a8294f4eebfbe64c5f1f582243d03eb55c01d796d2349e0e32a7e5804a0d266 - Sigstore transparency entry: 1280595706
- Sigstore integration time:
-
Permalink:
malkreide/swisstopo-mcp@61ed03e4b6c08474b28fccd299f6fee600461be0 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/malkreide
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@61ed03e4b6c08474b28fccd299f6fee600461be0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file swisstopo_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: swisstopo_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0772c071e6bc913abed61abcdcffe8933e8305c872b70f85b2ecf8b3e05ceb5c
|
|
| MD5 |
8c70872b844bb04c751206fcd582f44c
|
|
| BLAKE2b-256 |
3e13a5cf92c46e43c4d19b4768e1f687f9afdcaed5f5db5d6c4291d4ffa8b96e
|
Provenance
The following attestation bundles were made for swisstopo_mcp-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on malkreide/swisstopo-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swisstopo_mcp-0.1.0-py3-none-any.whl -
Subject digest:
0772c071e6bc913abed61abcdcffe8933e8305c872b70f85b2ecf8b3e05ceb5c - Sigstore transparency entry: 1280595712
- Sigstore integration time:
-
Permalink:
malkreide/swisstopo-mcp@61ed03e4b6c08474b28fccd299f6fee600461be0 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/malkreide
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@61ed03e4b6c08474b28fccd299f6fee600461be0 -
Trigger Event:
release
-
Statement type: