swiss-road-mobility-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@swiss-road-mobility-mcpPlan a multimodal trip from Dietikon to Bern"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π¨π Part of the Swiss Public Data MCP Portfolio
π Swiss Road & Mobility MCP Server
MCP Server for Swiss road mobility β shared vehicles, EV charging, traffic alerts, Park & Rail, and multimodal trip planning
Demo
Related MCP server: swiss-rail-mcp
Overview
swiss-road-mobility-mcp provides AI-native access to Swiss road and mobility data sources:
Source | Data | API | Auth |
sharedmobility.ch | Bikes, e-scooters, cars (GBFS) | REST/JSON | None |
ich-tanke-strom.ch | EV charging stations | GeoJSON | None |
opentransportdata.swiss | Traffic events, counting stations | DATEX II / SOAP+XML | Free key |
data.sbb.ch | Park & Rail facilities | REST/JSON (Opendatasoft) | None |
transport.opendata.ch | Public transport connections | REST/JSON | None |
geo.admin.ch | Address geocoding, road classification | REST/JSON | None |
If the Swiss Transport MCP is the GA pass for rail, this server is the vignette + Park & Rail card + sharing subscription for the road β together they paint the complete multimodal picture of Swiss mobility.
Anchor demo query: "I'm in Dietikon with my car. I need to get to Bern. Where can I park? Which train should I take?"
Features
15 tools across six data sources (Phase 1β4)
road_mobility_snapshotβ aggregated mobility overview for any locationroad_multimodal_planβ car + Park & Rail + public transport in one planNo API key required for 12 of 15 tools
Dual transport β stdio (Claude Desktop) + SSE (cloud)
Rate limiting + caching for all endpoints
Prerequisites
Python 3.11+
uv (recommended) or pip
Installation
# Clone the repository
git clone https://github.com/malkreide/swiss-road-mobility-mcp.git
cd swiss-road-mobility-mcp
# Install
pip install -e .
# or with uv:
uv pip install -e .Or with uvx (no permanent installation):
uvx swiss-road-mobility-mcpQuickstart
# stdio (for Claude Desktop)
swiss-road-mobility-mcp
# or:
python -m swiss_road_mobility_mcp.server
# SSE (for cloud / Render.com)
MCP_TRANSPORT=sse MCP_PORT=8001 swiss-road-mobility-mcpTry it immediately in Claude Desktop:
"Show me everything mobility-related at Zurich HB." "Find shared bikes near Bern Bahnhof." "Where can I charge my EV near Lucerne?"
β More use cases by audience β
Configuration
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"swiss-road-mobility": {
"command": "uvx",
"args": ["swiss-road-mobility-mcp"],
"env": {
"OPENTRANSPORTDATA_API_KEY": "<your-token>"
}
}
}
}Or with python:
{
"mcpServers": {
"swiss-road-mobility": {
"command": "python",
"args": ["-m", "swiss_road_mobility_mcp.server"],
"env": {
"OPENTRANSPORTDATA_API_KEY": "<your-token>"
}
}
}
}Shared mobility, EV charging, Park & Rail, and the multimodal planner work without an
OPENTRANSPORTDATA_API_KEY. The key is only required for the DATEX II traffic tools.
Config file locations:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Cloud Deployment (SSE for browser access)
For use via claude.ai in the browser (e.g. on managed workstations without local software):
Render.com (recommended):
Push/fork the repository to GitHub
On render.com: New Web Service -> connect GitHub repo
Set start command:
MCP_TRANSPORT=sse MCP_PORT=8001 swiss-road-mobility-mcpIn claude.ai under Settings -> MCP Servers, add:
https://your-app.onrender.com/sse
SSE security (SEC-009)
A public SSE endpoint is reachable by anyone. To protect it (and your upstream API quota), configure these environment variables on the host:
Variable | Effect |
| When set, every SSE request must send |
| Max requests per client IP per window (default |
| Window length in seconds (default |
| Comma-separated CORS origins for browser clients (default |
The local stdio transport needs none of this β it runs in the user's trusted context.
Observability (OBS-003 / OBS-006)
Variable | Effect |
| Log level: |
|
|
|
|
| OTLP collector URL; setting it also enables tracing. Standard |
Tracing needs the optional extra: pip install 'swiss-road-mobility-mcp[tracing]'.
Once enabled, every upstream API call is traced automatically (httpx
instrumentation) and SSE requests get server spans with W3C trace-context
propagation.
Available Tools
Shared Mobility & EV Charging (no API key required)
Tool | Description | Cache |
| Shared mobility nearby (bikes, e-scooters, cars) | 60s |
| Search sharing stations by name | 5min |
| All sharing providers in Switzerland | 1h |
| EV charging stations nearby | 5min |
| Real-time availability of charging stations | 1min |
| Server & API health check | - |
Traffic (free API key required)
Tool | Description | Cache |
| Accidents, roadworks, congestion from ASTRA/VMZ-CH | 2min |
| Vehicles/h + km/h at counting stations near a position | 1min |
| List counting stations nearby | 24h |
Park & Rail + Multimodal (no API key required)
Tool | Description | Cache |
| Find SBB Park+Rail facilities nearby | 5min |
| Complete mobility overview for a location | - |
| Plan car -> Park+Rail -> public transport -> destination | - |
Geography & Addresses β Phase 4 (no API key required)
Tool | Description | Cache |
| Swiss address -> GPS (official building address register) | - |
| GPS -> official address with EGID/EGAID (GWR) | - |
| Road classification via swissTLM3D | - |
Example Use Cases
Query | Tool |
"Find shared bikes near Zurich HB" |
|
"Where can I charge my EV near Bern?" |
|
"Any traffic incidents on the A1?" |
|
"Where can I park near Winterthur station?" |
|
"Plan my trip from Dietikon to Bern by car + train" |
|
API Key for Traffic Tools
Create a new application -> subscribe to the "Strassenverkehr" API
Copy the token
export OPENTRANSPORTDATA_API_KEY=<your-token>Without a key, the traffic tools return a descriptive error message including the exact registration link β no crash.
Architecture
swiss_road_mobility_mcp/
βββ server.py # FastMCP server, 15 tools
βββ api_infrastructure.py # Rate limiter, cache, HTTP client, geo utilities
βββ shared_mobility.py # sharedmobility.ch
βββ ev_charging.py # ich-tanke-strom.ch
βββ traffic_situations.py # DATEX II traffic alerts (SOAP/XML)
βββ traffic_counters.py # DATEX II counting stations (SOAP/XML)
βββ park_rail.py # SBB Open Data Park & Rail
βββ multimodal.py # Snapshot + trip planner (cross-source)
βββ geo_admin.py # geo.admin.ch geocoding + road classificationData Source Characteristics
Source | Protocol | Coverage | Auth |
sharedmobility.ch | REST/JSON (GBFS) | All CH sharing providers | None |
ich-tanke-strom.ch | GeoJSON | All public EV chargers | None |
opentransportdata.swiss | DATEX II / SOAP+XML | ASTRA traffic data | Free key |
data.sbb.ch | REST/JSON (Opendatasoft) | SBB Park & Rail | None |
transport.opendata.ch | REST/JSON | Public transport schedules | None |
geo.admin.ch | REST/JSON | Official addresses, roads | None |
In-depth docs: docs/ARCHITECTURE.md (MCP primitives,
tool namespacing, use-case catalogue, phase roadmap) Β·
docs/SECURITY.md (credential model, egress allow-list, auth,
MCP conformance table) Β·
docs/OPERATIONS.md (resource limits, restart policy, health).
Project Structure
swiss-road-mobility-mcp/
βββ src/swiss_road_mobility_mcp/
β βββ __init__.py # Package
β βββ server.py # FastMCP server, 15 tools
β βββ api_infrastructure.py # Rate limiter, cache, HTTP client
β βββ shared_mobility.py # Shared vehicles
β βββ ev_charging.py # EV charging stations
β βββ traffic_situations.py # Traffic events
β βββ traffic_counters.py # Vehicle counting
β βββ park_rail.py # Park & Rail
β βββ multimodal.py # Snapshot + trip planning
β βββ geo_admin.py # Geocoding + roads
βββ tests/
β βββ test_integration.py # Live API tests
β βββ test_phase3.py # Park & Rail + multimodal tests
βββ .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 versionKnown Limitations
Shared Mobility: The
sharedmobility.chAPI does not enforce strict radius filtering; vehicles slightly outside the specified radius may appearEV Charging: Station naming conventions vary between operators; some stations may appear without detailed names
Traffic (DATEX II): Requires a free API key; without it, traffic tools return helpful error messages
Park & Rail: SBB occasionally renames endpoints; the server includes a fallback chain
Multimodal Planner: Response time depends on the slowest of the queried sources
Testing
# All tests
pytest tests/ -v
# Quick check (without pytest)
python tests/test_phase3.pySafety & Limits
Read-only: All tools perform HTTP GET requests only β no data is written, modified, or deleted on any upstream system.
No personal data: Location coordinates passed as tool inputs are not stored, logged, or forwarded beyond the immediate API request. API responses contain no PII β only vehicle counts, charger availability, traffic events, and geographic metadata.
Rate limiting: The server enforces client-side rate limits (Shared Mobility: 30 req/60s; EV Charging: 10 req/60s) to protect upstream APIs. The DATEX II key is subject to opentransportdata.swiss fair-use terms.
Caching: Responses are cached in-process (Sharing: 60s Β· EV: 5 min Β· Park+Rail: 5 min Β· Traffic: 1β2 min). Real-time data reflects the cache age, not necessarily the current second.
Terms of service: Data is subject to the ToS of each upstream source β sharedmobility.ch, ich-tanke-strom.ch, opentransportdata.swiss, data.sbb.ch (CC BY), geo.admin.ch (BGDI).
No guarantees: This server is an independent community project, not affiliated with SBB, ASTRA, sharedmobility.ch, or any API provider. Availability depends on upstream services.
Changelog
See CHANGELOG.md
Contributing
See CONTRIBUTING.md
Security
See SECURITY.md for the security posture and vulnerability reporting.
License
MIT License β see LICENSE
Author
Hayal Oezkan Β· malkreide
Credits & Related Projects
sharedmobility.ch: sharedmobility.ch β Swiss shared mobility platform
ich-tanke-strom.ch: ich-tanke-strom.ch β Swiss EV charging network
ASTRA / opentransportdata.swiss: opentransportdata.swiss β Federal traffic data
SBB Open Data: data.sbb.ch β Swiss Federal Railways
geo.admin.ch: geo.admin.ch β Federal geospatial services
Protocol: Model Context Protocol β Anthropic / Linux Foundation
Related: swiss-transport-mcp β Public transport (trains, buses, trams)
Related: zurich-opendata-mcp β 900+ datasets from the City of Zurich
Portfolio: Swiss Public Data MCP Portfolio
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):
{
"mcpServers": {
"swiss-road-mobility-mcp": {
"command": "uvx",
"args": [
"swiss-road-mobility-mcp"
]
}
}
}This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/malkreide/swiss-road-mobility-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server