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.
nsw-transport://
URIsget-transport-alerts
- Retrieve current transport alerts
transport-disruption-summary
- Generate a summary of current transport alerts
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 networkThis server requires authentication with the TfNSW Open Data API. You will need to register for an API key at the TfNSW Open Data Hub.
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
{
"mcpServers": {
"tfnsw-realtime-alerts": {
"command": "npx",
"args": [
"-y",
"tfnsw-realtime-alerts-mcp-server"
],
"env": {
"NSW_TRANSPORT_API_KEY": "your_api_key_here"
}
}
}
}
Replace "your_api_key_here"
with your TfNSW API key from the TfNSW Open Data Hub.
Configure your API key as an environment variable in your .env
file:
NSW_TRANSPORT_API_KEY="your_api_key_here"
Install dependencies:
npm install
Build the server:
npm run build
For development with auto-rebuild:
npm run watch
You can use the MCP Inspector for debugging, which is available as a package script:
npm run inspector
The Inspector will provide a URL to access debugging tools in your browser.
This project is licensed under the MIT License - see the LICENSE file for details.
Seamless access to top MCP servers powering the future of AI integration.