swiss-public-transport-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-public-transport-mcpplan a journey from Zurich to Bern tomorrow at 10am"
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.
swiss-public-transport-mcp
MCP server for Swiss public transport — connections, stationboards, real-time delays, and direct booking links for SBB.
Wraps transport.opendata.ch — free, no API key, no signup. Covers the full Swiss network (SBB, Postauto, regional, trams, buses, ships, cableways).
Why this server
Zero config. Install and go — no account, no token, no env vars.
Booking links. Returns deep links into SBB.ch so the user can buy a ticket in one click.
Disambiguation built in. Ambiguous station names return candidates instead of failing silently.
Compact, model-friendly output. Formatted text designed for LLM context windows, not raw JSON dumps.
Related MCP server: swiss-rail-mcp
Tools
Tool | Purpose |
| Resolve a station/stop/POI by name or coordinates |
| Plan A → B with via, transport-type filters, arrival-time mode |
| Live departures or arrivals from any stop |
| Build an SBB.ch URL for a journey so the user can buy a ticket |
Install
No install needed — run directly with uvx:
uvx swiss-public-transport-mcpClaude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"swiss-public-transport": {
"command": "uvx",
"args": ["swiss-public-transport-mcp"]
}
}
}Config file location:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Development
git clone https://github.com/tpjnorton/swiss-public-transport-mcp.git
cd swiss-public-transport-mcp
uv sync
uv run swiss-public-transport-mcpRelated project
If you need official opentransportdata.swiss data — SIRI-SX disruption alerts, occupancy forecasts, OJP Fare ticket prices, train formation — see malkreide/swiss-transport-mcp. It exposes ~11 tools across the official OJP 2.0 / SIRI / CKAN APIs and requires a (free) API key from the opentransportdata.swiss API Manager.
this server | malkreide/swiss-transport-mcp | |
Data source | transport.opendata.ch | opentransportdata.swiss (official) |
API key | none | required (free signup) |
Tools | 4 (journey planning + booking links) | 11 (planning + disruptions + occupancy + fares + formation) |
Setup | one command | per-API key configuration |
Best for | quick journey planning, fast LLM responses, ticket purchase flow | rich operational data, official feeds |
The two servers cover overlapping but distinct use cases — you can install both side by side.
Available Tools
4 toolsget_booking_linkA
Get a direct link to buy tickets on sbb.ch for a specific journey.
Use this when someone wants to:
Buy a ticket ("book me a train from Zürich to Bern")
Get a link to the SBB website for a specific route and time
Share a timetable link with someone
Returns a ready-to-click URL that opens SBB's timetable with the search pre-filled.
| Name | Required | Description | Default |
|---|---|---|---|
| from_station | Yes | ||
| to_station | Yes | ||
| date | No | ||
| time | No | ||
| is_arrival_time | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It transparently states that the tool returns a 'ready-to-click URL' with search pre-filled. While it could mention error behavior or rate limits, the core behavioral trait is clearly disclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, with three bullet points and a summary sentence. Every sentence adds value, no fluff, and the most important information is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has 5 parameters (2 required) and an output schema. The description covers the overall purpose and return value well but omits details on optional parameters and input validation. For a straightforward URL-generation tool, this is mostly adequate but could be slightly more complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage, and the tool description does not explain any parameters. Though the description mentions 'specific journey', it does not detail what each parameter (from_station, to_station, date, time, is_arrival_time) means or how to format them, leaving the agent without guidance beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool returns a direct booking link for a specific journey. It lists concrete use cases like buying a ticket or sharing a timetable link, effectively distinguishing it from siblings like 'plan_journey' or 'get_stationboard'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly gives three scenarios for using the tool ('buy a ticket', 'get a link', 'share a timetable link'), which guides the agent on when to invoke it. However, it does not explicitly state when NOT to use it or mention alternatives among siblings, leaving some ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_stationboardA
Check what's departing or arriving at a Swiss station right now.
Use this to:
See upcoming departures ("what trains leave from Bern soon?")
Check if a specific service is delayed or cancelled
Browse arrivals at a station
Filter by transport type (trains only, buses only, etc.)
Returns a live board with times, platforms, destinations, and delay status.
| Name | Required | Description | Default |
|---|---|---|---|
| station | Yes | ||
| mode | No | departure | |
| limit | No | ||
| datetime | No | ||
| transport_types | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses that the tool returns live data with times, platforms, destinations, and delays. However, it does not mention any potential rate limits, authentication needs, or side effects, though the tool is read-only and safe.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise: a brief intro, bullet-pointed use cases, and a summary sentence. It is well-structured, front-loaded, and contains no extraneous text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the 5 parameters and existence of an output schema, the description covers the main functionality and return format. It lacks details on error handling or constraints (e.g., valid stations), but is adequate for the tool's purpose.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate. It explains transport_types filtering and implies mode via 'departures/arrivals', but does not explicitly describe station, limit, or datetime parameters, leaving significant gaps in parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool checks departures/arrivals at Swiss stations with specific use cases. It uses a strong verb ('Check') and resource ('stationboard'), and the sibling tools (plan_journey, search_locations, get_booking_link) are distinct, so differentiation is clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit use cases in bullet points, making it clear when to use this tool. However, it does not explicitly state when not to use it or directly name alternatives like plan_journey for journey planning, leaving a slight gap.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
plan_journeyA
Plan a journey through Switzerland by train, bus, tram, boat, or cableway.
Use this whenever someone wants to:
Travel from A to B (e.g., "how do I get from Zürich to Zermatt?")
Plan a multi-stop trip (use
viafor intermediate stops)Find the best connection for a specific date/time
Arrive somewhere by a deadline (set
is_arrival_time=True)Compare route options across different transport types
Returns real-time schedules with platform numbers, delays, transfers, and occupancy levels. Call multiple times with different legs to plan a full day itinerary visiting several places.
| Name | Required | Description | Default |
|---|---|---|---|
| from_station | Yes | ||
| to_station | Yes | ||
| via | No | ||
| date | No | ||
| time | No | ||
| is_arrival_time | No | ||
| transport_types | No | ||
| limit | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so description carries full burden. It discloses that the tool returns real-time schedules with platform numbers, delays, transfers, and occupancy levels. It also mentions calling multiple times for full day itinerary. Does not mention destructive actions or authentication needs, but overall adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with three sentences plus bullet-like usage list. Information is front-loaded with purpose, then usage scenarios, then return details. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given there is an output schema, description does not need to explain returns. It covers usage, key parameters, and behavior. However, with 8 parameters and only partial description, it could be more thorough. Still adequate for most use cases.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so description must compensate. It explains only some parameters: 'from_station', 'to_station', 'via', and 'is_arrival_time'. It does not explain 'date', 'time', 'transport_types', or 'limit'. This partial coverage provides some value but leaves gaps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it plans a journey through Switzerland by specific transport types. It lists explicit use cases (from A to B, multi-stop, etc.) and the verb 'plan' with resource 'journey' is specific. Distinguishes from siblings like get_booking_link, get_stationboard, search_locations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'Use this whenever someone wants to:' and lists four scenarios. It gives clear context but does not mention when not to use it or compare with alternatives. Parenthetical examples like 'use `via` for intermediate stops' provide guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_locationsA
Find Swiss train stations, bus stops, and other transport locations.
Use this to:
Look up a station name (e.g., "Bern", "Zürich HB", "Interlaken")
Find stations near GPS coordinates (e.g., near your hotel)
Resolve ambiguous names before planning a journey
Returns station IDs, coordinates, and relevance scores.
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | ||
| latitude | No | ||
| longitude | No | ||
| type | No | station |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must bear the full burden. It does not declare whether the tool is read-only or describe any side effects, though it implies a query-like operation. The mention of 'returns station IDs, coordinates, and relevance scores' is helpful, but lacks explicit behavioral transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured, using a short paragraph with bullet points. Every sentence adds value, and the purpose is front-loaded. No redundant or filler content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the output schema exists, return values are covered. The description addresses key aspects: search by name or coordinates, and resolving ambiguity. However, it omits explanation of the 'type' parameter and does not mention any result limits or pagination, leaving minor gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description adds some meaning by mapping use cases to parameters: 'query' for name, 'latitude'/'longitude' for GPS. However, the 'type' parameter is not described, leaving a gap. The description provides partial compensation, but not full coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Find Swiss train stations, bus stops, and other transport locations.' It distinguishes from siblings like get_booking_link, get_stationboard, and plan_journey, which handle different tasks. The verb 'search' and resource 'locations' are specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit use cases: look up station name, find near GPS, resolve ambiguous names. It implies usage before planning a journey, but does not explicitly state when not to use or mention alternatives. However, it gives sufficient context for appropriate use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
All four tools serve clearly distinct purposes: searching locations, planning journeys, checking station boards, and generating booking links. There is no overlap or ambiguity.
All tool names follow a consistent verb_noun pattern (get_booking_link, get_stationboard, plan_journey, search_locations) with underscores and no mixing of conventions.
Four tools is exactly right for a public transport MCP server—core functionalities (search, plan, live board, booking) are each covered by a single tool without unnecessary fragmentation or overlap.
The server covers the essential user journeys: finding stations, planning trips, checking real-time departures, and purchasing tickets. Minor gaps like disruptions alerts or fare details are absent but do not severely hinder common use cases.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Swiss Transport MCP — wraps Transport Open Data API (free, no auth)
Canonical SwissTrip MCP — independent SBB/CFF/FFS schedules, prices, and ticket links by SwissTrip.
iRail MCP — Belgian rail (SNCB/NMBS) real-time via the community iRail API
SEPTA MCP — Philadelphia SEPTA real-time transit (www3.septa.org/api, keyless)
Related MCP Servers
- AlicenseAqualityFmaintenanceIndependent MCP client by swsistrip for Swiss Federal Railways (SBB/CFF/FFS) — all schedules, prices, ticket links via SBB's official SMAPI.9233Unlicense - libtelnet variant
- AlicenseAqualityDmaintenanceA zero-authentication MCP server for Swiss public transport, enabling users to query train connections, disruptions, station facilities, and plan journeys using natural language.12MIT
- AlicenseAqualityAmaintenanceAn MCP server for Swiss Federal Railways (SBB) open data, enabling AI models to query real-time disruptions, passenger frequencies, station details, and more without an API key.102MIT
- FlicenseAqualityDmaintenanceMCP server for querying German public transport information, including station search, live departures/arrivals, and journey planning.5
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/tpjnorton/swiss-public-transport-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server