Back to MCP Directory
National Rail
Model Context Protocol moderate risk

National Rail

This MCP server retrieves National Rail train schedules using the Realtime Trains API, enabling AI agents to access live departure and arrival information.

Connections & Capabilities

Connects To

GitHubTwitter

Capabilities

read

Quickstart

Install

npx -y @smithery/cli install @lucygoodchild/mcp-national-rail --client claude

Config

{
  "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"
      }
    }
  }
}

Exposed MCP Tools (4)

safe
get_live_departures

Retrieves live departure information for a specific train station.

Read-only operation, no modification of data.

safe
get_live_arrivals

Retrieves live arrival information for a specific train station.

Read-only operation, no modification of data.

safe
get_departures_by_date

Retrieves departure information for a specific train station on a given date.

Read-only operation, no modification of data.

safe
get_arrivals_by_date

Retrieves arrival information for a specific train station on a given date.

Read-only operation, no modification of data.

Safety Assessment

This server is relatively safe for retrieving train schedules, but the security of the API credentials and the Realtime Trains API are critical. Ensure environment variables are properly secured and monitor the API for any security vulnerabilities. Input validation should be implemented to prevent potential injection attacks.

  • Read-only access to train schedule data.
  • No direct modification of railway systems.
  • Relies on a third-party API for data retrieval.
  • Environment variables used for API credentials.
  • Exposure of API credentials if not properly secured.
  • Potential for information disclosure if API is compromised.
  • Dependency on the availability and security of the Realtime Trains API.
  • No input sanitization mentioned, which could lead to injection attacks if exploited.