About
A Model Context Protocol server that lets AI agents access live and historical train departure and arrival data from the National Rail Realtime Trains API.
Capabilities
Overview
The mcp‑national‑rail server turns the Realtime Trains API into a first‑class MCP resource, giving AI assistants instant access to live and scheduled train information across the UK rail network. Instead of having developers write custom HTTP clients or parse raw API responses, this server exposes a set of high‑level tools that encapsulate the complexity of authentication, pagination, and data filtering. By integrating this server into an AI workflow, agents can ask natural‑language questions such as “What are the next departures from London Kings Cross?” or “Show me arrivals at Birmingham New Street tomorrow” and receive structured, up‑to‑date answers without any additional coding.
What the server does
The MCP server offers four primary tools:
- – fetches the most recent departure times from a specified station, optionally filtered by service type or destination.
- – retrieves the latest arrivals at a station, with similar filtering options.
- – returns scheduled departures for a given date, allowing planners to see the full timetable.
- – provides scheduled arrivals for a specific day.
Each tool returns data in a clean, machine‑readable format that can be directly consumed by the AI’s reasoning engine. Because the server handles authentication via environment variables, developers can keep credentials out of source code and rely on secure storage.
Why it matters for AI developers
For teams building conversational agents, the ability to pull real‑time transport data without writing boilerplate code saves significant development time. The MCP abstraction means that the AI can focus on intent understanding and response generation, while the server guarantees consistent API usage and error handling. This is especially valuable for applications that need to provide reliable travel information—travel assistants, customer support bots, or logistics planning tools.
Key features and capabilities
- Seamless integration – The server registers as an MCP resource, allowing Claude Desktop or any MCP‑compatible client to discover and invoke its tools automatically.
- Live & scheduled data – Both real‑time feeds and historical schedules are accessible, giving agents flexibility to answer a wide range of queries.
- Simple authentication – Credentials are supplied via environment variables, keeping sensitive data out of code repositories.
- Extensible design – The server’s architecture makes it straightforward to add more tools (e.g., journey planning, station information) or support additional rail APIs.
Real‑world use cases
- Travel planning assistants – Users can ask for the next train to a destination, and the agent will return accurate departure times along with any delays.
- Customer support for rail operators – Internal bots can quickly pull arrival and departure data to answer passenger inquiries or update status dashboards.
- Logistics and freight management – Companies can schedule shipments based on real‑time train availability, optimizing cargo movements.
- Educational tools – Interactive learning apps can demonstrate how public transport schedules work, using the server to fetch live data for demonstrations.
Unique advantages
Unlike generic HTTP wrappers, this MCP server is purpose‑built for conversational AI. Its toolset aligns with common travel queries, reducing the cognitive load on developers who would otherwise need to map natural language intents to specific API endpoints. The server’s lightweight Node.js implementation ensures quick startup and low resource consumption, making it ideal for desktop or cloud deployments. By leveraging the Realtime Trains API—the official source of UK train data—the server guarantees up‑to‑date information, a critical factor for time‑sensitive applications.
Related Servers
MarkItDown MCP Server
Convert documents to Markdown for LLMs quickly and accurately
Context7 MCP
Real‑time, version‑specific code docs for LLMs
Playwright MCP
Browser automation via structured accessibility trees
BlenderMCP
Claude AI meets Blender for instant 3D creation
Pydantic AI
Build GenAI agents with Pydantic validation and observability
Chrome DevTools MCP
AI-powered Chrome automation and debugging
Weekly Views
Server Health
Information
Explore More Servers
Fast Filesystem MCP
High‑performance file operations for Claude Desktop
Mcp Obsidian SSE Server
Real-time MCP communication for Obsidian vaults
Mcp Server Restart
Restart Claude Desktop with a single MCP command
Hide MCP Server
Headless IDE integration for Claude
TinaCMS MCP Server
C# server for managing TinaCMS content via MCP
Thales CipherTrust Data Security Platform CAKM MCP Server
Unified TDE management for SQL and Oracle via CipherTrust EKM