TfNSW Realtime Alerts MCP Server

A Model Context Protocol (MCP) server for TfNSW's realtime alerts API

Local serverstdioTypeScript

What is the TfNSW Realtime Alerts MCP server?

Connect TfNSW Realtime Alerts to Claude, Cursor or any other MCP client and it stops being a tab you switch to. A Model Context Protocol (MCP) server for TfNSW's realtime alerts API. The tfnsw realtime alerts mcp server is what makes that connection.

What the server does

A Model Context Protocol server for Transport for NSW's (TfNSW) Realtime Alerts API. This server provides tools to access and interact with real-time transport alerts and information via Large Language Models.

This TypeScript-based MCP server implements integration with Transport for NSW's Realtime Alerts system. It enables AI assistants to access up-to-date information about transport disruptions, planned works, and other important alerts across the NSW transport network.

Installation

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • get-transport-alerts — Retrieve current transport alerts
  • Resources — The Resources tool exposed by this server
  • Tools — The Tools tool exposed by this server
  • Prompts — The Prompts tool exposed by this server
  • Debugging — You can use the MCP Inspector for debugging, which is available as a package script:

Credentials and setup notes

Configuration is passed through the environment: NSW_TRANSPORT_API_KEY. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Where it fits

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. TfNSW Realtime Alerts's toolset — get-transport-alerts, Resources, Tools and 2 more — is a fair guide to whether it matches your workflow. It is maintained by piddlingtuna; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Available tools

ToolWhat it does
get-transport-alertsRetrieve current transport alerts
ResourcesThe Resources tool exposed by this server.
ToolsThe Tools tool exposed by this server.
PromptsThe Prompts tool exposed by this server.
DebuggingYou can use the [MCP Inspector](https://github.com/modelcontextprotocol/inspector) for debugging, which is available as a package script:

How to install the TfNSW Realtime Alerts MCP server

{
  "mcpServers": {
    "tfnsw-realtime-alerts": {
      "command": "npx",
      "args": [
        "-y",
        "tfnsw-realtime-alerts-mcp-server"
      ],
      "env": {
        "NSW_TRANSPORT_API_KEY": "your_api_key_here"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
NSW_TRANSPORT_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use TfNSW Realtime Alerts to get-transport-alerts.
  • Use TfNSW Realtime Alerts to Resources.
  • Use TfNSW Realtime Alerts to Tools.

Frequently asked questions

You must register for a free API key at the TfNSW Open Data Hub and set it as the `NSW_TRANSPORT_API_KEY` environment variable.