National Rail
FreeNot checkedAn MCP server to retrieve train schedules from National Rail using the Realtime Trains API, providing tools for live departures and arrivals.
About
An MCP server to retrieve train schedules from National Rail using the Realtime Trains API, providing tools for live departures and arrivals.
README
mcp-national-rail
A Model Context Protocol (MCP) server to retrieve train schedules from National Rail.
Overview
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:
- get_live_departures
- get_live_arrivals
- get_departures_by_date
- get_arrivals_by_date
Installation
Real Time Trains API account can be created from here: https://api.rtt.io/
You will need to note down your API Auth credentials
Installing via Smithery
To install mcp-national-rail for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @lucygoodchild/mcp-national-rail --client claude
Manual Installation for Claude Desktop
Prerequisites
- Node.js
Setup
- Clone this repository
- Install dependencies
npm install
- Build and start the project
npm run build
npm run start
- Add the following to your MCP client configuration (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"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/
- Restart Claude
Development
- Create .env file based on the example file
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
Installing National Rail
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/lucygoodchild/mcp-national-railFAQ
Is National Rail MCP free?
Yes, National Rail MCP is free — one-click install via Unyly at no cost.
Does National Rail need an API key?
No, National Rail runs without API keys or environment variables.
Is National Rail hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install National Rail in Claude Desktop, Claude Code or Cursor?
Open National Rail on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare National Rail with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
