TfNSW Realtime Alerts MCP Server
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.
Overview
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.
Features
Resources
- List and access transport alerts via
nsw-transport://
URIs - Filter alerts by transport mode (buses, trains, ferries, etc.)
- Plain text format for easy consumption by AI assistants
Tools
get-transport-alerts
- Retrieve current transport alerts- Filter by transport mode
- Returns formatted alert information including affected routes, time periods, and impact details
Prompts
transport-disruption-summary
- Generate a summary of current transport alerts- Includes relevant alert details as embedded resources
- Returns structured prompt for LLM summarisation of major disruptions
Transport Modes
The following transport modes are supported:
all
- All transport modesbuses
- Sydney Metro and Outer Metro Bus servicesferries
- Sydney Ferries and Newcastle Transport ferrieslightrail
- Light Rail servicesmetro
- Sydney Metronswtrains
- NSW Trains regional trains and coachesregionbuses
- Regional Bus servicessydneytrains
- Sydney Trains suburban and intercity network
Authentication
This server requires authentication with the TfNSW Open Data API. You will need to register for an API key at the TfNSW Open Data Hub.
Installation
To use with Claude Desktop, add the server config:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
Replace "your_api_key_here"
with your TfNSW API key from the TfNSW Open Data Hub.
Development
Configure your API key as an environment variable in your .env
file:
Install dependencies:
Build the server:
For development with auto-rebuild:
Debugging
You can use the MCP Inspector for debugging, which is available as a package script:
The Inspector will provide a URL to access debugging tools in your browser.
License
This project is licensed under the MIT License - see the LICENSE file for details.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
This server enables large language models to access and interact with real-time transport alerts from Transport for NSW's network, supporting filtering by transport mode and returning formatted alert information about disruptions and planned works.
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityEnables Large Language Models to access real-time data on Vilnius public transport stops and routes through the Model Context Protocol.Last updated -21Python
- -securityAlicense-qualityA Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.Last updated -324288JavaScriptMIT License
- -securityFlicense-qualityAn MCP service for interacting with Transport NSW's API that enables users to find transport stops around locations and retrieve information about transport alerts and disruptions.Last updated -Python
- -securityAlicense-qualityA Model Context Protocol server enabling AI systems to send real-time notifications to phones, desktops, and other devices through the ntfy publish/subscribe service.Last updated -187TypeScriptApache 2.0