MCP Server for AI Agents
Public API for AI agents: German railway punctuality data from 1.3 million+ observations, live chaos index and the official passenger-rights compensation calculator.
The MCP server is free to use. No API keys, no sign-up required. Revenue comes from ticket bookings on the website.
Endpoint
https://www.zug-ticket-kaufen.de/mcpTransport: Streamable HTTP (POST JSON-RPC 2.0). Session IDs are optional but recommended: send a stable Mcp-Session-Id header (e.g. UUID) so rate limits apply fairly per conversation β important for hosted agents behind shared egress IPs.GET https://www.zug-ticket-kaufen.de/mcp returns a JSON health check.
Available Tools
route_punctuality
Punctuality statistics for a train route between two stations: on-time percentage, average delay, cancellation rate, observation count.
from (origin station), to (destination station)station_punctuality
Punctuality statistics for a single station: on-time percentage, average delay, number of observed trains.
station (station name, e.g. "Berlin Hbf")train_delay_stats
Delay statistics for a specific train (e.g. ICE 577): per-station on-time percentage, average/max delay.
product (ice/ic/ec), train_number (e.g. "577"),period (optional: daily/weekly/monthly)chaos_index
The Bahn-Chaos-Index: ONE number (0 calm ... 100 chaos) summarizing the current state of German rail today. Based on long-distance arrivals at 20 major stations.
compensation_calculator
Calculate passenger compensation for train delays under EU regulation 2021/782: 25% from 60 min, 50% from 120 min delay. Supports season tickets and BahnCard 100.
ticket_type (single/season), delay_minutes,fare_eur (for single tickets) and moreSetup in AI Clients
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"bahn-zuverlaessigkeit": {
"url": "https://www.zug-ticket-kaufen.de/mcp"
}
}
}Cursor IDE
Open Cursor Settings β Features β MCP Servers β Add Server:
- Name:
bahn-zuverlaessigkeit - URL:
https://www.zug-ticket-kaufen.de/mcp - Transport: HTTP
VS Code (Copilot/Continue)
In .vscode/mcp.json or extension settings:
{
"servers": {
"bahn-zuverlaessigkeit": {
"type": "http",
"url": "https://www.zug-ticket-kaufen.de/mcp"
}
}
}ChatGPT (Web)
ChatGPT supports custom MCP servers as plugins:
- Open chatgpt.com β Plugins
- Click + β Add custom MCP server
- Name:
Bahn-ZuverlΓ€ssigkeit - Server URL:
https://www.zug-ticket-kaufen.de/mcp - Authentication:
No authentication
Grok / Perplexity
These services don't yet support external MCP servers. Check their documentation for updates.
Example Prompts
Try these questions with an MCP-enabled AI assistant:
- "How punctual is the ICE from Berlin to Munich?"
- "Which ICE train to Hamburg is the most reliable?"
- "What's the current chaos index for German railways?"
- "How much compensation do I get for a 90-minute delay with an β¬80 ticket?"
- "Compare the punctuality of Frankfurt Hbf and Munich Hbf"
Technical Details
| Protocol | MCP (Model Context Protocol) via Streamable HTTP |
| Authentication | None (public) |
| Version | 1.1.0 (serverInfo + /.well-known/mcp/server.json) |
| Rate Limit | Generous global (~6000/min); per session ~180/min; high per-IP ceiling (~3000/min) for shared egress. On 429: Retry-After header + JSON-RPC error with hint. Configurable via env. |
| Timeouts | ~10s request budget, DB queries ~8s (env override) |
| Batch Requests | Up to 10 messages per batch |
| Output | All tools: outputSchema + structuredContent plus text content (compatibility) |
| CORS | All origins allowed (*) |
| Deprecation | Additive changes β minor; breaking removals β major after at least one minor with a βdeprecatedβ notice |
| Data Source | 1.3M+ own observations (HAFAS Realtime, gtfs.de) |
Privacy
The MCP server only processes the query parameters you provide (station names, train numbers, ticket data). No personal data is stored. IP addresses are logged for server diagnostics only (max 6 days). See Privacy Policy.
License & Attribution
Data is licensed under CC BY-SA 4.0. When using, please cite with a link to zug-ticket-kaufen.de or zug-ticket-kaufen.de/en/mcp-docs.
Contact & Support
Questions about the MCP server? Contact us at contact@zug-ticket-kaufen.de or via the Imprint.