uk-rail-mcp
Provides live UK rail data including station search, departure/arrival boards, service details, and pre-filled booking links.
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., "@uk-rail-mcpdepartures from London Paddington to Reading"
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.
uk-rail-mcp
MCP server for live UK rail data, using the free-for-personal-use Realtime Trains next-generation API, with pre-filled thetrainline.com booking links. Trainline itself has no public API, so this wraps open rail data and hands off to Trainline for purchase.
Tools
search_stations— name/CRS lookup (2,608 GB stations bundled)live_departures— live board for a station, optionally filtered to a destination; includes a Trainline booking link when filteredlive_arrivals— live arrivals boardservice_details— full calling pattern + real-time info for one traintrainline_booking_link— pre-filled thetrainline.com search URL
Related MCP server: railinfo-mcp
Setup
Sign in at https://api-portal.rtt.io (needs an RTT unified login account) and request an API token. The portal issues either a long-life access token or a refresh token — it will tell you which.
Build:
npm install
npm run buildRun as a remote server (default) — for claude.ai custom connectors
RTT_ACCESS_TOKEN=... MCP_PATH_TOKEN=some-long-random-string npm start
# or, if the portal gave you a refresh token:
RTT_REFRESH_TOKEN=... MCP_PATH_TOKEN=some-long-random-string npm startServes Streamable HTTP MCP at POST /mcp/<MCP_PATH_TOKEN> (or /mcp if no token is set), plus GET /healthz. Stateless mode: no sessions, safe behind load balancers.
Claude connects from Anthropic's cloud, not your machine, so the server must be publicly reachable — deploy to Railway, Fly.io, Render, or any VPS (all read PORT automatically). Then in claude.ai: Settings → Connectors → Add custom connector, and paste https://your-host/mcp/<token>.
The path token is lightweight access control (this server has no OAuth): anyone with the full URL can burn your RTT quota, so use a long random token and treat the URL as a secret. For anything beyond personal use, put proper OAuth in front (the MCP SDK supports it).
Run locally in Claude Desktop instead
node dist/index.js --stdioclaude_desktop_config.json:
{
"mcpServers": {
"uk-rail": {
"command": "node",
"args": ["/absolute/path/to/trainline-mcp/dist/index.js", "--stdio"],
"env": {
"RTT_ACCESS_TOKEN": "your-token-from-api-portal.rtt.io"
}
}
}
}Things to verify (unofficial/undocumented behaviour)
The client targets the RTT next-generation API (base
https://data.rtt.io, bearer auth) and was written directly against the official OpenAPI spec (https://realtimetrains.github.io/api-specification/). Field parsing should be sanity-checked against one real response once you have a token.RTT forbids putting tokens in distributable client apps; this server-side proxy pattern is exactly what they require, but keep the token out of the repo.
The Trainline deep-link format (
/book/results?origin=...&destination=...) is not officially documented and may change — test one link in a browser.
Limitations / roadmap
UK (GB) only — RTT has no European coverage.
No fares or journey planning with pricing; that data is licence-gated (National Rail OJP / Rail Data Marketplace, or a Trainline Partner Solutions agreement).
No booking — deliberate; handled by the Trainline handoff link.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
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.
Related MCP Connectors
Live barrier status and closure forecasts for ~1,600 UK level crossings. Public data, no auth.
Live UK bike-share availability: nearby bikes and stations, popular stations, 90-day history.
Search UK companies, land registry prices, charities, OS locations, and traffic data
Provide real-time transportation data including bus arrivals, train service alerts, carpark availa…
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides real-time Dutch Railways (NS) data for journey planning, live departures, disruptions, and station search.3-
- FlicenseNot gradedqualityDmaintenanceEnables real-time Indian Railways information retrieval, including live train running status, station schedules, and upcoming arrivals/departures.-
- AlicenseAqualityCmaintenanceProvides Belgian railway travel information via the iRail API, including station search, live departures/arrivals, route planning, and network disturbances.5MIT
- AlicenseBqualityDmaintenanceProvides real-time Transport for London journey data, including routes, alerts, and disruptions, allowing AI assistants to search journeys and get station information.1244ISC
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/RealGUppercut/uk-rail-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server