sbb-mcp
sbb-mcp
用于 SwissTrip SBB MCP 服务的 MCP 客户端。将 AI 助手连接到瑞士联邦铁路 (SBB / CFF / FFS) 的实时数据:列车时刻表、车站搜索、票价以及直接购票链接。
该软件包是一个轻量级客户端。所有 SBB API 访问、票务和个人资料同步均在托管的 SwissTrip 服务器 https://mcp.swisstrip.app/mcp 上运行。
安装
Claude Desktop
添加到 claude_desktop_config.json:
{
"mcpServers": {
"sbb": {
"command": "npx",
"args": ["-y", "sbb-mcp"]
}
}
}Cursor
添加到 ~/.cursor/mcp.json:
{
"mcpServers": {
"sbb": {
"command": "npx",
"args": ["-y", "sbb-mcp"]
}
}
}ChatGPT (Plus / Pro / Business / Enterprise,需开启开发者模式)
无需安装。添加一个指向以下地址的自定义连接器:
https://mcp.swisstrip.app/mcpRelated MCP server: swiss-rail-mcp
工具
search_stations— 查找瑞士车站、地址和兴趣点search_connections— 两个车站之间的列车时刻表get_trip_details— 包含所有中途停靠站的详细行程get_more_connections— 获取之前搜索结果的更早或更晚的列车get_prices— 包含半价卡 (Halbtax) / 通票 (GA) 折扣的票价get_ticket_link— SBB.ch 的直接购买链接save_profile/get_profile— 在本地保存您的旅行资料list_travelers— 多旅客家庭定价(需要SWISSTRIP_TOKEN)
可选配置
环境变量 | 用途 |
| 从您的 SwissTrip 账户同步旅客资料。请在 https://swisstrip.app/settings/developer 获取。 |
| 覆盖托管服务器 URL。默认: |
许可
专有软件。请参阅 LICENSE。© 2026 SwissTrip。
商业许可咨询:fabsforward2@gmail.com。
Available Tools
9 toolsget_more_connectionsGet More ConnectionsARead-onlyIdempotent
Load earlier or later train connections for a previous search. Use the collection ID from search_connections results.
Inputs: collection_id (required), direction (required).
get_pricesGet PricesARead-onlyIdempotent
Get ticket prices for one or more train connections. Supports Half-Fare card (Halbtax) and GA travelcard discounts. When connected to SwissTrip (SWISSTRIP_TOKEN), pass traveler_names to get family pricing for multiple travelers.
Inputs: trip_ids (required), traveler_type, reduction_card, traveler_names.
get_profileGet Travel ProfileARead-onlyIdempotent
Read the user's saved travel profile. Check this before showing prices to use correct reduction card. If no profile exists, ask the user for their details.
Inputs: no named parameters.
get_ticket_linkGet Ticket LinkARead-only
Get a direct purchase link to buy a train ticket on SBB.ch. Only call this when the user wants to buy a specific ticket. On mobile with SBB app installed, opens directly in the app with Halbtax/GA applied automatically. Pass traveler_names for family tickets when connected to SwissTrip.
Inputs: trip_id (required), from_name (required), from_id (required), to_name (required), +6 more.
get_trip_detailsGet Trip DetailsARead-onlyIdempotent
Get detailed information about a specific train connection including all intermediate stops, platforms, and occupancy. Use a trip ID from search_connections results.
Inputs: trip_id (required).
list_travelersList TravelersARead-onlyIdempotent
List all travelers in the user's SwissTrip account (self, partner, kids). Each traveler has their own reduction card. Use their names with get_prices for family trip pricing. Requires SWISSTRIP_TOKEN.
Inputs: no named parameters.
save_profileSave Travel ProfileAIdempotent
Save the user's travel profile locally for future sessions. Call this after asking the user for their details (name, date of birth, reduction card). Data is stored at ~/.sbb-mcp/profile.json.
Inputs: first_name, last_name, date_of_birth, reduction_card, +1 more.
search_connectionsSearch ConnectionsARead-onlyIdempotent
Find train connections between two Swiss stations. Returns schedules with departure/arrival times, duration, transfers, and trip IDs for pricing.
Inputs: from (required), to (required), date, time, +1 more.
search_stationsSearch StationsARead-onlyIdempotent
Search for Swiss train stations, addresses, or points of interest by name. Returns station IDs needed for other tools.
Inputs: query (required), limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool targets a distinct aspect: station search, connection search, trip details, pricing, ticket link, loading more connections, profile read/save, and traveler listing. No overlapping purposes.
All tools follow a consistent verb_noun pattern with underscores (e.g., search_connections, get_prices, list_travelers), making them predictable and easy to navigate.
9 tools is well-scoped for a Swiss railway assistant, covering search, planning, pricing, purchase, and profile management without bloat or deficiency.
Covers core workflows: station search, connection search, trip details, pricing, purchase link, and profile. Minor gap in real-time delay information, but overall complete for travel planning and purchasing.
Maintenance
Related MCP Connectors
Canonical SwissTrip MCP — independent SBB/CFF/FFS schedules, prices, and ticket links by SwissTrip.
Swiss Transport MCP — wraps Transport Open Data API (free, no auth)
Stations, connections and departures of Swiss public transport, with real-time delays.
Swiss trains and public transport: live connections and departures. Official data, free, no key.
Related MCP Servers
- AlicenseBqualityBmaintenanceSwiss open data MCP server — transport, weather, geodata, companies, etc,. Zero API keys.5424 npm28MIT
- AlicenseAqualityDmaintenanceA zero-authentication MCP server for Swiss public transport, enabling users to query train connections, disruptions, station facilities, and plan journeys using natural language.121MIT
- AlicenseAqualityDmaintenanceMCP server for Swiss public transport — connections, stationboards, real-time delays, and direct booking links for SBB.424 PyPI1MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying Swiss public transport data (stations, departures, connections) from the Transport Open Data API via natural language through an MCP gateway.74 npmMIT