TfNSW Realtime Alerts MCP Server
@piddlingtuna
A Model Context Protocol (MCP) server for TfNSW's realtime alerts API
Overview
What is TfNSW Realtime Alerts MCP Server?
A Model Context Protocol (MCP) server that integrates with Transport for NSW’s Realtime Alerts API, enabling AI assistants to access and interact with up‑to‑date transport disruption and planned works information across the NSW transport network. It is built in TypeScript and designed for use with large language models.
How to use TfNSW Realtime Alerts MCP Server?
Install and run via npx, then configure your TfNSW API key as an environment variable. Add the server configuration to your Claude Desktop config file (e.g., ~/Library/Application Support/Claude/claude_desktop_config.json on macOS). The server provides the tool get-transport-alerts and the prompt transport-disruption-summary.
Key features of TfNSW Realtime Alerts MCP Server
- List and access transport alerts via
nsw-transport://URIs - Filter alerts by transport mode (buses, ferries, trains, etc.)
- Retrieve current alerts formatted with route, time, and impact details
- Pre‑built prompt for summarizing major disruptions
- Plain text output for easy consumption by AI assistants
Use cases of TfNSW Realtime Alerts MCP Server
- Querying current transport disruptions across all modes in NSW
- Getting a bullet‑point summary of major works or service changes
- Integrating real‑time alert data into conversational AI helpdesks or travel assistants
FAQ from TfNSW Realtime Alerts MCP Server
What authentication is required?
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.
Which transport modes are supported?
all, buses, ferries, lightrail, metro, nswtrains, regionbuses, and sydneytrains.
How do I install and run the server?
Use npx -y tfnsw-realtime-alerts-mcp-server in your Claude Desktop configuration, or clone the repo, run npm install and npm run build.
Where is the configuration file located?
On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json.
On Windows: %APPDATA%/Claude/claude_desktop_config.json.
Can I debug the server?
Yes, you can use the MCP Inspector by running npm run inspector in the project root.