SuperAPI AI Directory

mcp-national-rail

UK National Rail train schedules and live travel information via the Realtime Trains API.

Open website

About this tool

mcp-national-rail is a Model Context Protocol (MCP) server used to obtain train schedule information from National Rail in the United Kingdom. The project is implemented through the MCP protocol, allowing AI agents to retrieve National Rail train information using the Realtime Trains API.

Purpose The project is intended for scenarios that require querying real-time and date-based travel information for UK National Rail trains through AI agents.

Main capabilities The server provides four tools: get_live_departures, get_live_arrivals, get_departures_by_date, and get_arrivals_by_date, respectively used to obtain real-time departures, real-time arrivals, departures by date, and arrivals by date train information.

How to use First, you need to create a Realtime Trains API account at https://api.rtt.io/ and record the API Auth credentials. Installation methods include automatic installation to Claude Desktop via Smithery, or manual installation: clone the repository, install dependencies, build, and start the project. After that, add the configuration in the MCP client configuration (for example, ~/Library/Application Support/Claude/claude_desktop_config.json), replace "/path/to/mcp-national-rail/dist/index.js" with the actual path, and fill in the RTT API username and password. You also need to create a .env file based on the example file. It can be run using inspector; the specific command is not provided in the materials.

Applicable scenarios Suitable for AI agents querying real-time train arrival and departure information for UK National Rail and historical or planned train information by date.

Limitations Usage depends on a Realtime Trains API account and credentials; the project is aimed at UK National Rail data; other functional details, pricing, and platform support information are not yet provided.