MCPSERV.CLUB
lucygoodchild

National Rail MCP Server

MCP Server

Retrieve real‑time UK train schedules via AI agents

Stale(55)
1stars
0views
Updated Aug 16, 2025

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

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

smithery badge

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.