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
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:
Real Time Trains API account can be created from here: https://api.rtt.io/
You will need to note down your API Auth credentials
To install mcp-national-rail for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @lucygoodchild/mcp-national-rail --client claude
npm install
npm run build
npm run start
{
"mcpServers": {
"mcp-national-rail": {
"command": "node",
"args": ["/path/to/mcp-national-rail/dist/index.js"],
"env": {
"RTT_API_USERNAME": "your_rtt_api_username",
"RTT_API_PASSWORD": "your_rtt_api_password"
}
}
}
}
Make 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/
RTT_API_USERNAME=your_rtt_api_username
RTT_API_PASSWORD=your_rtt_api_password
Run the inspector with the following command:
npx @modelcontextprotocol/inspector node dist/index.js
Install via CLI
npx mdskills install lucygoodchild/mcp-national-railMCP National Rail is a free, open-source AI agent skill. 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
Install MCP National Rail with a single command:
npx mdskills install lucygoodchild/mcp-national-railThis downloads the skill files into your project and your AI agent picks them up automatically.
MCP National Rail works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.