A Model Context Protocol (MCP) server to retrieve train schedules from National Rail. This project implements a server using the Model Context Protocol (MCP) that allows AI agents to retrieve train information on National Rail trains using the Realtime Trains API. It provides tools for: - getlivedepartures - getlivearrivals - getdeparturesbydate - getarrivalsbydate Real Time Trains API account can
Add this skill
npx mdskills install lucygoodchild/mcp-national-railWell-documented MCP server for UK rail data with clear setup and useful tools
1[](https://smithery.ai/server/@lucygoodchild/mcp-national-rail)23# mcp-national-rail45A Model Context Protocol (MCP) server to retrieve train schedules from National Rail.67## Overview89This project implements a server using the Model Context Protocol (MCP) that allows AI agents to retrieve train information on National Rail trains using the Realtime Trains API.1011It provides tools for:12- get_live_departures13- get_live_arrivals14- get_departures_by_date15- get_arrivals_by_date1617## Installation1819Real Time Trains API account can be created from here: https://api.rtt.io/2021You will need to note down your API Auth credentials2223### Installing via Smithery2425To install mcp-national-rail for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@lucygoodchild/mcp-national-rail):2627```bash28npx -y @smithery/cli install @lucygoodchild/mcp-national-rail --client claude29```3031### Manual Installation for Claude Desktop3233#### Prerequisites34- Node.js3536#### Setup37381. Clone this repository392. Install dependencies40```bash41npm install42```433. Build and start the project44```bash45npm run build46npm run start47```484. Add the following to your MCP client configuration (~/Library/Application Support/Claude/claude_desktop_config.json):49```bash50{51 "mcpServers": {52 "mcp-national-rail": {53 "command": "node",54 "args": ["/path/to/mcp-national-rail/dist/index.js"],55 "env": {56 "RTT_API_USERNAME": "your_rtt_api_username",57 "RTT_API_PASSWORD": "your_rtt_api_password"58 }59 }60 }61}62```63Make sure to replace "/path/to/mcp-national-rail/dist/index.js" with the actual path and add your RTT API username and password which can be created from here: https://api.rtt.io/64655. Restart Claude6667### Development68- Create .env file based on the example file69```bash70RTT_API_USERNAME=your_rtt_api_username71RTT_API_PASSWORD=your_rtt_api_password72```7374Run the inspector with the following command:75```bash76npx @modelcontextprotocol/inspector node dist/index.js77```78
Full transparency — inspect the skill content before installing.