MCP Server
RailFeed as a Model Context Protocol server, so an AI assistant can answer questions about the railway directly — live departures, whether a service is running, cancellations, connections — without you writing any code. Works with Claude Desktop, Claude Code, and any other MCP client.
The MCP server uses OAuth for authentication — create an OAuth client on your OAuth Clients page first, then point your MCP client at the URL below. For clients that only support a static header (e.g. Claude Code), you can also pass your API key as a Bearer token in the Authorization header. (The MCP server reads only that header; X-Api-Key is for the REST API.)
Setup
In Claude Desktop: Settings → Connectors → Add custom connector.
| URL | https://mcp.railfeed.co.uk | |
| Header (alternative) | Authorization: Bearer rf_... | |
For OAuth, create a client on the OAuth Clients page — the defaults work for Claude Desktop. For a static API key, create one on the API Keys page. Each account can hold two OAuth clients.
Tool calls count against your own account, exactly as if you had called the REST API with your key: at most 30 tool calls a minute, with the same per-account API limits behind that. Over the limit, a tool returns an error saying how long to wait.
Available tools
| Tool | Parameters | Description |
|---|---|---|
| find_station | query | Search for a UK station or location by name, CRS code or STANOX — the usual first call, to turn a place name into a code the other tools accept |
| departures | station, type, hours, date | Live departure/arrival board: the scheduled timetable with real-time actuals, delays, platforms and cancellations merged in. type is departures, arrivals or both |
| service_calling_points | identity, date | Every calling point for one service with its live running. identity is a schedule UID or a TRUST train ID |
| direct_services | from_station, to_station, date | Scheduled services running directly between two stations, in order, with journey times |
| passing_trains | location, hours, date | Trains passing a location without stopping — junctions, depots and freight-only points, with estimated pass times where the timetable books none |
| cancellations | station, hours | Recently cancelled services with Network Rail's own reason wording, optionally filtered to one station |
Each tool wraps a REST endpoint but is not named after it — see the
API Docs for the full parameter
and response detail behind each one. date accepts any day within
the last 30 days as well as today, so an assistant can be asked about
yesterday's running, not just now.
